@ManagedResource(description="Managed CamelContext") public class ManagedCamelContext extends ManagedPerformanceCounter implements TimerListener, ManagedCamelContextMBean
TIMESTAMP_FORMAT
exchangesTotal, resetTimestamp
Constructor and Description |
---|
ManagedCamelContext(ModelCamelContext context) |
Modifier and Type | Method and Description |
---|---|
void |
addOrUpdateRoutesFromXml(String xml) |
void |
addOrUpdateRoutesFromXml(String xml,
boolean urlDecode) |
List<String> |
completeEndpointPath(String componentName,
Map<String,Object> endpointParameters,
String completionText)
Helper method for tooling which returns the completion list of the endpoint path
from the given endpoint name, properties and current path expression.
|
String |
componentParameterJsonSchema(String componentName)
Returns the JSON schema representation of the endpoint parameters for the given component name
|
boolean |
createEndpoint(String uri)
Creates the endpoint by the given uri
|
String |
dumpRoutesAsXml() |
String |
dumpRoutesStatsAsXml(boolean fullStats,
boolean includeProcessors) |
List<String> |
findComponentNames()
Find the names of all the Camel components available in the classpath and
Registry . |
Map<String,Properties> |
findComponents()
Find information about all the Camel components available in the classpath and
Registry . |
String |
getApplicationContextClassName() |
String |
getCamelId() |
String |
getCamelVersion() |
String |
getClassResolver() |
String |
getComponentDocumentation(String componentName)
Returns the HTML documentation for the given camel component
|
CamelContext |
getContext() |
Integer |
getInflightExchanges() |
String |
getLoad01() |
String |
getLoad05() |
String |
getLoad15() |
String |
getManagementName() |
Boolean |
getMessageHistory() |
String |
getPackageScanClassResolver() |
Map<String,String> |
getProperties() |
String |
getProperty(String name)
Gets the value of a CamelContext property name
|
Integer |
getStartedRoutes() |
String |
getState() |
long |
getTimeout() |
TimeUnit |
getTimeUnit() |
Integer |
getTotalRoutes() |
Boolean |
getTracing() |
String |
getUptime() |
boolean |
isAllowUseOriginalMessage() |
boolean |
isMessageHistory() |
boolean |
isShutdownNowOnTimeout() |
boolean |
isUseBreadcrumb() |
boolean |
isUseMDCLogging() |
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 |
reset(boolean includeRoutes)
Resets all the performance counters.
|
void |
restart() |
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 |
setProperty(String name,
String value)
Sets the value of a CamelContext property name
|
void |
setShutdownNowOnTimeout(boolean shutdownNowOnTimeout) |
void |
setTimeout(long timeout) |
void |
setTimeUnit(TimeUnit timeUnit) |
void |
setTracing(Boolean tracing) |
void |
start() |
void |
stop() |
void |
suspend() |
completedExchange, dumpStatsAsXml, failedExchange, getDeltaProcessingTime, getExchangesCompleted, getExchangesFailed, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, init, isStatisticsEnabled, reset, setStatisticsEnabled
getExchangesTotal, getResetTimestamp, increment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dumpStatsAsXml, getDeltaProcessingTime, getExchangesCompleted, getExchangesFailed, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, isStatisticsEnabled, setStatisticsEnabled
getExchangesTotal, getResetTimestamp, reset
public ManagedCamelContext(ModelCamelContext context)
public CamelContext getContext()
public String getCamelId()
getCamelId
in interface ManagedCamelContextMBean
public String getManagementName()
getManagementName
in interface ManagedCamelContextMBean
public String getCamelVersion()
getCamelVersion
in interface ManagedCamelContextMBean
public String getState()
getState
in interface ManagedCamelContextMBean
public String getUptime()
getUptime
in interface ManagedCamelContextMBean
public String getClassResolver()
getClassResolver
in interface ManagedCamelContextMBean
public String getPackageScanClassResolver()
getPackageScanClassResolver
in interface ManagedCamelContextMBean
public String getApplicationContextClassName()
getApplicationContextClassName
in interface ManagedCamelContextMBean
public Map<String,String> getProperties()
getProperties
in interface ManagedCamelContextMBean
public String getProperty(String name) throws Exception
ManagedCamelContextMBean
getProperty
in interface ManagedCamelContextMBean
name
- the name of the propertyException
- is thrown if error occurredpublic void setProperty(String name, String value) throws Exception
ManagedCamelContextMBean
setProperty
in interface ManagedCamelContextMBean
name
- the name of the propertyvalue
- the new value of the propertyException
- is thrown if error occurredpublic Boolean getTracing()
getTracing
in interface ManagedCamelContextMBean
public void setTracing(Boolean tracing)
setTracing
in interface ManagedCamelContextMBean
public Boolean getMessageHistory()
getMessageHistory
in interface ManagedCamelContextMBean
public Integer getInflightExchanges()
getInflightExchanges
in interface ManagedCamelContextMBean
public Integer getTotalRoutes()
getTotalRoutes
in interface ManagedCamelContextMBean
public Integer getStartedRoutes()
getStartedRoutes
in interface ManagedCamelContextMBean
public void setTimeout(long timeout)
setTimeout
in interface ManagedCamelContextMBean
public long getTimeout()
getTimeout
in interface ManagedCamelContextMBean
public void setTimeUnit(TimeUnit timeUnit)
setTimeUnit
in interface ManagedCamelContextMBean
public TimeUnit getTimeUnit()
getTimeUnit
in interface ManagedCamelContextMBean
public void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)
setShutdownNowOnTimeout
in interface ManagedCamelContextMBean
public boolean isShutdownNowOnTimeout()
isShutdownNowOnTimeout
in interface ManagedCamelContextMBean
public String getLoad01()
getLoad01
in interface ManagedCamelContextMBean
public String getLoad05()
getLoad05
in interface ManagedCamelContextMBean
public String getLoad15()
getLoad15
in interface ManagedCamelContextMBean
public boolean isUseBreadcrumb()
isUseBreadcrumb
in interface ManagedCamelContextMBean
public boolean isAllowUseOriginalMessage()
isAllowUseOriginalMessage
in interface ManagedCamelContextMBean
public boolean isMessageHistory()
isMessageHistory
in interface ManagedCamelContextMBean
public boolean isUseMDCLogging()
isUseMDCLogging
in interface ManagedCamelContextMBean
public void onTimer()
TimerListener
onTimer
in interface TimerListener
public void start() throws Exception
start
in interface ManagedCamelContextMBean
Exception
public void stop() throws Exception
stop
in interface ManagedCamelContextMBean
Exception
public void restart() throws Exception
restart
in interface ManagedCamelContextMBean
Exception
public void suspend() throws Exception
suspend
in interface ManagedCamelContextMBean
Exception
public void resume() throws Exception
resume
in interface ManagedCamelContextMBean
Exception
public void sendBody(String endpointUri, Object body) throws Exception
sendBody
in interface ManagedCamelContextMBean
Exception
public void sendStringBody(String endpointUri, String body) throws Exception
sendStringBody
in interface ManagedCamelContextMBean
Exception
public void sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
sendBodyAndHeaders
in interface ManagedCamelContextMBean
Exception
public Object requestBody(String endpointUri, Object body) throws Exception
requestBody
in interface ManagedCamelContextMBean
Exception
public Object requestStringBody(String endpointUri, String body) throws Exception
requestStringBody
in interface ManagedCamelContextMBean
Exception
public Object requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
requestBodyAndHeaders
in interface ManagedCamelContextMBean
Exception
public String dumpRoutesAsXml() throws Exception
dumpRoutesAsXml
in interface ManagedCamelContextMBean
Exception
public void addOrUpdateRoutesFromXml(String xml) throws Exception
addOrUpdateRoutesFromXml
in interface ManagedCamelContextMBean
Exception
public void addOrUpdateRoutesFromXml(String xml, boolean urlDecode) throws Exception
addOrUpdateRoutesFromXml
in interface ManagedCamelContextMBean
Exception
public String dumpRoutesStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception
dumpRoutesStatsAsXml
in interface ManagedCamelContextMBean
Exception
public boolean createEndpoint(String uri) throws Exception
ManagedCamelContextMBean
createEndpoint
in interface ManagedCamelContextMBean
uri
- uri of endpoint to createException
- is thrown if error occurredpublic int removeEndpoints(String pattern) throws Exception
ManagedCamelContextMBean
removeEndpoints
in interface ManagedCamelContextMBean
pattern
- the patternException
- is thrown if error occurredCamelContext.removeEndpoints(String)
public Map<String,Properties> findComponents() throws Exception
ManagedCamelContextMBean
Registry
.findComponents
in interface ManagedCamelContextMBean
Exception
- is thrown if error occurredpublic String getComponentDocumentation(String componentName) throws IOException
ManagedCamelContextMBean
getComponentDocumentation
in interface ManagedCamelContextMBean
componentName
- the component nameIOException
public List<String> findComponentNames() throws Exception
ManagedCamelContextMBean
Registry
.findComponentNames
in interface ManagedCamelContextMBean
Exception
- is thrown if error occurredpublic List<String> completeEndpointPath(String componentName, Map<String,Object> endpointParameters, String completionText) throws Exception
ManagedCamelContextMBean
completeEndpointPath
in interface ManagedCamelContextMBean
componentName
- the component nameendpointParameters
- parameters of the endpointcompletionText
- the entered text which we want to have completion suggestions forException
- is thrown if error occurredpublic String componentParameterJsonSchema(String componentName) throws Exception
ManagedCamelContextMBean
componentParameterJsonSchema
in interface ManagedCamelContextMBean
componentName
- the name of the component to lookupException
- is thrown if error occurredpublic void reset(boolean includeRoutes) throws Exception
ManagedCamelContextMBean
reset
in interface ManagedCamelContextMBean
includeRoutes
- whether to reset all routes as well.Exception
- is thrown if error occurredApache Camel