Package org.apache.camel.spi
Class CamelContextTracker
- java.lang.Object
-
- org.apache.camel.spi.CamelContextTracker
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class CamelContextTracker extends Object implements Closeable
ACamelContext
creation and destruction tracker.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CamelContextTracker.Filter
-
Constructor Summary
Constructors Constructor Description CamelContextTracker()
CamelContextTracker(CamelContextTracker.Filter filter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(CamelContext camelContext)
Called to determine whether this tracker should accept the given context.void
close()
Closes the tracker so it not longer tracks.void
contextCreated(CamelContext camelContext)
Called when a context is created.void
contextDestroyed(CamelContext camelContext)
Called when a context has been shutdown.static void
notifyContextCreated(CamelContext camelContext)
static void
notifyContextDestroyed(CamelContext camelContext)
void
open()
Opens the tracker to start tracking when newCamelContext
is created or destroyed.
-
-
-
Constructor Detail
-
CamelContextTracker
public CamelContextTracker()
-
CamelContextTracker
public CamelContextTracker(CamelContextTracker.Filter filter)
-
-
Method Detail
-
accept
public boolean accept(CamelContext camelContext)
Called to determine whether this tracker should accept the given context.
-
contextCreated
public void contextCreated(CamelContext camelContext)
Called when a context is created.
-
contextDestroyed
public void contextDestroyed(CamelContext camelContext)
Called when a context has been shutdown.
-
open
public final void open()
Opens the tracker to start tracking when newCamelContext
is created or destroyed.
-
close
public final void close()
Closes the tracker so it not longer tracks.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
notifyContextCreated
public static void notifyContextCreated(CamelContext camelContext)
-
notifyContextDestroyed
public static void notifyContextDestroyed(CamelContext camelContext)
-
-