org.apache.camel.api.management.mbean
Interface ManagedCamelContextMBean

All Superinterfaces:
ManagedCounterMBean, ManagedPerformanceCounterMBean
All Known Implementing Classes:
ManagedCamelContext

public interface ManagedCamelContextMBean
extends ManagedPerformanceCounterMBean


Method Summary
 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
 Integer getInflightExchanges()
           
 String getLoad01()
           
 String getLoad05()
           
 String getLoad15()
           
 String getManagementName()
           
 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()
           
 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()
           
 
Methods inherited from interface org.apache.camel.api.management.mbean.ManagedPerformanceCounterMBean
dumpStatsAsXml, getDeltaProcessingTime, getExchangesCompleted, getExchangesFailed, getExternalRedeliveries, getFailuresHandled, getFirstExchangeCompletedExchangeId, getFirstExchangeCompletedTimestamp, getFirstExchangeFailureExchangeId, getFirstExchangeFailureTimestamp, getLastExchangeCompletedExchangeId, getLastExchangeCompletedTimestamp, getLastExchangeFailureExchangeId, getLastExchangeFailureTimestamp, getLastProcessingTime, getMaxProcessingTime, getMeanProcessingTime, getMinProcessingTime, getRedeliveries, getTotalProcessingTime, isStatisticsEnabled, setStatisticsEnabled
 
Methods inherited from interface org.apache.camel.api.management.mbean.ManagedCounterMBean
getExchangesTotal, getResetTimestamp, reset
 

Method Detail

getCamelId

@ManagedAttribute(description="Camel ID")
String getCamelId()

getManagementName

@ManagedAttribute(description="Camel Management Name")
String getManagementName()

getCamelVersion

@ManagedAttribute(description="Camel Version")
String getCamelVersion()

getState

@ManagedAttribute(description="Camel State")
String getState()

getUptime

@ManagedAttribute(description="Uptime")
String getUptime()

getProperties

@ManagedAttribute(description="Camel Properties")
Map<String,String> getProperties()

getClassResolver

@ManagedAttribute(description="ClassResolver class name")
String getClassResolver()

getPackageScanClassResolver

@ManagedAttribute(description="PackageScanClassResolver class name")
String getPackageScanClassResolver()

getApplicationContextClassName

@ManagedAttribute(description="ApplicationContext class name")
String getApplicationContextClassName()

getProperty

@ManagedOperation(description="Get the value of a Camel property")
String getProperty(String name)
                   throws Exception
Gets the value of a CamelContext property name

Parameters:
name - the name of the property
Returns:
String the value of the property
Throws:
Exception - is thrown if error occurred

setProperty

@ManagedOperation(description="Set the value of a Camel property")
void setProperty(String name,
                                             String value)
                 throws Exception
Sets the value of a CamelContext property name

Parameters:
name - the name of the property
value - the new value of the property
Throws:
Exception - is thrown if error occurred

getTracing

@ManagedAttribute(description="Tracing")
Boolean getTracing()

setTracing

@ManagedAttribute(description="Tracing")
void setTracing(Boolean tracing)

getInflightExchanges

@ManagedAttribute(description="Current number of inflight Exchanges")
Integer getInflightExchanges()

getTotalRoutes

@ManagedAttribute(description="Total number of routes")
Integer getTotalRoutes()

getStartedRoutes

@ManagedAttribute(description="Current number of started routes")
Integer getStartedRoutes()

setTimeout

@ManagedAttribute(description="Shutdown timeout")
void setTimeout(long timeout)

getTimeout

@ManagedAttribute(description="Shutdown timeout")
long getTimeout()

setTimeUnit

@ManagedAttribute(description="Shutdown timeout time unit")
void setTimeUnit(TimeUnit timeUnit)

getTimeUnit

@ManagedAttribute(description="Shutdown timeout time unit")
TimeUnit getTimeUnit()

setShutdownNowOnTimeout

@ManagedAttribute(description="Whether to force shutdown now when a timeout occurred")
void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)

isShutdownNowOnTimeout

@ManagedAttribute(description="Whether to force shutdown now when a timeout occurred")
boolean isShutdownNowOnTimeout()

getLoad01

@ManagedAttribute(description="Average load over the last minute")
String getLoad01()

getLoad05

@ManagedAttribute(description="Average load over the last five minutes")
String getLoad05()

getLoad15

@ManagedAttribute(description="Average load over the last fifteen minutes")
String getLoad15()

isUseBreadcrumb

@ManagedAttribute(description="Whether breadcrumbs is in use")
boolean isUseBreadcrumb()

isAllowUseOriginalMessage

@ManagedAttribute(description="Whether allowing access to the original message during routing")
boolean isAllowUseOriginalMessage()

isMessageHistory

@ManagedAttribute(description="Whether message history is enabled")
boolean isMessageHistory()

isUseMDCLogging

@ManagedAttribute(description="Whether MDC logging is supported")
boolean isUseMDCLogging()

start

@ManagedOperation(description="Start Camel")
void start()
           throws Exception
Throws:
Exception

stop

@ManagedOperation(description="Stop Camel (shutdown)")
void stop()
          throws Exception
Throws:
Exception

restart

@ManagedOperation(description="Restart Camel (stop and then start)")
void restart()
             throws Exception
Throws:
Exception

suspend

@ManagedOperation(description="Suspend Camel")
void suspend()
             throws Exception
Throws:
Exception

resume

@ManagedOperation(description="Resume Camel")
void resume()
            throws Exception
Throws:
Exception

startAllRoutes

@ManagedOperation(description="Starts all the routes which currently is not started")
void startAllRoutes()
                    throws Exception
Throws:
Exception

sendBody

@ManagedOperation(description="Send body (in only)")
void sendBody(String endpointUri,
                                          Object body)
              throws Exception
Throws:
Exception

sendStringBody

@ManagedOperation(description="Send body (String type) (in only)")
void sendStringBody(String endpointUri,
                                                String body)
                    throws Exception
Throws:
Exception

sendBodyAndHeaders

@ManagedOperation(description="Send body and headers (in only)")
void sendBodyAndHeaders(String endpointUri,
                                                    Object body,
                                                    Map<String,Object> headers)
                        throws Exception
Throws:
Exception

requestBody

@ManagedOperation(description="Request body (in out)")
Object requestBody(String endpointUri,
                                               Object body)
                   throws Exception
Throws:
Exception

requestStringBody

@ManagedOperation(description="Request body (String type) (in out)")
Object requestStringBody(String endpointUri,
                                                     String body)
                         throws Exception
Throws:
Exception

requestBodyAndHeaders

@ManagedOperation(description="Request body and headers (in out)")
Object requestBodyAndHeaders(String endpointUri,
                                                         Object body,
                                                         Map<String,Object> headers)
                             throws Exception
Throws:
Exception

dumpRoutesAsXml

@ManagedOperation(description="Dumps the routes as XML")
String dumpRoutesAsXml()
                       throws Exception
Throws:
Exception

addOrUpdateRoutesFromXml

@ManagedOperation(description="Adds or updates existing routes from XML")
void addOrUpdateRoutesFromXml(String xml)
                              throws Exception
Throws:
Exception

addOrUpdateRoutesFromXml

@ManagedOperation(description="Adds or updates existing routes from XML")
void addOrUpdateRoutesFromXml(String xml,
                                                          boolean urlDecode)
                              throws Exception
Throws:
Exception

dumpRoutesStatsAsXml

@ManagedOperation(description="Dumps the routes stats as XML")
String dumpRoutesStatsAsXml(boolean fullStats,
                                                        boolean includeProcessors)
                            throws Exception
Throws:
Exception

createEndpoint

@ManagedOperation(description="Creates the endpoint by the given URI")
boolean createEndpoint(String uri)
                       throws Exception
Creates the endpoint by the given uri

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

@ManagedOperation(description="Removes endpoints by the given pattern")
int removeEndpoints(String pattern)
                    throws Exception
Removes the endpoint by the given pattern

Parameters:
pattern - the pattern
Returns:
number of endpoints removed
Throws:
Exception - is thrown if error occurred
See Also:
CamelContext.removeEndpoints(String)

findComponents

@ManagedOperation(description="Find all Camel components available in the classpath")
Map<String,Properties> findComponents()
                                      throws Exception
Find information about all the Camel components available in the classpath and Registry.

Returns:
a map with the component name, and value with component details.
Throws:
Exception - is thrown if error occurred

findComponentNames

@ManagedOperation(description="Find all Camel components names available in the classpath")
List<String> findComponentNames()
                                throws Exception
Find the names of all the Camel components available in the classpath and Registry.

Returns:
a list with the names of the camel components
Throws:
Exception - is thrown if error occurred

componentParameterJsonSchema

@ManagedOperation(description="Returns the JSON schema representation of the endpoint parameters for the given component name")
String componentParameterJsonSchema(String componentName)
                                    throws Exception
Returns the JSON schema representation of the endpoint parameters for the given component name

Parameters:
componentName - the name of the component to lookup
Throws:
Exception - is thrown if error occurred

reset

@ManagedOperation(description="Reset counters")
void reset(boolean includeRoutes)
           throws Exception
Resets all the performance counters.

Parameters:
includeRoutes - whether to reset all routes as well.
Throws:
Exception - is thrown if error occurred

completeEndpointPath

@ManagedOperation(description="Returns the list of available endpoint paths for the given component name, endpoint properties and completion text")
List<String> completeEndpointPath(String componentName,
                                                              Map<String,Object> endpointParameters,
                                                              String completionText)
                                  throws Exception
Helper method for tooling which returns the completion list of the endpoint path from the given endpoint name, properties and current path expression.

For example if using the file endpoint, this should complete a list of files (rather like bash completion) or for an ActiveMQ component this should complete the list of queues or topics.

Parameters:
componentName - the component name
endpointParameters - parameters of the endpoint
completionText - the entered text which we want to have completion suggestions for
Throws:
Exception - is thrown if error occurred

getComponentDocumentation

@ManagedOperation(description="Returns the HTML documentation for the given camel component")
String getComponentDocumentation(String componentName)
                                 throws IOException
Returns the HTML documentation for the given camel component

Parameters:
componentName - the component name
Throws:
IOException


Apache Camel