org.apache.camel.management.mbean
Class ManagedCamelContext
java.lang.Object
org.apache.camel.management.mbean.ManagedCounter
org.apache.camel.management.mbean.ManagedPerformanceCounter
org.apache.camel.management.mbean.ManagedCamelContext
- All Implemented Interfaces:
- ManagedCamelContextMBean, ManagedCounterMBean, ManagedPerformanceCounterMBean, PerformanceCounter, TimerListener
@ManagedResource(description="Managed CamelContext")
public class ManagedCamelContext
- extends ManagedPerformanceCounter
- implements TimerListener, ManagedCamelContextMBean
- Version:
Method Summary |
void |
addOrUpdateRoutesFromXml(String xml)
|
boolean |
createEndpoint(String uri)
Creates the endpoint by the given uri |
String |
dumpRoutesAsXml()
|
String |
dumpRoutesStatsAsXml(boolean fullStats,
boolean includeProcessors)
|
String |
getCamelId()
|
String |
getCamelVersion()
|
CamelContext |
getContext()
|
Integer |
getInflightExchanges()
|
String |
getLoad01()
|
String |
getLoad05()
|
String |
getLoad15()
|
String |
getManagementName()
|
Map<String,String> |
getProperties()
|
String |
getState()
|
long |
getTimeout()
|
TimeUnit |
getTimeUnit()
|
Boolean |
getTracing()
|
String |
getUptime()
|
boolean |
isShutdownNowOnTimeout()
|
void |
onTimer()
Notification invoked. |
int |
removeEndpoints(String pattern)
Removes the endpoint by the given pattern |
Object |
requestBody(String endpointUri,
Object body)
|
Object |
requestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
|
Object |
requestStringBody(String endpointUri,
String body)
|
void |
resume()
|
void |
sendBody(String endpointUri,
Object body)
|
void |
sendBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
|
void |
sendStringBody(String endpointUri,
String body)
|
void |
setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)
|
void |
setTimeout(long timeout)
|
void |
setTimeUnit(TimeUnit timeUnit)
|
void |
setTracing(Boolean tracing)
|
void |
start()
|
void |
stop()
|
void |
suspend()
|
Methods inherited from class org.apache.camel.management.mbean.ManagedPerformanceCounter |
completedExchange, dumpStatsAsXml, failedExchange, getExchangesCompleted, getExchangesFailed, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, init, isStatisticsEnabled, reset, setStatisticsEnabled |
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.api.management.mbean.ManagedPerformanceCounterMBean |
dumpStatsAsXml, getExchangesCompleted, getExchangesFailed, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, isStatisticsEnabled, setStatisticsEnabled |
ManagedCamelContext
public ManagedCamelContext(ModelCamelContext context)
getContext
public CamelContext getContext()
getCamelId
public String getCamelId()
- Specified by:
getCamelId
in interface ManagedCamelContextMBean
getManagementName
public String getManagementName()
- Specified by:
getManagementName
in interface ManagedCamelContextMBean
getCamelVersion
public String getCamelVersion()
- Specified by:
getCamelVersion
in interface ManagedCamelContextMBean
getState
public String getState()
- Specified by:
getState
in interface ManagedCamelContextMBean
getUptime
public String getUptime()
- Specified by:
getUptime
in interface ManagedCamelContextMBean
getProperties
public Map<String,String> getProperties()
- Specified by:
getProperties
in interface ManagedCamelContextMBean
getTracing
public Boolean getTracing()
- Specified by:
getTracing
in interface ManagedCamelContextMBean
setTracing
public void setTracing(Boolean tracing)
- Specified by:
setTracing
in interface ManagedCamelContextMBean
getInflightExchanges
public Integer getInflightExchanges()
- Specified by:
getInflightExchanges
in interface ManagedCamelContextMBean
setTimeout
public void setTimeout(long timeout)
- Specified by:
setTimeout
in interface ManagedCamelContextMBean
getTimeout
public long getTimeout()
- Specified by:
getTimeout
in interface ManagedCamelContextMBean
setTimeUnit
public void setTimeUnit(TimeUnit timeUnit)
- Specified by:
setTimeUnit
in interface ManagedCamelContextMBean
getTimeUnit
public TimeUnit getTimeUnit()
- Specified by:
getTimeUnit
in interface ManagedCamelContextMBean
setShutdownNowOnTimeout
public void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)
- Specified by:
setShutdownNowOnTimeout
in interface ManagedCamelContextMBean
isShutdownNowOnTimeout
public boolean isShutdownNowOnTimeout()
- Specified by:
isShutdownNowOnTimeout
in interface ManagedCamelContextMBean
getLoad01
public String getLoad01()
- Specified by:
getLoad01
in interface ManagedCamelContextMBean
getLoad05
public String getLoad05()
- Specified by:
getLoad05
in interface ManagedCamelContextMBean
getLoad15
public String getLoad15()
- Specified by:
getLoad15
in interface ManagedCamelContextMBean
onTimer
public void onTimer()
- Description copied from interface:
TimerListener
- Notification invoked.
- Specified by:
onTimer
in interface TimerListener
start
public void start()
throws Exception
- Specified by:
start
in interface ManagedCamelContextMBean
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface ManagedCamelContextMBean
- Throws:
Exception
suspend
public void suspend()
throws Exception
- Specified by:
suspend
in interface ManagedCamelContextMBean
- Throws:
Exception
resume
public void resume()
throws Exception
- Specified by:
resume
in interface ManagedCamelContextMBean
- Throws:
Exception
sendBody
public void sendBody(String endpointUri,
Object body)
throws Exception
- Specified by:
sendBody
in interface ManagedCamelContextMBean
- Throws:
Exception
sendStringBody
public void sendStringBody(String endpointUri,
String body)
throws Exception
- Specified by:
sendStringBody
in interface ManagedCamelContextMBean
- Throws:
Exception
sendBodyAndHeaders
public void sendBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
throws Exception
- Specified by:
sendBodyAndHeaders
in interface ManagedCamelContextMBean
- Throws:
Exception
requestBody
public Object requestBody(String endpointUri,
Object body)
throws Exception
- Specified by:
requestBody
in interface ManagedCamelContextMBean
- Throws:
Exception
requestStringBody
public Object requestStringBody(String endpointUri,
String body)
throws Exception
- Specified by:
requestStringBody
in interface ManagedCamelContextMBean
- Throws:
Exception
requestBodyAndHeaders
public Object requestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
throws Exception
- Specified by:
requestBodyAndHeaders
in interface ManagedCamelContextMBean
- Throws:
Exception
dumpRoutesAsXml
public String dumpRoutesAsXml()
throws Exception
- Specified by:
dumpRoutesAsXml
in interface ManagedCamelContextMBean
- Throws:
Exception
addOrUpdateRoutesFromXml
public void addOrUpdateRoutesFromXml(String xml)
throws Exception
- Specified by:
addOrUpdateRoutesFromXml
in interface ManagedCamelContextMBean
- Throws:
Exception
dumpRoutesStatsAsXml
public String dumpRoutesStatsAsXml(boolean fullStats,
boolean includeProcessors)
throws Exception
- Specified by:
dumpRoutesStatsAsXml
in interface ManagedCamelContextMBean
- Throws:
Exception
createEndpoint
public boolean createEndpoint(String uri)
throws Exception
- Description copied from interface:
ManagedCamelContextMBean
- Creates the endpoint by the given uri
- Specified by:
createEndpoint
in interface ManagedCamelContextMBean
- Parameters:
uri
- uri of endpoint to create
- Returns:
- true if a new endpoint was created, false if the endpoint already existed
- Throws:
Exception
- is thrown if error occurred
removeEndpoints
public int removeEndpoints(String pattern)
throws Exception
- Description copied from interface:
ManagedCamelContextMBean
- Removes the endpoint by the given pattern
- Specified by:
removeEndpoints
in interface ManagedCamelContextMBean
- Parameters:
pattern
- the pattern
- Returns:
- number of endpoints removed
- Throws:
Exception
- is thrown if error occurred- See Also:
CamelContext.removeEndpoints(String)
Apache CAMEL