FileDocCategorySizeDatePackage
MockMail.javaAPI DocApache James 2.3.13986Fri Jan 12 12:56:36 GMT 2007org.apache.james.test.mock.mailet

MockMail

public class MockMail extends Object implements org.apache.mailet.Mail
Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. *

Fields Summary
private MimeMessage
msg
private Collection
recipients
private String
name
private org.apache.mailet.MailAddress
sender
private String
state
private String
errorMessage
private Date
lastUpdated
private HashMap
attributes
private static final long
serialVersionUID
Constructors Summary
Methods Summary
public java.io.SerializablegetAttribute(java.lang.String name)

        return (Serializable) attributes.get(name);
    
public java.util.IteratorgetAttributeNames()

        return attributes.keySet().iterator();
    
public java.lang.StringgetErrorMessage()

        return errorMessage;
    
public java.util.DategetLastUpdated()

        return lastUpdated;
    
public javax.mail.internet.MimeMessagegetMessage()

        return msg;
    
public longgetMessageSize()

        throw new UnsupportedOperationException("Unimplemented mock service");
    
public java.lang.StringgetName()


       
        return name;
    
public java.util.CollectiongetRecipients()

        return recipients;
    
public java.lang.StringgetRemoteAddr()

        throw new UnsupportedOperationException("Unimplemented mock service");
    
public java.lang.StringgetRemoteHost()

        throw new UnsupportedOperationException("Unimplemented mock service");
    
public org.apache.mailet.MailAddressgetSender()

        return sender;
    
public java.lang.StringgetState()

        return state;
    
public booleanhasAttributes()

        return !attributes.isEmpty();
    
public voidremoveAllAttributes()

        attributes.clear();
    
public java.io.SerializableremoveAttribute(java.lang.String name)

        return (Serializable) attributes.remove(name);

    
public java.io.SerializablesetAttribute(java.lang.String name, java.io.Serializable object)


        return (Serializable) attributes.put(name, object);
    
public voidsetErrorMessage(java.lang.String msg)

        this.errorMessage = msg;
    
public voidsetLastUpdated(java.util.Date lastUpdated)

        this.lastUpdated = lastUpdated;
    
public voidsetMessage(javax.mail.internet.MimeMessage message)

        this.msg = message;
    
public voidsetName(java.lang.String newName)

        this.name = newName;
    
public voidsetRecipients(java.util.Collection recipients)

        this.recipients = recipients;
    
public voidsetState(java.lang.String state)

        this.state = state;