|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.james.smtpserver.SMTPHandler
public class SMTPHandler
Provides SMTP functionality by carrying out the server side of the SMTP interaction.
Field Summary |
---|
Fields inherited from interface org.apache.james.smtpserver.SMTPSession |
---|
CURRENT_HELO_MODE, MESG_FAILED, RCPT_LIST, SENDER |
Constructor Summary | |
---|---|
SMTPHandler()
|
Method Summary | |
---|---|
void |
abortMessage()
this makes the message to be dropped inprotocol |
java.lang.String |
clearResponseBuffer()
Clears the response buffer, returning the String of characters in the buffer. |
void |
endSession()
this makes the session to close |
java.lang.String |
getCommandArgument()
Returns currently process command argument |
java.lang.String |
getCommandName()
Returns currently process command name |
SMTPHandlerConfigurationData |
getConfigurationData()
Returns SMTPHandler service wide configuration |
java.io.InputStream |
getInputStream()
Returns Inputstream for handling messages and commands |
Mail |
getMail()
Returns Mail object for message handlers to process |
java.lang.String |
getRemoteHost()
Returns host name of the client |
java.lang.String |
getRemoteIPAddress()
Returns host ip address of the client |
java.lang.StringBuffer |
getResponseBuffer()
Returns ResponseBuffer, this optimizes the unecessary creation of resources by each handler object |
java.lang.String |
getSessionID()
Returns the SMTP session id |
java.util.HashMap |
getState()
Returns Map that consists of the state of the SMTPSession |
java.lang.String |
getUser()
Returns the user name associated with this SMTP interaction. |
Watchdog |
getWatchdog()
Returns Watchdog object used for handling timeout |
void |
handleConnection(java.net.Socket connection)
|
boolean |
isAuthRequired()
Returns whether Authentication is required or not |
boolean |
isBlockListed()
Returns the blocklisted status |
boolean |
isRelayingAllowed()
Returns whether Relaying is allowed or not |
boolean |
isSessionEnded()
Returns the session status |
java.lang.String |
readCommandLine()
Reads a line of characters off the command line. |
void |
resetState()
Resets message-specific, but not authenticated user, state. |
void |
setBlockListed(boolean blocklisted)
Sets the blocklisted value |
void |
setHandlerChain(SMTPHandlerChain handlerChain)
Sets the SMTPHandlerChain |
void |
setMail(Mail mail)
Sets the MailImpl object for further processing |
void |
setUser(java.lang.String userID)
Sets the user name associated with this SMTP interaction. |
boolean |
useHeloEhloEnforcement()
Returns whether remote server needs to send HELO/EHLO |
void |
writeResponse(java.lang.String respString)
Writes response string to the client |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SMTPHandler()
Method Detail |
---|
public void handleConnection(java.net.Socket connection) throws java.io.IOException
handleConnection
in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandler
java.io.IOException
ConnectionHandler.handleConnection(Socket)
public void setHandlerChain(SMTPHandlerChain handlerChain)
handlerChain
- SMTPHandler objectpublic void writeResponse(java.lang.String respString)
SMTPSession
writeResponse
in interface SMTPSession
respString
- String that needs to send to the clientSMTPSession.writeResponse(String)
public java.lang.String getCommandName()
SMTPSession
getCommandName
in interface SMTPSession
SMTPSession.getCommandName()
public java.lang.String getCommandArgument()
SMTPSession
getCommandArgument
in interface SMTPSession
SMTPSession.getCommandArgument()
public Mail getMail()
SMTPSession
getMail
in interface SMTPSession
SMTPSession.getMail()
public void setMail(Mail mail)
SMTPSession
setMail
in interface SMTPSession
mail
- MailImpl objectSMTPSession.setMail(Mail)
public java.lang.String getRemoteHost()
SMTPSession
getRemoteHost
in interface SMTPSession
SMTPSession.getRemoteHost()
public java.lang.String getRemoteIPAddress()
SMTPSession
getRemoteIPAddress
in interface SMTPSession
SMTPSession.getRemoteIPAddress()
public void endSession()
SMTPSession
endSession
in interface SMTPSession
SMTPSession.endSession()
public boolean isSessionEnded()
SMTPSession
isSessionEnded
in interface SMTPSession
SMTPSession.isSessionEnded()
public void resetState()
SMTPSession
resetState
in interface SMTPSession
SMTPSession.resetState()
public java.util.HashMap getState()
SMTPSession
getState
in interface SMTPSession
SMTPSession.getState()
public SMTPHandlerConfigurationData getConfigurationData()
SMTPSession
getConfigurationData
in interface SMTPSession
SMTPSession.getConfigurationData()
public boolean isBlockListed()
SMTPSession
isBlockListed
in interface SMTPSession
SMTPSession.isBlockListed()
public void setBlockListed(boolean blocklisted)
SMTPSession
setBlockListed
in interface SMTPSession
SMTPSession.setBlockListed(boolean)
public boolean isRelayingAllowed()
SMTPSession
isRelayingAllowed
in interface SMTPSession
SMTPSession.isRelayingAllowed()
public boolean isAuthRequired()
SMTPSession
isAuthRequired
in interface SMTPSession
SMTPSession.isAuthRequired()
public boolean useHeloEhloEnforcement()
SMTPSession
useHeloEhloEnforcement
in interface SMTPSession
SMTPSession.useHeloEhloEnforcement()
public java.lang.String getUser()
SMTPSession
getUser
in interface SMTPSession
SMTPSession.getUser()
public void setUser(java.lang.String userID)
SMTPSession
setUser
in interface SMTPSession
org.apache.james.smtpserver.SMTPSession#setUser()
public java.lang.StringBuffer getResponseBuffer()
SMTPSession
getResponseBuffer
in interface SMTPSession
SMTPSession.getResponseBuffer()
public java.lang.String clearResponseBuffer()
SMTPSession
clearResponseBuffer
in interface SMTPSession
SMTPSession.clearResponseBuffer()
public final java.lang.String readCommandLine() throws java.io.IOException
SMTPSession
readCommandLine
in interface SMTPSession
java.io.IOException
- if an exception is generated reading in the input charactersSMTPSession.readCommandLine()
public Watchdog getWatchdog()
SMTPSession
getWatchdog
in interface SMTPSession
SMTPSession.getWatchdog()
public java.io.InputStream getInputStream()
SMTPSession
getInputStream
in interface SMTPSession
SMTPSession.getInputStream()
public java.lang.String getSessionID()
SMTPSession
getSessionID
in interface SMTPSession
SMTPSession.getSessionID()
public void abortMessage()
SMTPSession
abortMessage
in interface SMTPSession
SMTPSession.abortMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |