|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.pop3server.POP3Handler
public class POP3Handler
The handler class for POP3 connections.
| Constructor Summary | |
|---|---|
POP3Handler()
|
|
| Method Summary | |
|---|---|
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.util.List |
getBackupUserMailbox()
Returns the backup mailbox |
java.lang.String |
getCommandArgument()
Returns currently process command argument |
java.lang.String |
getCommandName()
Returns currently process command name |
POP3HandlerConfigurationData |
getConfigurationData()
Returns POP3Handler service wide configuration |
int |
getHandlerState()
Returns the current handler state |
java.io.OutputStream |
getOutputStream()
Returns the raw output stream |
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.util.HashMap |
getState()
Returns Map that consists of the state of the POP3Session |
java.lang.String |
getUser()
Returns the user name associated with this POP3 interaction. |
MailRepository |
getUserInbox()
Returns the current user inbox |
java.util.List |
getUserMailbox()
Returns the mail list contained in the mailbox |
Watchdog |
getWatchdog()
Returns Watchdog object used for handling timeout |
void |
handleProtocol()
Handle the protocol |
boolean |
isSessionEnded()
Returns the session status |
java.lang.String |
readCommandLine()
Reads a line of characters off the command line. |
void |
resetHandler()
Resets the handler data to a basic state. |
void |
resetState()
Resets message-specific, but not authenticated user, state. |
void |
setBackupUserMailbox(java.util.List backupUserMailbox)
Sets a new backup mailbox content |
void |
setConfigurationData(java.lang.Object theData)
Set the configuration data for the handler. |
void |
setHandlerChain(POP3HandlerChain handlerChain)
Sets the POP3HandlerChain |
void |
setHandlerState(int handlerState)
Sets the new handler state |
void |
setProtocolHandlerHelper(ProtocolHandlerHelper phh)
Injects the ProtocolHandlerHelper service |
void |
setUser(java.lang.String userID)
Sets the user name associated with this POP3 interaction. |
void |
setUserInbox(MailRepository userInbox)
Sets the user's mail repository |
void |
setUserMailbox(java.util.List userMailbox)
Sets a new mailbox content |
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 POP3Handler()
| Method Detail |
|---|
public void setConfigurationData(java.lang.Object theData)
setConfigurationData in interface ProtocolHandlertheData - the configuration data
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 errorHandler(java.lang.RuntimeException e)
ProtocolHandler
errorHandler in interface ProtocolHandlere - exceptionAbstractJamesHandler.errorHandler(java.lang.RuntimeException)public void resetHandler()
resetHandler in interface ProtocolHandler
public final java.lang.String readCommandLine()
throws java.io.IOException
readCommandLine in interface POP3Sessionjava.io.IOException - if an exception is generated reading in the input characterspublic java.lang.String getRemoteHost()
POP3Session
getRemoteHost in interface POP3SessionPOP3Session.getRemoteHost()public java.lang.String getRemoteIPAddress()
POP3Session
getRemoteIPAddress in interface POP3SessionPOP3Session.getRemoteIPAddress()public void endSession()
POP3Session
endSession in interface POP3SessionPOP3Session.endSession()public boolean isSessionEnded()
POP3Session
isSessionEnded in interface POP3SessionPOP3Session.isSessionEnded()public void resetState()
POP3Session
resetState in interface POP3SessionPOP3Session.resetState()public java.util.HashMap getState()
POP3Session
getState in interface POP3SessionPOP3Session.getState()public java.lang.String getUser()
POP3Session
getUser in interface POP3SessionPOP3Session.getUser()public void setUser(java.lang.String userID)
POP3Session
setUser in interface POP3SessionuserID - the user namePOP3Session.setUser(java.lang.String)public java.lang.StringBuffer getResponseBuffer()
POP3Session
getResponseBuffer in interface POP3SessionPOP3Session.getResponseBuffer()public java.lang.String clearResponseBuffer()
POP3Session
clearResponseBuffer in interface POP3SessionPOP3Session.clearResponseBuffer()public Watchdog getWatchdog()
POP3Session
getWatchdog in interface POP3SessionPOP3Session.getWatchdog()public void setHandlerChain(POP3HandlerChain handlerChain)
handlerChain - POP3Handler objectpublic void writeResponse(java.lang.String respString)
POP3Session
writeResponse in interface POP3SessionrespString - String that needs to send to the clientPOP3Session.writeResponse(java.lang.String)public java.lang.String getCommandName()
POP3Session
getCommandName in interface POP3SessionPOP3Session.getCommandName()public java.lang.String getCommandArgument()
POP3Session
getCommandArgument in interface POP3SessionPOP3Session.getCommandArgument()public POP3HandlerConfigurationData getConfigurationData()
POP3Session
getConfigurationData in interface POP3SessionPOP3Session.getConfigurationData()public int getHandlerState()
POP3Session
getHandlerState in interface POP3SessionPOP3Session.getHandlerState()public void setHandlerState(int handlerState)
POP3Session
setHandlerState in interface POP3SessionhandlerState - statePOP3Session.setHandlerState(int)public MailRepository getUserInbox()
POP3Session
getUserInbox in interface POP3SessionPOP3Session.getUserInbox()public void setUserInbox(MailRepository userInbox)
POP3Session
setUserInbox in interface POP3SessionuserInbox - userInboxPOP3Session.setUserInbox(org.apache.james.services.MailRepository)public java.util.List getUserMailbox()
POP3Session
getUserMailbox in interface POP3SessionPOP3Session.getUserMailbox()public void setUserMailbox(java.util.List userMailbox)
POP3Session
setUserMailbox in interface POP3SessionuserMailbox - mailboxPOP3Session.setUserMailbox(java.util.List)public java.util.List getBackupUserMailbox()
POP3Session
getBackupUserMailbox in interface POP3SessionPOP3Session.getBackupUserMailbox()public void setBackupUserMailbox(java.util.List backupUserMailbox)
POP3Session
setBackupUserMailbox in interface POP3SessionbackupUserMailbox - the mailbox backupPOP3Session.setUserMailbox(List)public java.io.OutputStream getOutputStream()
POP3Session
getOutputStream in interface POP3SessionPOP3Session.getOutputStream()public void setProtocolHandlerHelper(ProtocolHandlerHelper phh)
ProtocolHandler
setProtocolHandlerHelper in interface ProtocolHandlerphh - serviceProtocolHandler.setProtocolHandlerHelper(org.apache.james.socket.ProtocolHandlerHelper)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||