|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.support.TimerListenerManager
public class TimerListenerManager
A TimerListener manager which triggers the
TimerListener listeners once every second.
TimerListenerManager is only enabled if
ManagementStrategy.isLoadStatisticsEnabled() is enabled.
TimerListener| Field Summary |
|---|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
TimerListenerManager()
|
|
| Method Summary | |
|---|---|
void |
addTimerListener(TimerListener listener)
Adds the listener. |
protected void |
doShutdown()
Implementations override this method to perform customized shutdown. |
protected void |
doStart()
Implementations override this method to support customized start/stop. |
protected void |
doStop()
Implementations override this method to support customized start/stop. |
CamelContext |
getCamelContext()
Get the CamelContext |
long |
getInterval()
Gets the interval in millis. |
void |
removeTimerListener(TimerListener listener)
Removes the listener. |
void |
run()
|
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
void |
setInterval(long interval)
Sets the interval in millis. |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Constructor Detail |
|---|
public TimerListenerManager()
| Method Detail |
|---|
public void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContext
setCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic CamelContext getCamelContext()
CamelContextAwareCamelContext
getCamelContext in interface CamelContextAwarepublic long getInterval()
public void setInterval(long interval)
interval - interval in millis.public void run()
run in interface Runnablepublic void addTimerListener(TimerListener listener)
Object.equals(Object) and Object.hashCode() for the listener
to ensure that we can remove the same listener again, when invoking remove.
listener - listenerpublic void removeTimerListener(TimerListener listener)
Object.equals(Object) and Object.hashCode() for the listener
to ensure that we can remove the same listener again, when invoking remove.
listener - listener.
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.
doStart in class ServiceSupportExceptionServiceSupport.doStop()
protected void doStop()
throws Exception
ServiceSupportServiceSupport.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 ServiceSupportExceptionServiceSupport.doStart()
protected void doShutdown()
throws Exception
ServiceSupport
doShutdown in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||