|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImapSession
Encapsulates all state held for an ongoing Imap session, which commences when a client first establishes a connection to the Imap server, and continues until that connection is closed.
Method Summary | |
---|---|
void |
closeConnection()
Closes the connection for this session. |
void |
closeConnection(String byeMessage)
|
void |
deselect()
Moves the session out of ImapSessionState.SELECTED state and back into
ImapSessionState.AUTHENTICATED state. |
String |
getClientHostname()
|
String |
getClientIP()
|
ImapHostManager |
getHost()
Provides the Imap host for this server, which is used for all access to mail storage and subscriptions. |
ImapSessionFolder |
getSelected()
Provides the selected mailbox for this session, or null if this
session is not in ImapSessionState.SELECTED state. |
ImapSessionState |
getState()
|
GreenMailUser |
getUser()
Provides the authenticated user for this session, or null if this
session is not in ImapSessionState.AUTHENTICATED or
ImapSessionState.SELECTED state. |
UserManager |
getUserManager()
Provides the UserManager for this session, to allow session to validate logins. |
void |
setAuthenticated(GreenMailUser user)
Moves the session into ImapSessionState.AUTHENTICATED state with
the supplied user. |
void |
setSelected(MailFolder folder,
boolean readOnly)
Moves this session into ImapSessionState.SELECTED state and sets the
supplied mailbox to be the currently selected mailbox. |
void |
unsolicitedResponses(ImapResponse response)
Sends any unsolicited responses to the client, such as EXISTS and FLAGS responses when the selected mailbox is modified by another user. |
void |
unsolicitedResponses(ImapResponse request,
boolean omitExpunged)
|
Method Detail |
---|
void unsolicitedResponses(ImapResponse response) throws FolderException
response
- The response to write to
FolderException
void closeConnection()
void closeConnection(String byeMessage)
ImapHostManager getHost()
UserManager getUserManager()
String getClientHostname()
String getClientIP()
ImapSessionState getState()
void setAuthenticated(GreenMailUser user)
ImapSessionState.AUTHENTICATED
state with
the supplied user.
user
- The user who is authenticated for this session.GreenMailUser getUser()
null
if this
session is not in ImapSessionState.AUTHENTICATED
or
ImapSessionState.SELECTED
state.
void setSelected(MailFolder folder, boolean readOnly)
ImapSessionState.SELECTED
state and sets the
supplied mailbox to be the currently selected mailbox.
folder
- The selected mailbox.readOnly
- If true
, the selection is set to be read only.void deselect()
ImapSessionState.SELECTED
state and back into
ImapSessionState.AUTHENTICATED
state. The selected mailbox is cleared.
ImapSessionFolder getSelected()
null
if this
session is not in ImapSessionState.SELECTED
state.
void unsolicitedResponses(ImapResponse request, boolean omitExpunged) throws FolderException
FolderException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |