org.subethamail.smtp.server
Class ConnectionHandler.Context
java.lang.Object
org.subethamail.smtp.server.ConnectionHandler.Context
- All Implemented Interfaces:
- MessageContext, BaseContext, ConnectionContext
- Enclosing class:
- ConnectionHandler
public class ConnectionHandler.Context
- extends java.lang.Object
- implements ConnectionContext, MessageContext
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionHandler.Context
public ConnectionHandler.Context(SMTPServer server,
org.apache.mina.common.IoSession ioSession)
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream
in interface BaseContext
- Returns:
- the original data stream.
setInputStream
public void setInputStream(java.io.InputStream inputStream)
getSession
public Session getSession()
- Specified by:
getSession
in interface ConnectionContext
sendResponse
public void sendResponse(java.lang.String response)
throws java.io.IOException
- Specified by:
sendResponse
in interface ConnectionContext
- Throws:
java.io.IOException
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
- Specified by:
getRemoteAddress
in interface BaseContext
- Returns:
- the IP address of the remote server.
getSMTPServer
public SMTPServer getSMTPServer()
- Specified by:
getSMTPServer
in interface BaseContext
- Returns:
- the SMTPServer object.
getIOSession
public org.apache.mina.common.IoSession getIOSession()
- Specified by:
getIOSession
in interface ConnectionContext
getCredential
public Credential getCredential()
- Specified by:
getCredential
in interface MessageContext
- Returns:
- the logged identity. Can be null if connection is still in
authorization state or if authentication isn't required.
setCredential
public void setCredential(Credential credential)
- Specified by:
setCredential
in interface ConnectionContext
Copyright © 2011 SubEthaSMTP. All Rights Reserved. Build version: UNVERSIONED