public class TimerComponent extends UriEndpointComponent
TimerEndpoint
. It holds the
list of TimerConsumer
objects that are started.shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
TimerComponent() |
Modifier and Type | Method and Description |
---|---|
protected Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
A factory method allowing derived components to create a new endpoint
from the given URI, remaining path and optional parameters
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
Timer |
getTimer(TimerConsumer consumer) |
void |
removeTimer(TimerConsumer consumer) |
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, doStart, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isResolvePropertyPlaceholders, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, setResolvePropertyPlaceholders, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public TimerComponent()
public Timer getTimer(TimerConsumer consumer)
public void removeTimer(TimerConsumer consumer)
protected Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
DefaultComponent
createEndpoint
in class DefaultComponent
uri
- the full URI of the endpointremaining
- the remaining part of the URI without the query
parameters or component prefixparameters
- the optional parameters passed inException
- is thrown if error creating the endpointprotected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class DefaultComponent
Exception
ServiceSupport.doStart()
Apache Camel