|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cid.distribution.base.MessageHandlerBase org.cid.distribution.plugins.mail.POP3Handler
public class POP3Handler
The POP3Handler stablishes a connection to a POP3 server and retrieves the messages stored, which are then forwarded to other nodes.
The POP3Handler does this for each message it receives. The usual way of using it is at the beginning of a node chain, so the POP3Handler is 'activated' with an initial empty message that starts the distribution process.
Constructor Summary | |
---|---|
POP3Handler()
Class constructor. |
Method Summary | |
---|---|
static void |
addRules(org.apache.commons.digester.Digester d,
java.lang.String patternPrefix)
Configures additional rules for the commons-digester library. |
void |
destroy()
Closes the connection to the POP3 server. |
java.lang.String |
getHost()
Gets the mail server hostname or IP address. |
int |
getMessageCount()
Returns the number of messages processed by this InputChannel. |
java.lang.String |
getPassword()
Gets the mail server account password. |
java.lang.Short |
getPort()
Gets the mail server port. |
java.lang.String |
getProperty()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getUsername()
Gets the mail server account username. |
boolean |
hasMoreMessages()
Tests if this enumeration contains more elements. |
DistributionMessage |
nextMessage()
Retrieves the next message. |
MessageEnumeration |
process(DistributionMessage message)
Gets all messages from the configured mail server and copies them, breaking the link from the message to the mail session. |
void |
setHost(java.lang.String host)
Sets the mail server hostname or IP address. |
void |
setPassword(java.lang.String password)
Sets the mail server account password. |
void |
setPort(java.lang.String port)
Sets the mail server port. |
void |
setProperty(java.lang.String property)
|
void |
setProtocol(java.lang.String protocol)
Sets the protocol to use when connecting to the server. |
void |
setUsername(java.lang.String username)
Sets the mail server account username. |
Methods inherited from class org.cid.distribution.base.MessageHandlerBase |
---|
getId, init, setDistributionContext, setId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POP3Handler()
Method Detail |
---|
public MessageEnumeration process(DistributionMessage message) throws DistributionConfigurationException, DistributionProcessingException
process
in interface MessageHandler
DistributionConfigurationException
DistributionProcessingException
public void destroy() throws DistributionProcessingException, DistributionConfigurationException
destroy
in interface MessageHandler
destroy
in class MessageHandlerBase
DistributionProcessingException
DistributionConfigurationException
MessageHandlerBase.destroy()
public boolean hasMoreMessages()
hasMoreMessages
in interface MessageEnumeration
public DistributionMessage nextMessage() throws DistributionProcessingException
nextMessage
in interface MessageEnumeration
DistributionProcessingException
public static void addRules(org.apache.commons.digester.Digester d, java.lang.String patternPrefix)
public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- The mail server hostname or IP address.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The mail server account password.public java.lang.Short getPort()
public void setPort(java.lang.String port)
port
- The mail server port.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The mail server account username.public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
Sets the protocol to use when connecting to the server.
Valid values are pop3 and pop3s.
protocol
- The protocol to set.public int getMessageCount()
public java.lang.String getProperty()
public void setProperty(java.lang.String property)
property
- The property to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |