com.funambol.email.transport
Class PopMailServerWrapper
java.lang.Object
com.funambol.email.transport.CommonMailServerWrapper
com.funambol.email.transport.PopMailServerWrapper
- All Implemented Interfaces:
- IMailServerWrapper
- public class PopMailServerWrapper
- extends CommonMailServerWrapper
- implements IMailServerWrapper
Create a connection with a Mail Server
Field Summary |
com.sun.mail.pop3.POP3Folder |
folderInboxOpened
|
javax.mail.Message[] |
messagesInboxOpened
used in the getMessageByUID method. in the POP protocol
there is no the method "folder.getMessageByUID(String)
At the end of the sync session the server calls the getSyncItem
In this method we open and close the folder every time.
|
Method Summary |
com.sun.mail.pop3.POP3Folder |
getInboxFolder()
returns Inbox Folder Instance |
void |
openConnection(java.lang.String serverType,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
DefaultFolder df,
java.lang.String user,
java.lang.String password,
boolean isSSL,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
opens the connection with the mail server |
void |
releaseConnection()
closes the connection with the mail server |
protected void |
setConnectionNormal(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort)
|
protected void |
setConnectionSSL(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messagesInboxOpened
public javax.mail.Message[] messagesInboxOpened
- used in the getMessageByUID method. in the POP protocol
there is no the method "folder.getMessageByUID(String)
At the end of the sync session the server calls the getSyncItem
In this method we open and close the folder every time.
Using this propreties we can leave the folder open for alle the
calls to the getSyncItem method.
In the EndSync we close this folder if it's open
folderInboxOpened
public com.sun.mail.pop3.POP3Folder folderInboxOpened
PopMailServerWrapper
public PopMailServerWrapper()
openConnection
public void openConnection(java.lang.String serverType,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
DefaultFolder df,
java.lang.String user,
java.lang.String password,
boolean isSSL,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
throws EmailAccessException
- opens the connection with the mail server
- Specified by:
openConnection
in interface IMailServerWrapper
- Specified by:
openConnection
in class CommonMailServerWrapper
- Parameters:
serverType
- Server TypeoutgoingServer
- SMPT address i.e. 192.168.0.1outgoingPort
- 25 def.incomingServer
- POP3 address i.e. 192.168.0.1incomingPort
- 110 / 995 POP3 def.df
- inbox, outbox, sent items,...user
- Stringpassword
- StringisSSL
- boolean
- Throws:
EmailAccessException
releaseConnection
public void releaseConnection()
throws EmailAccessException
- closes the connection with the mail server
- Specified by:
releaseConnection
in interface IMailServerWrapper
- Specified by:
releaseConnection
in class CommonMailServerWrapper
- Throws:
EmailAccessException
getInboxFolder
public com.sun.mail.pop3.POP3Folder getInboxFolder()
throws EmailAccessException
- returns Inbox Folder Instance
- Returns:
- POP3Folder
- Throws:
EmailAccessException
setConnectionSSL
protected void setConnectionSSL(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
- Specified by:
setConnectionSSL
in class CommonMailServerWrapper
- Parameters:
props
- PropertiesoutgoingServer
- StringoutgoingPort
- StringincomingServer
- StringincomingPort
- Stringprovider
- Provider
setConnectionNormal
protected void setConnectionNormal(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort)
- Specified by:
setConnectionNormal
in class CommonMailServerWrapper
- Parameters:
props
- PropertiesoutgoingServer
- StringoutgoingPort
- StringincomingServer
- StringincomingPort
- String
Copyright © 2003-2006 Funambol.