Package mireka.filter.local.table

Source Code of mireka.filter.local.table.DomainPostmasterSpecification

package mireka.filter.local.table;

import mireka.address.DomainPostmaster;
import mireka.address.Recipient;
import mireka.address.RemotePart;

/**
* DomainPostmasterSpecification matches the domain postmaster of the supplied
* remote part.
*/
public class DomainPostmasterSpecification implements RecipientSpecification {
    private RemotePart remotePart;

    @Override
    public boolean isSatisfiedBy(Recipient recipient) {
        if (!(recipient instanceof DomainPostmaster))
            return false;
        RemotePart recipientRemotePart =
                ((DomainPostmaster) recipient).getMailbox().getRemotePart();
        return remotePart.equals(recipientRemotePart);
    }

    /**
     * @category GETSET
     */
    public RemotePart getRemotePart() {
        return remotePart;
    }

    /**
     * @category GETSET
     */
    public void setRemotePart(RemotePart remotePart) {
        this.remotePart = remotePart;
    }
}
TOP

Related Classes of mireka.filter.local.table.DomainPostmasterSpecification

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.