|
||||||||||
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 ProtocolHandler
theData
- the per-service configuration data for this handlerpublic void handleProtocol() throws java.io.IOException
ProtocolHandler
handleProtocol
in interface ProtocolHandler
java.io.IOException
- get thrown if an IO error is detectedAbstractJamesHandler.handleProtocol()
public void resetHandler()
resetHandler
in interface ProtocolHandler
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 org.apache.mailet.Mail getMail()
SMTPSession
getMail
in interface SMTPSession
SMTPSession.getMail()
public void setMail(org.apache.mailet.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.Map getState()
SMTPSession
getState
in interface SMTPSession
SMTPSession.getState()
public SMTPHandlerConfigurationData getConfigurationData()
SMTPSession
getConfigurationData
in interface SMTPSession
SMTPSession.getConfigurationData()
public boolean isRelayingAllowed()
SMTPSession
isRelayingAllowed
in interface SMTPSession
SMTPSession.isRelayingAllowed()
public void setRelayingAllowed(boolean relayingAllowed)
SMTPSession
setRelayingAllowed
in interface SMTPSession
SMTPSession.setRelayingAllowed(boolean relayingAllowed)
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
userID
- the user nameSMTPSession.setUser(String)
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()
public int getRcptCount()
SMTPSession
getRcptCount
in interface SMTPSession
SMTPSession.getRcptCount()
public void setStopHandlerProcessing(boolean stopHandlerProcessing)
SMTPSession
setStopHandlerProcessing
in interface SMTPSession
stopHandlerProcessing
- true or falseSMTPSession.setStopHandlerProcessing(boolean)
public boolean getStopHandlerProcessing()
SMTPSession
getStopHandlerProcessing
in interface SMTPSession
SMTPSession.getStopHandlerProcessing()
public void resetConnectionState()
SMTPSession
resetConnectionState
in interface SMTPSession
public java.util.Map getConnectionState()
SMTPSession
getConnectionState
in interface SMTPSession
public void setProtocolHandlerHelper(ProtocolHandlerHelper phh)
ProtocolHandler
setProtocolHandlerHelper
in interface ProtocolHandler
phh
- servicepublic void errorHandler(java.lang.RuntimeException e)
ProtocolHandler
errorHandler
in interface ProtocolHandler
e
- exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |