org.opencrx.application.imap
Class IMAPSession
java.lang.Object
org.opencrx.application.adapter.AbstractSession
org.opencrx.application.imap.IMAPSession
- All Implemented Interfaces:
- Runnable
public class IMAPSession
- extends AbstractSession
|
Method Summary |
protected void |
getBodyAsRFC822(MimePart part,
boolean ignoreHeaders,
QuotaByteArrayOutputStream out)
|
protected int |
getBodyLength(MimePart part,
boolean ignoreHeaders)
|
List<String> |
getFetchCommands(String fetchParams)
|
protected String |
getMessageFlags(Message message)
|
boolean |
handleCommand(String tag,
String command,
String params)
process the command and send a response if appropriate... |
boolean |
isConnected()
|
protected void |
print(String s)
|
protected void |
printAddresses(Address[] addresses,
int max)
|
protected void |
printBodyPartStructure(BodyPart part)
|
protected void |
printBytes(QuotaByteArrayOutputStream bytes)
|
protected void |
printList(String[] values,
boolean nested)
|
protected void |
println(String s)
|
protected void |
printMessageStructure(Message message)
|
boolean |
processFetchCommand(String params,
MimeMessage message,
int count)
|
void |
run()
|
void |
unrecognizedCommand(String tag,
String command)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOT_AUTHENTICATED_STATE
public static final int NOT_AUTHENTICATED_STATE
- See Also:
- Constant Field Values
AUTHENTICATED_STATE
public static final int AUTHENTICATED_STATE
- See Also:
- Constant Field Values
SELECTED_STATE
public static final int SELECTED_STATE
- See Also:
- Constant Field Values
LOGOUT_STATE
public static final int LOGOUT_STATE
- See Also:
- Constant Field Values
MAX_ACTIVITY_NUMBER
public static final long MAX_ACTIVITY_NUMBER
- See Also:
- Constant Field Values
out
protected OutputStream out
in
protected InputStream in
state
protected int state
selectedFolder
protected IMAPFolderImpl selectedFolder
availableFolders
protected Map<String,String> availableFolders
refreshFoldersAt
protected long refreshFoldersAt
IMAPSession
public IMAPSession(Socket client,
AbstractServer server)
run
public void run()
handleCommand
public boolean handleCommand(String tag,
String command,
String params)
throws MessagingException
- process the command and send a response if appropriate...
- Parameters:
line -
- Throws:
MessagingException
unrecognizedCommand
public void unrecognizedCommand(String tag,
String command)
getFetchCommands
public List<String> getFetchCommands(String fetchParams)
getBodyAsRFC822
protected void getBodyAsRFC822(MimePart part,
boolean ignoreHeaders,
QuotaByteArrayOutputStream out)
getBodyLength
protected int getBodyLength(MimePart part,
boolean ignoreHeaders)
getMessageFlags
protected String getMessageFlags(Message message)
throws MessagingException
- Throws:
MessagingException
processFetchCommand
public boolean processFetchCommand(String params,
MimeMessage message,
int count)
throws MessagingException
- Throws:
MessagingException
println
protected void println(String s)
print
protected void print(String s)
printBytes
protected void printBytes(QuotaByteArrayOutputStream bytes)
printList
protected void printList(String[] values,
boolean nested)
printMessageStructure
protected void printMessageStructure(Message message)
throws MessagingException
- Throws:
MessagingException
printBodyPartStructure
protected void printBodyPartStructure(BodyPart part)
throws MessagingException
- Throws:
MessagingException
printAddresses
protected void printAddresses(Address[] addresses,
int max)
isConnected
public boolean isConnected()
This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.