org.mailster.smtp.api.handler.DeliveryContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailster-smtp Show documentation
Show all versions of mailster-smtp Show documentation
A NIO SMTP server API written in Java
package org.mailster.smtp.api.handler;
import java.io.InputStream;
import java.net.SocketAddress;
import org.mailster.smtp.SMTPServerConfig;
import org.mailster.smtp.core.auth.Credential;
/**
* Interface which provides context to the message handlers.
*
* @author De Oliveira Edouard <[email protected]>
*/
public interface DeliveryContext {
/**
* @return the server configuration.
*/
SMTPServerConfig getSMTPServerConfig();
/**
* @return the IP address of the remote server.
*/
SocketAddress getRemoteAddress();
/**
* @return the original data stream.
*/
InputStream getInputStream();
/**
* @return the logged identity. Can be null if connection is still in
* authorization state or if authentication isn't required.
*/
Credential getCredential();
}