| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.service.email.pop.StoreService
public class StoreService
A class used to expose a Store as a
 nucleus service.  This class is responsible for checking for
 inbound email and emmitting inbound email and bounced email
 events.
Store| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| protected  int | mBatchSizeThe size of the batch of emails before we close and reopen the mail folder | 
| protected  java.util.ArrayList | mBounceListenersMaintained list of bounced email listeners | 
| protected  java.util.ArrayList | mEmailExaminersMaintained list of email examiners | 
| protected  boolean | mEnabledTrue if this mail store should be polled. | 
| protected  boolean | mFireBouncedMailEventsIndicates whether we want to fire BouncedMailEvents | 
| protected  boolean | mFireInboundMailEventsIndicates whether we want to fire InboundMailEvents | 
| protected  java.lang.String | mFolderThe folder to retrieve messages from. | 
| protected  java.lang.String | mHostSpecifies the hostname | 
| protected  java.util.ArrayList | mInboundListenersMaintained list of inbound email listeners | 
| protected  int | mJobIdThe id of the scheduled job this service performs | 
| protected  java.lang.String | mPasswordSpecifies the password | 
| protected  java.lang.String | mPasswordAliasthe password alias for password access | 
| protected  atg.security.AliasedPasswordBroker | mPasswordBrokerpassword broker to use | 
| protected  int | mPortSpecifies the port | 
| protected  java.lang.String | mProtocolThe mail protocol to use when retrieving messages | 
| protected  boolean | mRemoveBouncedEMailSpecifies whether bounced email should be removed from the server | 
| protected  boolean | mRemoveEMailSpecifies whether normal email should be removed from the server | 
| protected  boolean | mRemoveMalformedEmailSpecifies whether malformed email is discarded, or treated like normal | 
| protected  boolean | mRemoveUnsupportedEncodingEMailSpecifies whether email using unsupported encodings should be removed from the server | 
| protected  Schedule | mScheduleThe schedule under which we check for email | 
| protected  Scheduler | mSchedulerThe scheduler service we use to tell us when to check for email | 
| protected  java.lang.String | mUsernameSpecifies the username | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
| DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
| DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
| StoreService()Create a disconnected StoreServiceobject | |
| Method Summary | |
|---|---|
|  void | addBounceListener(atg.service.email.pop.POP3BounceListener l)Add a listener for a bounced email event | 
|  void | addEmailExaminer(EmailExaminer pEmailExaminer)Adds an email examiner to this service | 
|  void | addInboundListener(atg.service.email.pop.POP3InboundMailListener pInboundListener)Adds a listener for an inbound event | 
|  void | doStartService()Starts the Store service. | 
|  void | doStopService()Stops the service. | 
|  void | fireInboundMailEvent(javax.mail.Message pMsg,
                     boolean pBounced)Notify listening objects that an email has been received | 
|  void | fireInboundMailEvent(javax.mail.Message pMessage,
                     boolean pBounced,
                     EmailExaminer pExaminer)Notify listening objects that an email has been received | 
|  void | fireMailBounceEvent(java.lang.String address,
                    java.lang.String date,
                    int id)Notify listening objects of bounce events. | 
|  void | fireMailBounceEvent(java.lang.String address,
                    java.lang.String date,
                    int id,
                    boolean isSoftBounce,
                    java.util.Map atgHeaders,
                    java.util.Map trackingData)Notify listening objects of bounce events. | 
|  int | getBatchSize()The size of the batch of messages we should process before reopening the folder. | 
|  EmailExaminer[] | getEmailExaminers()Gets the EmailExaminers property | 
|  java.lang.String | getFolder()Gets the folder to retrieve email from If unset, the "INBOX" will be used. | 
|  java.lang.String | getHost()Retrieves the host for the active POP session | 
|  java.lang.String | getPassword()Retrieves the password for the active POP session | 
|  java.lang.String | getPasswordAlias()Returns property passwordAlias | 
|  atg.security.AliasedPasswordBroker | getPasswordBroker()Returns property passwordBroker | 
|  int | getPort()Retrieves the port for the active POP session | 
|  java.lang.String | getProtocol()The mail protocol to use when retrieving messages Default implementations are "pop3" and "imap". | 
|  boolean | getRemoveBouncedEMail()Retrieves the remove bounced email flag | 
|  boolean | getRemoveEMail()Retrieves the remove email flag | 
|  boolean | getRemoveMalformedEmail()Returns property discardMalformedEmail | 
|  boolean | getRemoveUnsupportedEncodingEMail()Retrieves the remove unsuppported encoding email flag | 
|  Schedule | getSchedule()Gets the schedule property | 
|  Scheduler | getScheduler()Gets the value of the scheduler property | 
|  java.lang.String | getUsername()Retrieves the username for the active POP session | 
|  boolean | isEnabled()Gets the enabled property. | 
|  boolean | isFireBouncedMailEvents()Gets the fireBouncedMailEvents property | 
|  boolean | isFireInboundMailEvents()Gets the fireInboundMailEvents property | 
|  void | performScheduledTask(Scheduler pScheduler,
                     ScheduledJob pJob)Performs the scheduled task for this service. | 
|  void | removeBounceListener(atg.service.email.pop.POP3BounceListener l)Remove a bounce event listener. | 
|  void | removeEmailExaminer(EmailExaminer pEmailExaminer)Removes an email examiner from this service | 
|  void | removeInboundListener(atg.service.email.pop.POP3InboundMailListener pInboundListener)Removes an inbound listener. | 
|  void | setBatchSize(int pBatchSize)The size of the batch of messages we should process before reopening the folder. | 
|  void | setEmailExaminers(EmailExaminer[] pEmailExaminers)Sets the EmailExaminers property | 
|  void | setEnabled(boolean pEnabled)Sets the enabled property. | 
|  void | setFireBouncedMailEvents(boolean pFireBouncedMailEvents)Sets the fireBouncedMailEvents property | 
|  void | setFireInboundMailEvents(boolean pFireInboundMailEvents)Sets the fireInboundMailEvents property | 
|  void | setFolder(java.lang.String folder)Sets the folder to retrieve email from. | 
|  void | setHost(java.lang.String host)Sets the host for the active POP session | 
|  void | setPassword(java.lang.String password)Sets the password for the active POP session | 
|  void | setPasswordAlias(java.lang.String pPasswordAlias)Sets property passwordAlias | 
|  void | setPasswordBroker(atg.security.AliasedPasswordBroker pPasswordBroker)Sets property passwordBroker | 
|  void | setPort(int port)Sets the port for the active POP session | 
|  void | setProtocol(java.lang.String protocol)The mail protocol to use when retrieving messages. | 
|  void | setRemoveBouncedEMail(boolean remove)Sets the flag for removing bounced email from the mail server | 
|  void | setRemoveEMail(boolean remove)Sets the flag for removing email from the mail server | 
|  void | setRemoveMalformedEmail(boolean pRemoveMalformedEmail)Sets property discardMalformedEmail | 
|  void | setRemoveUnspportedEncodingEMail(boolean remove)Sets the flag for removing email that uses an unsupported encoding from the mail server | 
|  void | setSchedule(Schedule pSchedule)Sets the schedule property | 
|  void | setScheduler(Scheduler pScheduler)Sets the scheduler property | 
|  void | setUsername(java.lang.String username)Sets the username for the active POP session | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
protected boolean mEnabled
protected java.lang.String mProtocol
Session.getProvider(String)protected java.lang.String mUsername
protected java.lang.String mPassword
protected java.lang.String mHost
protected int mPort
protected java.lang.String mFolder
Store.getFolder(String)protected boolean mRemoveBouncedEMail
protected boolean mRemoveEMail
protected boolean mRemoveMalformedEmail
protected boolean mRemoveUnsupportedEncodingEMail
protected java.util.ArrayList mBounceListeners
protected java.util.ArrayList mInboundListeners
protected java.util.ArrayList mEmailExaminers
protected int mJobId
protected Scheduler mScheduler
protected Schedule mSchedule
protected boolean mFireInboundMailEvents
protected boolean mFireBouncedMailEvents
protected int mBatchSize
protected atg.security.AliasedPasswordBroker mPasswordBroker
protected java.lang.String mPasswordAlias
| Constructor Detail | 
|---|
public StoreService()
StoreService object
| Method Detail | 
|---|
public void setPasswordAlias(java.lang.String pPasswordAlias)
passwordAlias
pPasswordAlias - the alias to use for fetching the smtp 
 connection passwordpublic java.lang.String getPasswordAlias()
passwordAlias
public void setPasswordBroker(atg.security.AliasedPasswordBroker pPasswordBroker)
passwordBroker
pPasswordBroker - the password broker to use for password retrievalpublic atg.security.AliasedPasswordBroker getPasswordBroker()
passwordBroker
public Scheduler getScheduler()
public void setScheduler(Scheduler pScheduler)
pScheduler - the scheduler service that tells this service
 when to check for mailpublic Schedule getSchedule()
public void setSchedule(Schedule pSchedule)
pSchedule - the schedule under which this service checks
 for emailpublic boolean isEnabled()
public void setEnabled(boolean pEnabled)
public void setEmailExaminers(EmailExaminer[] pEmailExaminers)
pEmailExaminers - public EmailExaminer[] getEmailExaminers()
EmailExaminerpublic void addEmailExaminer(EmailExaminer pEmailExaminer)
pEmailExaminer - the email examiner to addpublic void removeEmailExaminer(EmailExaminer pEmailExaminer)
pEmailExaminer - the email examiner to removepublic void setProtocol(java.lang.String protocol)
protocol - The protocolSession.getProvider(String)public java.lang.String getProtocol()
Session.getProvider(String)public void setUsername(java.lang.String username)
username - The usernamepublic java.lang.String getUsername()
public void setPassword(java.lang.String password)
password - The password@Hidden public java.lang.String getPassword()
public void setHost(java.lang.String host)
host - The hostpublic java.lang.String getHost()
public void setPort(int port)
port - The portpublic int getPort()
public void setFolder(java.lang.String folder)
folder - The folderStore.getFolder(String), 
Store.getDefaultFolder()public java.lang.String getFolder()
Store.getFolder(String), 
Store.getDefaultFolder()public void setRemoveBouncedEMail(boolean remove)
remove - false or truepublic boolean getRemoveBouncedEMail()
public void setRemoveEMail(boolean remove)
remove - false or truepublic boolean getRemoveEMail()
public void setRemoveMalformedEmail(boolean pRemoveMalformedEmail)
discardMalformedEmail
pRemoveMalformedEmail - indicates whether malformed email 
 should be immediately discarded, or should be treated as a normal emailpublic boolean getRemoveMalformedEmail()
discardMalformedEmail
public void setRemoveUnspportedEncodingEMail(boolean remove)
remove - false or truepublic boolean getRemoveUnsupportedEncodingEMail()
public void setFireBouncedMailEvents(boolean pFireBouncedMailEvents)
pFireBouncedMailEvents - if true, then events will be fired
 if a bounced email is receivedpublic boolean isFireBouncedMailEvents()
public void setFireInboundMailEvents(boolean pFireInboundMailEvents)
pFireInboundMailEvents - if true, then events will be
 fired for each email received by the clientpublic boolean isFireInboundMailEvents()
public void addBounceListener(atg.service.email.pop.POP3BounceListener l)
l - The POP3BounceListener to addpublic void removeBounceListener(atg.service.email.pop.POP3BounceListener l)
l - The POP3BounceListener to remove.public void addInboundListener(atg.service.email.pop.POP3InboundMailListener pInboundListener)
pInboundListener - The POP3InboundListener to addpublic void removeInboundListener(atg.service.email.pop.POP3InboundMailListener pInboundListener)
pInboundListener - The POP3InboundListener to remove.public void setBatchSize(int pBatchSize)
pBatchSize - The size of the batchpublic int getBatchSize()
public void fireMailBounceEvent(java.lang.String address,
                                java.lang.String date,
                                int id)
address - The offending email addressdate - The date of the original sent emailid - The id of the original sent email
public void fireMailBounceEvent(java.lang.String address,
                                java.lang.String date,
                                int id,
                                boolean isSoftBounce,
                                java.util.Map atgHeaders,
                                java.util.Map trackingData)
address - The offending email addressdate - The date of the original sent emailid - The id of the original sent emailisSoftBounce - A flag indicating if this is a soft bounce.atgHeaders - A map of ATG headers contained in the bounced message.trackingData - A map of tracking data contained in the bounced messageEmailTrackingTools
public void fireInboundMailEvent(javax.mail.Message pMsg,
                                 boolean pBounced)
pMsg - The Message that was created for this emailpBounced - whether or not this message was bounced
public void fireInboundMailEvent(javax.mail.Message pMessage,
                                 boolean pBounced,
                                 EmailExaminer pExaminer)
pMsg - The Message that was created for this emailpBounced - whether or not this message was bounced
public void doStartService()
                    throws ServiceException
doStartService in class GenericServiceServiceException - if an error occurs during startup of this
 service
public void doStopService()
                   throws ServiceException
doStopService in class GenericServiceServiceException - if an error occurs while the service tried
 to stop
public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
performScheduledTask in interface SchedulablepScheduler - the scheduler that alerts this service to perform
 its scheduled taskpJob - the ScheduledJob for this service| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||