|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icegreen.greenmail.imap.ImapSessionImpl
public final class ImapSessionImpl
Constructor Summary | |
---|---|
ImapSessionImpl(ImapHostManager imapHost,
UserManager users,
ImapHandler handler,
String clientHostName,
String clientAddress)
|
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. |
boolean |
selectedIsReadOnly()
|
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 request)
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 response,
boolean omitExpunged)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImapSessionImpl(ImapHostManager imapHost, UserManager users, ImapHandler handler, String clientHostName, String clientAddress)
Method Detail |
---|
public ImapHostManager getHost()
ImapSession
getHost
in interface ImapSession
public void unsolicitedResponses(ImapResponse request) throws FolderException
ImapSession
unsolicitedResponses
in interface ImapSession
request
- The response to write to
FolderException
public void unsolicitedResponses(ImapResponse response, boolean omitExpunged) throws FolderException
unsolicitedResponses
in interface ImapSession
FolderException
public void closeConnection(String byeMessage)
closeConnection
in interface ImapSession
public void closeConnection()
ImapSession
closeConnection
in interface ImapSession
public UserManager getUserManager()
ImapSession
getUserManager
in interface ImapSession
public String getClientHostname()
getClientHostname
in interface ImapSession
public String getClientIP()
getClientIP
in interface ImapSession
public void setAuthenticated(GreenMailUser user)
ImapSession
ImapSessionState.AUTHENTICATED
state with
the supplied user.
setAuthenticated
in interface ImapSession
user
- The user who is authenticated for this session.public GreenMailUser getUser()
ImapSession
null
if this
session is not in ImapSessionState.AUTHENTICATED
or
ImapSessionState.SELECTED
state.
getUser
in interface ImapSession
public void deselect()
ImapSession
ImapSessionState.SELECTED
state and back into
ImapSessionState.AUTHENTICATED
state. The selected mailbox is cleared.
deselect
in interface ImapSession
public void setSelected(MailFolder folder, boolean readOnly)
ImapSession
ImapSessionState.SELECTED
state and sets the
supplied mailbox to be the currently selected mailbox.
setSelected
in interface ImapSession
folder
- The selected mailbox.readOnly
- If true
, the selection is set to be read only.public ImapSessionFolder getSelected()
ImapSession
null
if this
session is not in ImapSessionState.SELECTED
state.
getSelected
in interface ImapSession
public boolean selectedIsReadOnly()
public ImapSessionState getState()
getState
in interface ImapSession
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |