|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.abstracthorizon.mercury.imap.IMAPConnectionHandler
public class IMAPConnectionHandler
A class for IMAP service
Field Summary | |
---|---|
protected boolean |
allowInsecure
Allow insecure connections |
protected IMAPCommandFactory |
factory
Command factory |
protected org.slf4j.Logger |
logger
Logger |
protected char[] |
passPhrase
Keystore pass phrase |
protected javax.mail.Session |
session
Session |
protected StorageManager |
storageManager
Storage manager |
protected javax.mail.Store |
store
Selected store |
protected Executor |
threadPool
Thread pool |
Constructor Summary | |
---|---|
IMAPConnectionHandler()
Constructor |
Method Summary | |
---|---|
boolean |
commandAny(IMAPSession imapConnection)
Processes any command |
boolean |
commandAuth(IMAPSession imapConnection)
Processes authorised commands |
boolean |
commandNonAuth(IMAPSession imapConnection)
Processes non-authorised comamnds |
boolean |
commandSelected(IMAPSession imapConnection)
Processes select command |
IMAPCommandFactory |
getFactory()
Returns command factory |
javax.mail.Session |
getJavaMailSession()
Returns javamail session that is used |
InputStream |
getKeyStoreInputStream()
Returns keystore as an input stream |
char[] |
getPassPhrase()
Returns pass phrase of a keystore to be used for switching to TLS |
StorageManager |
getStorageManager()
Returns storage manager |
Executor |
getThreadPool()
Returns thread pool to be used for parallel tasks |
void |
handleConnection(org.abstracthorizon.danube.connection.Connection connection)
Handles IMAP connection |
void |
invokeCommand(IMAPSession imapConnection,
String name)
Invokes command |
void |
invokeCommand(IMAPSession imapConnection,
String name,
boolean uid)
Invokes command |
boolean |
isInsecureAllowed()
Returns if insecure connections are allowed |
void |
processInput(IMAPSession imapConnection)
Processes input |
void |
setInsecureAllowed(boolean allowInsecure)
Sets if insecure connections are allowed |
void |
setJavaMailSession(javax.mail.Session session)
Sets javamail session that to be used |
void |
setPassPhrase(char[] passPhrase)
Sets pass phrase of a keystore to be used for switching to TLS |
void |
setStorageManager(StorageManager storageManager)
Sets storage manager |
void |
setThreadPool(Executor executor)
Sets thread pool to be used for parallel tasks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.slf4j.Logger logger
protected StorageManager storageManager
protected javax.mail.Store store
protected IMAPCommandFactory factory
protected javax.mail.Session session
protected Executor threadPool
protected char[] passPhrase
protected boolean allowInsecure
Constructor Detail |
---|
public IMAPConnectionHandler()
Method Detail |
---|
public void setStorageManager(StorageManager storageManager)
storageManager
- storage managerpublic StorageManager getStorageManager()
public IMAPCommandFactory getFactory()
public javax.mail.Session getJavaMailSession()
public void setJavaMailSession(javax.mail.Session session)
session
- javamail session that to be usedpublic void setThreadPool(Executor executor)
executor
- thread poolpublic Executor getThreadPool()
public InputStream getKeyStoreInputStream()
public void setPassPhrase(char[] passPhrase)
passPhrase
- password of a keystorepublic char[] getPassPhrase()
public boolean isInsecureAllowed()
public void setInsecureAllowed(boolean allowInsecure)
allowInsecure
- is insecure connection allowedpublic void handleConnection(org.abstracthorizon.danube.connection.Connection connection)
handleConnection
in interface org.abstracthorizon.danube.connection.ConnectionHandler
connection
- connectionpublic void processInput(IMAPSession imapConnection) throws IOException
imapConnection
- imap connection
IOException
public void invokeCommand(IMAPSession imapConnection, String name) throws IOException
imapConnection
- imap connectionname
- comamnd name
IOException
public void invokeCommand(IMAPSession imapConnection, String name, boolean uid) throws IOException
imapConnection
- imap connectionname
- command nameuid
- is UID function
IOException
public boolean commandAny(IMAPSession imapConnection) throws IOException
imapConnection
- imap connection
IOException
public boolean commandNonAuth(IMAPSession imapConnection) throws IOException
imapConnection
- imap connection
IOException
public boolean commandAuth(IMAPSession imapConnection) throws IOException
imapConnection
- imap connection
IOException
public boolean commandSelected(IMAPSession imapConnection) throws IOException
imapConnection
- imap connection
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |