org.apache.servicemix.components.email
Class MimeMailPoller

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.components.util.PojoSupport
          extended by org.apache.servicemix.components.util.ComponentSupport
              extended by org.apache.servicemix.components.util.PollingComponentSupport
                  extended by org.apache.servicemix.components.email.MimeMailPoller
All Implemented Interfaces:
Runnable, javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, javax.jbi.management.LifeCycleMBean, Work, MBeanInfoProvider

public class MimeMailPoller
extends PollingComponentSupport

A polling component which looks for emails in a mail server and sends them into the JBI bus as messages, deleting the messages by default when they are processed.

Version:
$Revision: 2153 $

Field Summary
 
Fields inherited from class org.apache.servicemix.components.util.PojoSupport
logger
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
MimeMailPoller()
           
 
Method Summary
 String getHostName()
           
 String getMailBox()
           
 MimeMailMarshaler getMarshaler()
           
 int getMaxFetchSize()
           
 String getPassword()
           
 Session getSession()
           
 String getUserName()
           
protected  void init()
          A helper method to allow a component to initialise prior to the endpoint being activated but after the component context has been configured.
 boolean isDebug()
           
 void poll()
          Polls the underlying resource to see if some event is required
 void setDebug(boolean debug)
           
 void setHostName(String hostName)
           
 void setMailBox(String mailBox)
           
 void setMarshaler(MimeMailMarshaler marshaler)
           
 void setMaxFetchSize(int maxFetchSize)
           
 void setPassword(String password)
           
 void setSession(Session session)
           
 void setUserName(String userName)
           
 
Methods inherited from class org.apache.servicemix.components.util.PollingComponentSupport
getDelay, getExecutor, getFirstTime, getPeriod, getScheduler, release, run, setDelay, setFirstTime, setPeriod, setScheduler, shutDown, start, stop
 
Methods inherited from class org.apache.servicemix.components.util.ComponentSupport
createComponentLifeCycle, createInOnlyExchange, createInOnlyExchange, createInOnlyExchange, createInOptionalOutExchange, createInOutExchange, createInOutExchange, createRobustInOnlyExchange, createServiceUnitManager, creatInOutExchange, forwardToExchange, forwardToExchange, getInMessage, getLifeCycle, getMessageTransformer, getServiceDescription, getServiceUnitManager, initializeServiceUnitManager, invoke, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, propagateCorrelationId, resolveEndpointReference, setMessageTransformer
 
Methods inherited from class org.apache.servicemix.components.util.PojoSupport
answer, done, fail, fail, getBody, getContext, getDeliveryChannel, getDescription, getEndpoint, getExchangeFactory, getExtensionMBeanName, getService, init, isInAndOut, send, sendSync, sendSync, setBody, setEndpoint, setExtensionMBeanName, setService
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getAttributeInfos, getCurrentState, getName, getObjectToManage, getOperationInfos, getSubType, getType, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeMailPoller

public MimeMailPoller()
Method Detail

init

protected void init()
             throws javax.jbi.JBIException
Description copied from class: PojoSupport
A helper method to allow a component to initialise prior to the endpoint being activated but after the component context has been configured.

Overrides:
init in class PollingComponentSupport
Throws:
javax.jbi.JBIException

getHostName

public String getHostName()
Returns:
Returns the hostName.

setHostName

public void setHostName(String hostName)
Parameters:
hostName - The hostName to set.

getMarshaler

public MimeMailMarshaler getMarshaler()
Returns:
Returns the marshaler.

setMarshaler

public void setMarshaler(MimeMailMarshaler marshaler)
Parameters:
marshaler - The marshaler to set.

poll

public void poll()
          throws Exception
Description copied from class: PollingComponentSupport
Polls the underlying resource to see if some event is required

Specified by:
poll in class PollingComponentSupport
Throws:
javax.jbi.JBIException
Exception

isDebug

public boolean isDebug()
Returns:
Returns the debug.

setDebug

public void setDebug(boolean debug)
Parameters:
debug - The debug to set.

getMailBox

public String getMailBox()
Returns:
Returns the mailBox.

setMailBox

public void setMailBox(String mailBox)
Parameters:
mailBox - The mailBox to set.

getPassword

public String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(String password)
Parameters:
password - The password to set.

getUserName

public String getUserName()
Returns:
Returns the userName.

setUserName

public void setUserName(String userName)
Parameters:
userName - The userName to set.

getSession

public Session getSession()
Returns:
Returns the session.

setSession

public void setSession(Session session)
Parameters:
session - The session to set.

getMaxFetchSize

public int getMaxFetchSize()
Returns:
Returns the maxFetchSize.

setMaxFetchSize

public void setMaxFetchSize(int maxFetchSize)
Parameters:
maxFetchSize - The maxFetchSize to set.


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.