org.apache.james.pop3server
Interface POP3Session

All Known Implementing Classes:
POP3Handler

public interface POP3Session

All the handlers access this interface to communicate with POP3Handler object


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
 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
 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 setBackupUserMailbox(java.util.List backupUserMailbox)
          Sets a new backup mailbox content
 void setHandlerState(int handlerState)
          Sets the new handler state
 void setUser(java.lang.String user)
          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
 

Method Detail

writeResponse

void writeResponse(java.lang.String respString)
Writes response string to the client

Parameters:
respString - String that needs to send to the client

readCommandLine

java.lang.String readCommandLine()
                                 throws java.io.IOException
Reads a line of characters off the command line.

Returns:
the trimmed input line
Throws:
java.io.IOException - if an exception is generated reading in the input characters

getResponseBuffer

java.lang.StringBuffer getResponseBuffer()
Returns ResponseBuffer, this optimizes the unecessary creation of resources by each handler object

Returns:
responseBuffer

clearResponseBuffer

java.lang.String clearResponseBuffer()
Clears the response buffer, returning the String of characters in the buffer.

Returns:
the data in the response buffer

getCommandName

java.lang.String getCommandName()
Returns currently process command name

Returns:
current command name

getCommandArgument

java.lang.String getCommandArgument()
Returns currently process command argument

Returns:
current command argument

getRemoteHost

java.lang.String getRemoteHost()
Returns host name of the client

Returns:
hostname of the client

getRemoteIPAddress

java.lang.String getRemoteIPAddress()
Returns host ip address of the client

Returns:
host ip address of the client

endSession

void endSession()
this makes the session to close


isSessionEnded

boolean isSessionEnded()
Returns the session status

Returns:
if the session is open or closed

getState

java.util.HashMap getState()
Returns Map that consists of the state of the POP3Session

Returns:
map of the current POP3Session state

resetState

void resetState()
Resets message-specific, but not authenticated user, state.


getConfigurationData

POP3HandlerConfigurationData getConfigurationData()
Returns POP3Handler service wide configuration

Returns:
POP3HandlerConfigurationData

getUser

java.lang.String getUser()
Returns the user name associated with this POP3 interaction.

Returns:
the user name

setUser

void setUser(java.lang.String user)
Sets the user name associated with this POP3 interaction.

Parameters:
user - the user name

getWatchdog

Watchdog getWatchdog()
Returns Watchdog object used for handling timeout

Returns:
Watchdog object

getHandlerState

int getHandlerState()
Returns the current handler state

Returns:
handler state

setHandlerState

void setHandlerState(int handlerState)
Sets the new handler state

Parameters:
handlerState - state

getUserInbox

MailRepository getUserInbox()
Returns the current user inbox

Returns:
MailRepository

setUserInbox

void setUserInbox(MailRepository userInbox)
Sets the user's mail repository

Parameters:
userInbox - userInbox

getUserMailbox

java.util.List getUserMailbox()
Returns the mail list contained in the mailbox

Returns:
mailbox content

setUserMailbox

void setUserMailbox(java.util.List userMailbox)
Sets a new mailbox content

Parameters:
userMailbox - mailbox

getBackupUserMailbox

java.util.List getBackupUserMailbox()
Returns the backup mailbox

Returns:
list backup

setBackupUserMailbox

void setBackupUserMailbox(java.util.List backupUserMailbox)
Sets a new backup mailbox content

Parameters:
backupUserMailbox - the mailbox backup

getOutputStream

java.io.OutputStream getOutputStream()
Returns the raw output stream

Returns:
the raw outputstream


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.