com.funambol.email.inboxlistener.engine
Class MailboxManager

java.lang.Object
  extended by java.lang.Thread
      extended by com.funambol.email.inboxlistener.engine.MailboxManager
All Implemented Interfaces:
java.lang.Runnable

public class MailboxManager
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  com.funambol.framework.logging.FunambolLogger log
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MailboxManager(boolean _startupNotification, boolean _saveSubject, boolean _saveSender, MailServerAccount _msa, WSAccount _wsa)
           
 
Method Summary
 void closeMailServerConnection()
          close the Mail Server Connection
 void run()
          this thread is not always connected to the mailbox.
 void setInPort(int _inPort)
           
 void setInServer(java.lang.String _inServer)
           
 void setIsSSLIn(boolean _isSSLIn)
           
 void setKeystorePath(java.lang.String _keystorePath)
           
 void setKeystorePwd(java.lang.String _keystorePwd)
           
 void setMaxEmailNumber(int _maxEmailNumber)
           
 void setPassword(java.lang.String _password)
           
 void setProtocol(java.lang.String _protocol)
           
 void setPush(boolean _push)
           
 void stopThread()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected com.funambol.framework.logging.FunambolLogger log
Constructor Detail

MailboxManager

public MailboxManager(boolean _startupNotification,
                      boolean _saveSubject,
                      boolean _saveSender,
                      MailServerAccount _msa,
                      WSAccount _wsa)
Method Detail

run

public void run()
this thread is not always connected to the mailbox. every X seconds (interval) it starts a connection and read the ids in the inbox folder; then compares the previous time read ids. If there are new mails call the Sync4j AdminManager web service in order to trigger the push message

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

setMaxEmailNumber

public void setMaxEmailNumber(int _maxEmailNumber)

setPassword

public void setPassword(java.lang.String _password)

setPush

public void setPush(boolean _push)

setProtocol

public void setProtocol(java.lang.String _protocol)

setInServer

public void setInServer(java.lang.String _inServer)

setInPort

public void setInPort(int _inPort)

setIsSSLIn

public void setIsSSLIn(boolean _isSSLIn)

setKeystorePath

public void setKeystorePath(java.lang.String _keystorePath)

setKeystorePwd

public void setKeystorePwd(java.lang.String _keystorePwd)

closeMailServerConnection

public void closeMailServerConnection()
                               throws InboxListenerException
close the Mail Server Connection

Throws:
InboxListenerException

stopThread

public void stopThread()


Copyright © 2005-2006 Funambol.