com.ibm.di.connector
Class MailboxConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.MailboxConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface, EventListener, javax.mail.event.MessageCountListener

public class MailboxConnector
extends Connector
implements ConnectorInterface, javax.mail.event.MessageCountListener

Simple access to POP/IMAP based mailboxes.


Field Summary
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
MailboxConnector()
          Constructor for the MailboxConnector object
 
Method Summary
 void deleteEntry(Entry aEntry, SearchCriteria aSearch)
          Deletes an existing entry.
 Entry findEntry(SearchCriteria aSearch)
          Finds an existing entry.
 Entry getNextEntry()
          Gets the next message from an open MailboxConnector object
 String getVersion()
          Return version information
 void initialize(Object aObj)
          Reads connector parameter's values and initialize the Connector.
 void messagesAdded(javax.mail.event.MessageCountEvent aMce)
          Gets notification for added message
 void messagesRemoved(javax.mail.event.MessageCountEvent aMce)
          Gets notification for removed message
 void selectEntries()
          Prepare the Connector for sequential read
 void terminate()
          Terminate the connector.
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
 

Constructor Detail

MailboxConnector

public MailboxConnector()
Constructor for the MailboxConnector object

Method Detail

initialize

public void initialize(Object aObj)
                throws Exception
Reads connector parameter's values and initialize the Connector.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
aObj - Null, Socket or ConnectorMode class
Throws:
Exception - If invalid Connector parameter values are supplied.

getNextEntry

public Entry getNextEntry()
                   throws Exception
Gets the next message from an open MailboxConnector object

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
The next Entry
Throws:
Exception - If retrieving the next Entry fails.
See Also:
Connector.selectEntries()

messagesAdded

public void messagesAdded(javax.mail.event.MessageCountEvent aMce)
Gets notification for added message

Specified by:
messagesAdded in interface javax.mail.event.MessageCountListener
Parameters:
aMce - MessageCountEvent

messagesRemoved

public void messagesRemoved(javax.mail.event.MessageCountEvent aMce)
Gets notification for removed message

Specified by:
messagesRemoved in interface javax.mail.event.MessageCountListener
Parameters:
aMce - MessageCountEvent

selectEntries

public void selectEntries()
                   throws Exception
Prepare the Connector for sequential read

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class Connector
Throws:
Exception

findEntry

public Entry findEntry(SearchCriteria aSearch)
                throws Exception
Finds an existing entry. The search criteria specifies which entry to locate

Specified by:
findEntry in interface ConnectorInterface
Overrides:
findEntry in class Connector
Parameters:
aSearch - The search criteria used to locate the entry to be modified, search criteria can be /mail.messagenumber, mail.from, mail.to, mail.cc, mail.subject, mail.messageid
Returns:
The entry found, or null if no or multiple entries found
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

deleteEntry

public void deleteEntry(Entry aEntry,
                        SearchCriteria aSearch)
                 throws Exception
Deletes an existing entry. The search criteria specifies which entry to modify.

Specified by:
deleteEntry in interface ConnectorInterface
Overrides:
deleteEntry in class Connector
Parameters:
aEntry - The entry data
aSearch - The search criteria used to locate the entry to be deleted
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

terminate

public void terminate()
               throws Exception
Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser function if a parser is active.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector
Throws:
Exception

getVersion

public String getVersion()
Return version information

Specified by:
getVersion in interface VersionInfoInterface