|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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, CURRENT_HELO_NAME, CURRENT_RECIPIENT, 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 |
void |
errorHandler(java.lang.RuntimeException e)
Provides errorHandling |
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.util.Map |
getConnectionState()
Returns Map that consists of the state of the SMTPSession per connection |
java.io.InputStream |
getInputStream()
Returns Inputstream for handling messages and commands |
org.apache.mailet.Mail |
getMail()
Returns Mail object for message handlers to process |
int |
getRcptCount()
Returns the recipient count |
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.Map |
getState()
Returns Map that consists of the state of the SMTPSession per mail |
boolean |
getStopHandlerProcessing()
Return if handlerprocessing should be stopped |
java.lang.String |
getUser()
Returns the user name associated with this SMTP interaction. |
Watchdog |
getWatchdog()
Returns Watchdog object used for handling timeout |
void |
handleProtocol()
Handle the protocol |
boolean |
isAuthRequired()
Returns whether Authentication is required or not |
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 |
resetConnectionState()
Reset the Connection state |
void |
resetHandler()
Resets the handler data to a basic state. |
void |
resetState()
Resets message-specific, but not authenticated user, state. |
void |
setConfigurationData(java.lang.Object theData)
Set the configuration data for the handler |
void |
setHandlerChain(SMTPHandlerChain handlerChain)
Sets the SMTPHandlerChain |
void |
setMail(org.apache.mailet.Mail mail)
Sets the MailImpl object for further processing |
void |
setProtocolHandlerHelper(ProtocolHandlerHelper phh)
Injects the ProtocolHandlerHelper service |
void |
setRelayingAllowed(boolean relayingAllowed)
Set if reallying is allowed |
void |
setStopHandlerProcessing(boolean stopHandlerProcessing)
Set to true if the handlerprocessing should be stopped |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SMTPHandler()
| Method Detail |
|---|
public void setConfigurationData(java.lang.Object theData)
setConfigurationData in interface ProtocolHandlertheData - the per-service configuration data for this handler
public void handleProtocol()
throws java.io.IOException
ProtocolHandler
handleProtocol in interface ProtocolHandlerjava.io.IOException - get thrown if an IO error is detectedAbstractJamesHandler.handleProtocol()public void resetHandler()
resetHandler in interface ProtocolHandlerpublic 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 org.apache.mailet.Mail getMail()
SMTPSession
getMail in interface SMTPSessionSMTPSession.getMail()public void setMail(org.apache.mailet.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.Map getState()
SMTPSession
getState in interface SMTPSessionSMTPSession.getState()public SMTPHandlerConfigurationData getConfigurationData()
SMTPSession
getConfigurationData in interface SMTPSessionSMTPSession.getConfigurationData()public boolean isRelayingAllowed()
SMTPSession
isRelayingAllowed in interface SMTPSessionSMTPSession.isRelayingAllowed()public void setRelayingAllowed(boolean relayingAllowed)
SMTPSession
setRelayingAllowed in interface SMTPSessionSMTPSession.setRelayingAllowed(boolean relayingAllowed)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 SMTPSessionuserID - the user nameSMTPSession.setUser(String)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()public int getRcptCount()
SMTPSession
getRcptCount in interface SMTPSessionSMTPSession.getRcptCount()public void setStopHandlerProcessing(boolean stopHandlerProcessing)
SMTPSession
setStopHandlerProcessing in interface SMTPSessionstopHandlerProcessing - true or falseSMTPSession.setStopHandlerProcessing(boolean)public boolean getStopHandlerProcessing()
SMTPSession
getStopHandlerProcessing in interface SMTPSessionSMTPSession.getStopHandlerProcessing()public void resetConnectionState()
SMTPSession
resetConnectionState in interface SMTPSessionpublic java.util.Map getConnectionState()
SMTPSession
getConnectionState in interface SMTPSessionpublic void setProtocolHandlerHelper(ProtocolHandlerHelper phh)
ProtocolHandler
setProtocolHandlerHelper in interface ProtocolHandlerphh - servicepublic void errorHandler(java.lang.RuntimeException e)
ProtocolHandler
errorHandler in interface ProtocolHandlere - exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||