|
||||||||||
| 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 inheritence 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,
QName service,
String endpoint)
|
|
| Method Summary | |
|---|---|
long |
getDelay()
|
org.apache.servicemix.executors.Executor |
getExecutor()
|
Date |
getFirstTime()
|
long |
getPeriod()
|
Scheduler |
getScheduler()
|
protected void |
handlePollException(Exception e)
|
boolean |
isConcurrentPolling()
returns if more than one poll can be active at a time |
abstract void |
poll()
Polls the underlying resource to see if some event is required |
void |
setConcurrentPolling(boolean concurrentPolling)
sets if more than one poll can be active at a time (true means yes) |
void |
setDelay(long delay)
Sets the amount of time the endpoint waits before making the first poll. |
void |
setFirstTime(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)
|
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,
QName service,
String endpoint)
public PollingEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
| Method Detail |
|---|
public abstract void poll()
throws Exception
javax.jbi.JBIException
Exceptionpublic org.apache.servicemix.executors.Executor getExecutor()
public long getDelay()
public void setDelay(long delay)
delay - a long specifying the number of milliseconds to waitpublic Date getFirstTime()
public void setFirstTime(Date firstTime)
setDelay, the delay interval will be added
after the date specified,
firstTime - a Date specifying when to make the
first polling attemptpublic long getPeriod()
public boolean isConcurrentPolling()
public void setConcurrentPolling(boolean concurrentPolling)
concurrentPolling - The concurrentPolling to set.public void setPeriod(long period)
period - a long specifying the gap between polling attemptspublic Scheduler getScheduler()
public void setScheduler(Scheduler scheduler)
public void start()
throws Exception
Endpoint
start in interface Endpointstart in class SimpleEndpointException
public void stop()
throws Exception
Endpoint
stop in interface Endpointstop in class SimpleEndpointExceptionprotected void handlePollException(Exception e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||