|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ConsumerEndpoint
org.apache.servicemix.common.endpoints.PollingEndpoint
public abstract class PollingEndpoint
An implementation inheritance class for an endpoint which polls some resource at periodic intervals to decide if there is an event to process.
| Field Summary |
|---|
| Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
definition, description, endpoint, interfaceName, logger, service, serviceUnit |
| Constructor Summary | |
|---|---|
PollingEndpoint()
|
|
PollingEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
|
|
PollingEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
|
|
| Method Summary | |
|---|---|
long |
getDelay()
|
org.apache.servicemix.executors.Executor |
getExecutor()
|
java.util.Date |
getFirstTime()
|
long |
getPeriod()
|
Scheduler |
getScheduler()
|
protected void |
handlePollException(java.lang.Exception e)
|
boolean |
isConcurrentPolling()
|
abstract void |
poll()
Polls the underlying resource to see if some event is required |
void |
setConcurrentPolling(boolean concurrentPolling)
Sets whether more than one poll can be active at a time (true means yes). |
void |
setDelay(long delay)
Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. |
void |
setFirstTime(java.util.Date firstTime)
Sets the date on which the first poll will be executed. |
void |
setPeriod(long period)
Sets the number of milliseconds between polling attempts. |
void |
setScheduler(Scheduler scheduler)
Set a custom Scheduler implementation if you need more fine-grained control over the polling schedule. |
void |
start()
Start consumption of external requests. |
void |
stop()
Stop consumption of external requests. |
| Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint |
|---|
activate, configureExchangeTarget, deactivate, getLocationURI, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri, validate |
| Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync |
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, process, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PollingEndpoint()
public PollingEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
public PollingEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
| Method Detail |
|---|
public abstract void poll()
throws java.lang.Exception
javax.jbi.JBIException
java.lang.Exceptionpublic org.apache.servicemix.executors.Executor getExecutor()
public void setDelay(long delay)
delay - a long specifying the number of milliseconds to waitpublic long getDelay()
public void setFirstTime(java.util.Date firstTime)
setDelay, the delay interval will be added
after the date specified.
firstTime - a Date specifying when to make the
first polling attemptpublic java.util.Date getFirstTime()
public void setConcurrentPolling(boolean concurrentPolling)
false.
concurrentPolling - The concurrentPolling to set.public boolean isConcurrentPolling()
public void setPeriod(long period)
period - a long specifying the gap between polling attemptspublic long getPeriod()
public Scheduler getScheduler()
public void setScheduler(Scheduler scheduler)
scheduler -
public void start()
throws java.lang.Exception
Endpoint
start in interface Endpointstart in class SimpleEndpointjava.lang.Exception
public void stop()
throws java.lang.Exception
Endpoint
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exceptionprotected void handlePollException(java.lang.Exception e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||