|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.ConnectionHandlerjava.io.IOExceptionConnectionHandler.handleConnection(Socket)public void setHandlerChain(SMTPHandlerChain handlerChain)
handlerChain - SMTPHandler objectpublic void writeResponse(java.lang.String respString)
SMTPSession
writeResponse in interface SMTPSessionrespString - String that needs to send to the clientSMTPSession.writeResponse(String)public java.lang.String getCommandName()
SMTPSession
getCommandName in interface SMTPSessionSMTPSession.getCommandName()public java.lang.String getCommandArgument()
SMTPSession
getCommandArgument in interface SMTPSessionSMTPSession.getCommandArgument()public Mail getMail()
SMTPSession
getMail in interface SMTPSessionSMTPSession.getMail()public void setMail(Mail mail)
SMTPSession
setMail in interface SMTPSessionmail - MailImpl objectSMTPSession.setMail(Mail)public java.lang.String getRemoteHost()
SMTPSession
getRemoteHost in interface SMTPSessionSMTPSession.getRemoteHost()public java.lang.String getRemoteIPAddress()
SMTPSession
getRemoteIPAddress in interface SMTPSessionSMTPSession.getRemoteIPAddress()public void endSession()
SMTPSession
endSession in interface SMTPSessionSMTPSession.endSession()public boolean isSessionEnded()
SMTPSession
isSessionEnded in interface SMTPSessionSMTPSession.isSessionEnded()public void resetState()
SMTPSession
resetState in interface SMTPSessionSMTPSession.resetState()public java.util.HashMap getState()
SMTPSession
getState in interface SMTPSessionSMTPSession.getState()public SMTPHandlerConfigurationData getConfigurationData()
SMTPSession
getConfigurationData in interface SMTPSessionSMTPSession.getConfigurationData()public boolean isBlockListed()
SMTPSession
isBlockListed in interface SMTPSessionSMTPSession.isBlockListed()public void setBlockListed(boolean blocklisted)
SMTPSession
setBlockListed in interface SMTPSessionSMTPSession.setBlockListed(boolean)public boolean isRelayingAllowed()
SMTPSession
isRelayingAllowed in interface SMTPSessionSMTPSession.isRelayingAllowed()public boolean isAuthRequired()
SMTPSession
isAuthRequired in interface SMTPSessionSMTPSession.isAuthRequired()public boolean useHeloEhloEnforcement()
SMTPSession
useHeloEhloEnforcement in interface SMTPSessionSMTPSession.useHeloEhloEnforcement()public java.lang.String getUser()
SMTPSession
getUser in interface SMTPSessionSMTPSession.getUser()public void setUser(java.lang.String userID)
SMTPSession
setUser in interface SMTPSessionorg.apache.james.smtpserver.SMTPSession#setUser()public java.lang.StringBuffer getResponseBuffer()
SMTPSession
getResponseBuffer in interface SMTPSessionSMTPSession.getResponseBuffer()public java.lang.String clearResponseBuffer()
SMTPSession
clearResponseBuffer in interface SMTPSessionSMTPSession.clearResponseBuffer()
public final java.lang.String readCommandLine()
throws java.io.IOException
SMTPSession
readCommandLine in interface SMTPSessionjava.io.IOException - if an exception is generated reading in the input charactersSMTPSession.readCommandLine()public Watchdog getWatchdog()
SMTPSession
getWatchdog in interface SMTPSessionSMTPSession.getWatchdog()public java.io.InputStream getInputStream()
SMTPSession
getInputStream in interface SMTPSessionSMTPSession.getInputStream()public java.lang.String getSessionID()
SMTPSession
getSessionID in interface SMTPSessionSMTPSession.getSessionID()public void abortMessage()
SMTPSession
abortMessage in interface SMTPSessionSMTPSession.abortMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||