public class IMAPSession extends AbstractSession
Modifier and Type | Class and Description |
---|---|
static class |
IMAPSession.SessionState
SessionState.
|
Modifier and Type | Field and Description |
---|---|
protected InputStream |
in |
static long |
MAX_ACTIVITY_NUMBER |
protected OutputStream |
out |
protected IMAPFolderImpl |
selectedFolder |
protected IMAPSession.SessionState |
state |
PASSWORD_ENCODING_ALGORITHM, segmentName, server, socket, username
Constructor and Description |
---|
IMAPSession(Socket client,
AbstractServer server)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
getBodyAsRFC822(javax.mail.internet.MimePart part,
boolean ignoreHeaders,
org.openmdx.base.io.QuotaByteArrayOutputStream out)
Get mime body part as RFC822 stream.
|
protected int |
getBodyLength(javax.mail.internet.MimePart part,
boolean ignoreHeaders)
Get body length.
|
List<String> |
getFetchCommands(String fetchParams)
Parse fetch commands.
|
protected String |
getMessageFlags(javax.mail.Message message)
Get message flags.
|
boolean |
handleCommand(String tag,
String command,
String params)
Process the command and send a response if appropriate...
|
boolean |
isConnected()
Return true if socket is connected.
|
protected void |
print(String s)
Output string to response stream.
|
protected void |
printAddresses(javax.mail.Address[] addresses,
int max)
Print addresses to response stream.
|
protected void |
printBodyPartStructure(javax.mail.BodyPart part)
Print mime body part to response stream.
|
protected void |
printBytes(org.openmdx.base.io.QuotaByteArrayOutputStream bytes)
Print bytes to response stream.
|
protected void |
printList(String[] values,
boolean nested)
Print string list to response stream.
|
protected void |
println(String s)
Output string to response stream.
|
protected void |
printMessageStructure(javax.mail.Message message)
Print mime message to response stream.
|
boolean |
processFetchCommand(String params,
javax.mail.internet.MimeMessage message,
int count)
Process fetch command.
|
void |
run() |
void |
unrecognizedCommand(String tag,
String command)
Unrecognized command.
|
login, logout, newPersistenceManager, stop
public static final long MAX_ACTIVITY_NUMBER
protected OutputStream out
protected InputStream in
protected IMAPSession.SessionState state
protected IMAPFolderImpl selectedFolder
public IMAPSession(Socket client, AbstractServer server)
client
- server
- public void run()
public boolean handleCommand(String tag, String command, String params) throws javax.mail.MessagingException
tag
- command
- params
- javax.mail.MessagingException
public void unrecognizedCommand(String tag, String command)
tag
- command
- public List<String> getFetchCommands(String fetchParams)
fetchParams
- protected void getBodyAsRFC822(javax.mail.internet.MimePart part, boolean ignoreHeaders, org.openmdx.base.io.QuotaByteArrayOutputStream out)
part
- ignoreHeaders
- out
- protected int getBodyLength(javax.mail.internet.MimePart part, boolean ignoreHeaders)
part
- ignoreHeaders
- protected String getMessageFlags(javax.mail.Message message) throws javax.mail.MessagingException
message
- javax.mail.MessagingException
public boolean processFetchCommand(String params, javax.mail.internet.MimeMessage message, int count) throws javax.mail.MessagingException
params
- message
- count
- javax.mail.MessagingException
protected void println(String s)
s
- protected void print(String s)
s
- protected void printBytes(org.openmdx.base.io.QuotaByteArrayOutputStream bytes)
bytes
- protected void printList(String[] values, boolean nested)
values
- nested
- protected void printMessageStructure(javax.mail.Message message) throws javax.mail.MessagingException
message
- javax.mail.MessagingException
protected void printBodyPartStructure(javax.mail.BodyPart part) throws javax.mail.MessagingException
part
- javax.mail.MessagingException
protected void printAddresses(javax.mail.Address[] addresses, int max)
addresses
- max
- public boolean isConnected()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.