@ManagedResource(description="Managed CamelContext") public class ManagedCamelContext extends ManagedPerformanceCounter implements TimerListener, ManagedCamelContextMBean
TIMESTAMP_FORMATexchangesTotal, resetTimestamp, startTimestamp| Constructor and Description |
|---|
ManagedCamelContext(ModelCamelContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOrUpdateRoutesFromXml(String xml) |
void |
addOrUpdateRoutesFromXml(String xml,
boolean urlDecode) |
boolean |
canSendToEndpoint(String endpointUri) |
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 with information about the component and the endpoint parameters it supports
|
boolean |
createEndpoint(String uri)
Creates the endpoint by the given uri
|
String |
createRouteStaticEndpointJson() |
String |
createRouteStaticEndpointJson(boolean includeDynamic) |
String |
dataFormatParameterJsonSchema(String dataFormatName)
Returns the JSON schema representation with information about the data format and the parameters it supports
|
String |
dumpRestsAsXml() |
String |
dumpRestsAsXml(boolean resolvePlaceholders) |
String |
dumpRoutesAsXml() |
String |
dumpRoutesAsXml(boolean resolvePlaceholders) |
String |
dumpRoutesCoverageAsXml() |
String |
dumpRoutesStatsAsXml(boolean fullStats,
boolean includeProcessors) |
String |
eipParameterJsonSchema(String eipName)
Returns the JSON schema representation with information about the EIP and the parameters it supports
|
String |
explainComponentJson(String componentName,
boolean includeAllOptions)
Returns a JSON schema representation of the component parameters (not endpoint parameters) for the given component by its id.
|
String |
explainEipJson(String nameOrId,
boolean includeAllOptions)
Returns a JSON schema representation of the EIP parameters for the given EIP by its id.
|
String |
explainEndpointJson(String uri,
boolean includeAllOptions)
Returns a JSON schema representation of the endpoint parameters for the given endpoint uri
|
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. |
List<String> |
findEipNames()
Find the names of all the EIPs from camel-core.
|
Map<String,Properties> |
findEips()
Find information about all the EIPs from camel-core.
|
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() |
String |
getManagementStatisticsLevel() |
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() |
long |
getUptimeMillis() |
void |
init(ManagementStrategy strategy) |
boolean |
isAllowUseOriginalMessage() |
boolean |
isMessageHistory() |
boolean |
isShutdownNowOnTimeout() |
boolean |
isUseBreadcrumb() |
boolean |
isUseMDCLogging() |
String |
languageParameterJsonSchema(String languageName)
Returns the JSON schema representation with information about the language and the parameters it supports
|
TabularData |
listComponents()
Find information about all the Camel components available in the classpath and
Registry. |
TabularData |
listEips()
Find information about all the EIPs from camel-core.
|
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 |
startAllRoutes() |
void |
stop() |
void |
suspend() |
completedExchange, dumpStatsAsXml, failedExchange, getDeltaProcessingTime, getExchangesCompleted, getExchangesFailed, getExchangesInflight, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, isStatisticsEnabled, processExchange, reset, setStatisticsEnabledgetExchangesTotal, getResetTimestamp, getStartTimestamp, incrementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdumpStatsAsXml, getDeltaProcessingTime, getExchangesCompleted, getExchangesFailed, getExchangesInflight, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, isStatisticsEnabled, setStatisticsEnabledgetExchangesTotal, getResetTimestamp, getStartTimestamp, resetpublic ManagedCamelContext(ModelCamelContext context)
public void init(ManagementStrategy strategy)
init in class ManagedPerformanceCounterpublic CamelContext getContext()
public String getCamelId()
getCamelId in interface ManagedCamelContextMBeanpublic String getManagementName()
getManagementName in interface ManagedCamelContextMBeanpublic String getCamelVersion()
getCamelVersion in interface ManagedCamelContextMBeanpublic String getState()
getState in interface ManagedCamelContextMBeanpublic String getUptime()
getUptime in interface ManagedCamelContextMBeanpublic long getUptimeMillis()
getUptimeMillis in interface ManagedCamelContextMBeanpublic String getManagementStatisticsLevel()
getManagementStatisticsLevel in interface ManagedCamelContextMBeanpublic String getClassResolver()
getClassResolver in interface ManagedCamelContextMBeanpublic String getPackageScanClassResolver()
getPackageScanClassResolver in interface ManagedCamelContextMBeanpublic String getApplicationContextClassName()
getApplicationContextClassName in interface ManagedCamelContextMBeanpublic Map<String,String> getProperties()
getProperties in interface ManagedCamelContextMBeanpublic String getProperty(String name) throws Exception
ManagedCamelContextMBeangetProperty in interface ManagedCamelContextMBeanname - the name of the propertyException - is thrown if error occurredpublic void setProperty(String name, String value) throws Exception
ManagedCamelContextMBeansetProperty in interface ManagedCamelContextMBeanname - the name of the propertyvalue - the new value of the propertyException - is thrown if error occurredpublic Boolean getTracing()
getTracing in interface ManagedCamelContextMBeanpublic void setTracing(Boolean tracing)
setTracing in interface ManagedCamelContextMBeanpublic Integer getInflightExchanges()
getInflightExchanges in interface ManagedCamelContextMBeanpublic Integer getTotalRoutes()
getTotalRoutes in interface ManagedCamelContextMBeanpublic Integer getStartedRoutes()
getStartedRoutes in interface ManagedCamelContextMBeanpublic void setTimeout(long timeout)
setTimeout in interface ManagedCamelContextMBeanpublic long getTimeout()
getTimeout in interface ManagedCamelContextMBeanpublic void setTimeUnit(TimeUnit timeUnit)
setTimeUnit in interface ManagedCamelContextMBeanpublic TimeUnit getTimeUnit()
getTimeUnit in interface ManagedCamelContextMBeanpublic void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)
setShutdownNowOnTimeout in interface ManagedCamelContextMBeanpublic boolean isShutdownNowOnTimeout()
isShutdownNowOnTimeout in interface ManagedCamelContextMBeanpublic String getLoad01()
getLoad01 in interface ManagedCamelContextMBeanpublic String getLoad05()
getLoad05 in interface ManagedCamelContextMBeanpublic String getLoad15()
getLoad15 in interface ManagedCamelContextMBeanpublic boolean isUseBreadcrumb()
isUseBreadcrumb in interface ManagedCamelContextMBeanpublic boolean isAllowUseOriginalMessage()
isAllowUseOriginalMessage in interface ManagedCamelContextMBeanpublic boolean isMessageHistory()
isMessageHistory in interface ManagedCamelContextMBeanpublic boolean isUseMDCLogging()
isUseMDCLogging in interface ManagedCamelContextMBeanpublic void onTimer()
TimerListeneronTimer in interface TimerListenerpublic void start() throws Exception
start in interface ManagedCamelContextMBeanExceptionpublic void stop() throws Exception
stop in interface ManagedCamelContextMBeanExceptionpublic void restart() throws Exception
restart in interface ManagedCamelContextMBeanExceptionpublic void suspend() throws Exception
suspend in interface ManagedCamelContextMBeanExceptionpublic void resume() throws Exception
resume in interface ManagedCamelContextMBeanExceptionpublic void startAllRoutes() throws Exception
startAllRoutes in interface ManagedCamelContextMBeanExceptionpublic boolean canSendToEndpoint(String endpointUri)
canSendToEndpoint in interface ManagedCamelContextMBeanpublic void sendBody(String endpointUri, Object body) throws Exception
sendBody in interface ManagedCamelContextMBeanExceptionpublic void sendStringBody(String endpointUri, String body) throws Exception
sendStringBody in interface ManagedCamelContextMBeanExceptionpublic void sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
sendBodyAndHeaders in interface ManagedCamelContextMBeanExceptionpublic Object requestBody(String endpointUri, Object body) throws Exception
requestBody in interface ManagedCamelContextMBeanExceptionpublic Object requestStringBody(String endpointUri, String body) throws Exception
requestStringBody in interface ManagedCamelContextMBeanExceptionpublic Object requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
requestBodyAndHeaders in interface ManagedCamelContextMBeanExceptionpublic String dumpRestsAsXml() throws Exception
dumpRestsAsXml in interface ManagedCamelContextMBeanExceptionpublic String dumpRestsAsXml(boolean resolvePlaceholders) throws Exception
dumpRestsAsXml in interface ManagedCamelContextMBeanExceptionpublic String dumpRoutesAsXml() throws Exception
dumpRoutesAsXml in interface ManagedCamelContextMBeanExceptionpublic String dumpRoutesAsXml(boolean resolvePlaceholders) throws Exception
dumpRoutesAsXml in interface ManagedCamelContextMBeanExceptionpublic void addOrUpdateRoutesFromXml(String xml) throws Exception
addOrUpdateRoutesFromXml in interface ManagedCamelContextMBeanExceptionpublic void addOrUpdateRoutesFromXml(String xml, boolean urlDecode) throws Exception
addOrUpdateRoutesFromXml in interface ManagedCamelContextMBeanExceptionpublic String dumpRoutesStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception
dumpRoutesStatsAsXml in interface ManagedCamelContextMBeanExceptionpublic String dumpRoutesCoverageAsXml() throws Exception
dumpRoutesCoverageAsXml in interface ManagedCamelContextMBeanExceptionpublic boolean createEndpoint(String uri) throws Exception
ManagedCamelContextMBeancreateEndpoint in interface ManagedCamelContextMBeanuri - uri of endpoint to createException - is thrown if error occurredpublic int removeEndpoints(String pattern) throws Exception
ManagedCamelContextMBeanremoveEndpoints in interface ManagedCamelContextMBeanpattern - the patternException - is thrown if error occurredCamelContext.removeEndpoints(String)public Map<String,Properties> findEips() throws Exception
ManagedCamelContextMBeanfindEips in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic List<String> findEipNames() throws Exception
ManagedCamelContextMBeanfindEipNames in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic TabularData listEips() throws Exception
ManagedCamelContextMBeanlistEips in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic Map<String,Properties> findComponents() throws Exception
ManagedCamelContextMBeanRegistry.findComponents in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic String getComponentDocumentation(String componentName) throws IOException
ManagedCamelContextMBeangetComponentDocumentation in interface ManagedCamelContextMBeancomponentName - the component nameIOExceptionpublic String createRouteStaticEndpointJson()
createRouteStaticEndpointJson in interface ManagedCamelContextMBeanpublic String createRouteStaticEndpointJson(boolean includeDynamic)
createRouteStaticEndpointJson in interface ManagedCamelContextMBeanpublic List<String> findComponentNames() throws Exception
ManagedCamelContextMBeanRegistry.findComponentNames in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic TabularData listComponents() throws Exception
ManagedCamelContextMBeanRegistry.listComponents in interface ManagedCamelContextMBeanException - is thrown if error occurredpublic List<String> completeEndpointPath(String componentName, Map<String,Object> endpointParameters, String completionText) throws Exception
ManagedCamelContextMBeancompleteEndpointPath in interface ManagedCamelContextMBeancomponentName - 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
ManagedCamelContextMBeancomponentParameterJsonSchema in interface ManagedCamelContextMBeancomponentName - the name of the component to lookupException - is thrown if error occurredpublic String dataFormatParameterJsonSchema(String dataFormatName) throws Exception
ManagedCamelContextMBeandataFormatParameterJsonSchema in interface ManagedCamelContextMBeandataFormatName - the name of the data format to lookupException - is thrown if error occurredpublic String languageParameterJsonSchema(String languageName) throws Exception
ManagedCamelContextMBeanlanguageParameterJsonSchema in interface ManagedCamelContextMBeanlanguageName - the name of the language to lookupException - is thrown if error occurredpublic String eipParameterJsonSchema(String eipName) throws Exception
ManagedCamelContextMBeaneipParameterJsonSchema in interface ManagedCamelContextMBeaneipName - the name of the EIP to lookupException - is thrown if error occurredpublic String explainEipJson(String nameOrId, boolean includeAllOptions)
ManagedCamelContextMBeanexplainEipJson in interface ManagedCamelContextMBeannameOrId - the name of the EIP (NamedNode.getShortName() or a node id to refer to a specific node from the routes.includeAllOptions - whether to include non configured options also (eg default options)public String explainComponentJson(String componentName, boolean includeAllOptions) throws Exception
ManagedCamelContextMBeanexplainComponentJson in interface ManagedCamelContextMBeancomponentName - the id of the componentincludeAllOptions - whether to include non configured options also (eg default options)Exceptionpublic String explainEndpointJson(String uri, boolean includeAllOptions) throws Exception
ManagedCamelContextMBeanexplainEndpointJson in interface ManagedCamelContextMBeanuri - the endpoint uriincludeAllOptions - whether to include non configured options also (eg default options)Exceptionpublic void reset(boolean includeRoutes) throws Exception
ManagedCamelContextMBeanreset in interface ManagedCamelContextMBeanincludeRoutes - whether to reset all routes as well.Exception - is thrown if error occurredApache Camel