public abstract class AbstractLocalCamelController extends AbstractCamelController implements LocalCamelController
LocalCamelController
that implementators should extend when implementing
a controller that runs locally in the same JVM as Camel.Constructor and Description |
---|
AbstractLocalCamelController() |
Modifier and Type | Method and Description |
---|---|
List<Map<String,Object>> |
browseInflightExchanges(String camelContextName,
String route,
int limit,
boolean sortByLongestDuration)
Browses the inflight exchanges
|
String |
explainEipAsJSon(String camelContextName,
String nameOrId,
boolean allOptions)
Explains an EIP
|
String |
explainEndpointAsJSon(String camelContextName,
String uri,
boolean allOptions)
Explains an endpoint uri
|
Map<String,Object> |
getCamelContextInformation(String name)
Gets information about a given Camel context by the given name.
|
String |
getCamelContextStatsAsXml(String camelContextName,
boolean fullStats,
boolean includeProcessors)
Returns detailed CamelContext and route statistics as XML identified by a ID and a Camel context.
|
List<Map<String,String>> |
getEndpointRuntimeStatistics(String camelContextName)
Return endpoint runtime statistics
|
List<Map<String,String>> |
getEndpoints(String camelContextName)
Return the endpoints
|
org.apache.camel.CamelContext |
getLocalCamelContext(String name)
Get a Camel context identified by the given name.
|
String |
getRestApiDocAsJson(String camelContextName)
Return the REST services API documentation as JSon (requires camel-swagger-java on classpath)
|
String |
getRestModelAsXml(String camelContextName)
Return the definition of the REST services as XML for the given Camel context.
|
List<Map<String,String>> |
getRestServices(String camelContextName)
Return the REST services for the given Camel context.
|
String |
getRouteModelAsXml(String routeId,
String camelContextName)
Return the definition of a route as XML identified by a ID and a Camel context.
|
List<Map<String,String>> |
getRoutes(String camelContextName)
Get all routes.
|
List<Map<String,String>> |
getRoutes(String camelContextName,
String filter)
Get all routes filtered by the regex.
|
String |
getRouteStatsAsXml(String routeId,
String camelContextName,
boolean fullStats,
boolean includeProcessors)
Returns detailed route statistics as XML identified by a ID and a Camel context.
|
List<Map<String,String>> |
getTransformers(String camelContextName)
Return the transformers
|
List<Map<String,String>> |
getValidators(String camelContextName)
Return the validators
|
List<Map<String,String>> |
listComponents(String camelContextName)
Lists Components which are in use or available on the classpath and include information
|
void |
resetRouteStats(String camelContextName)
Reset all the route stats for the given Camel context
|
void |
resumeContext(String camelContextName)
Resumes the given Camel context.
|
void |
resumeRoute(String camelContextName,
String routeId)
Resumes the given route
|
void |
startContext(String camelContextName)
Starts the given Camel context.
|
void |
startRoute(String camelContextName,
String routeId)
Starts the given route
|
void |
stopContext(String camelContextName)
Stops the given Camel context.
|
void |
stopRoute(String camelContextName,
String routeId)
Stops the given route
|
void |
suspendContext(String camelContextName)
Suspends the given Camel context.
|
void |
suspendRoute(String camelContextName,
String routeId)
Suspends the given route
|
getCamelContexts, loadProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocalCamelContexts
getCamelContexts, getCamelContexts
public org.apache.camel.CamelContext getLocalCamelContext(String name) throws Exception
LocalCamelController
getLocalCamelContext
in interface LocalCamelController
name
- the Camel context name.Exception
- can be thrownpublic Map<String,Object> getCamelContextInformation(String name) throws Exception
CamelController
getCamelContextInformation
in interface CamelController
name
- the Camel context name.Exception
- can be thrownpublic String getCamelContextStatsAsXml(String camelContextName, boolean fullStats, boolean includeProcessors) throws Exception
CamelController
getCamelContextStatsAsXml
in interface CamelController
camelContextName
- the Camel context.fullStats
- whether to include verbose statsincludeProcessors
- whether to embed per processor stats from the routeException
- can be thrownpublic List<Map<String,Object>> browseInflightExchanges(String camelContextName, String route, int limit, boolean sortByLongestDuration) throws Exception
CamelController
browseInflightExchanges
in interface CamelController
camelContextName
- the Camel context.route
- the Camel route IDlimit
- maximum number of exchanges to returnsortByLongestDuration
- true to sort by longest duration, false to sort by exchange idException
- can be thrownpublic void startContext(String camelContextName) throws Exception
CamelController
startContext
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic void stopContext(String camelContextName) throws Exception
CamelController
stopContext
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic void suspendContext(String camelContextName) throws Exception
CamelController
suspendContext
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic void resumeContext(String camelContextName) throws Exception
CamelController
resumeContext
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic List<Map<String,String>> getRoutes(String camelContextName) throws Exception
CamelController
getRoutes
in interface CamelController
camelContextName
- the Camel context name. If null, all contexts are considered.Exception
- can be thrownpublic List<Map<String,String>> getRoutes(String camelContextName, String filter) throws Exception
CamelController
getRoutes
in interface CamelController
camelContextName
- the Camel context name. If null, all contexts are considered.filter
- the filter which supports * and ? as wildcardsException
- can be thrownpublic void resetRouteStats(String camelContextName) throws Exception
CamelController
resetRouteStats
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic void startRoute(String camelContextName, String routeId) throws Exception
CamelController
startRoute
in interface CamelController
camelContextName
- the Camel context.routeId
- the route ID.Exception
- can be thrownpublic void stopRoute(String camelContextName, String routeId) throws Exception
CamelController
stopRoute
in interface CamelController
camelContextName
- the Camel context.routeId
- the route ID.Exception
- can be thrownpublic void suspendRoute(String camelContextName, String routeId) throws Exception
CamelController
suspendRoute
in interface CamelController
camelContextName
- the Camel context.routeId
- the route ID.Exception
- can be thrownpublic void resumeRoute(String camelContextName, String routeId) throws Exception
CamelController
resumeRoute
in interface CamelController
camelContextName
- the Camel context.routeId
- the route ID.Exception
- can be thrownpublic String getRouteModelAsXml(String routeId, String camelContextName) throws Exception
CamelController
getRouteModelAsXml
in interface CamelController
routeId
- the route ID.camelContextName
- the Camel context.Exception
- can be thrownpublic String getRouteStatsAsXml(String routeId, String camelContextName, boolean fullStats, boolean includeProcessors) throws Exception
CamelController
getRouteStatsAsXml
in interface CamelController
routeId
- the route ID.camelContextName
- the Camel context.fullStats
- whether to include verbose statsincludeProcessors
- whether to embed per processor stats from the routeException
- can be thrownpublic String getRestModelAsXml(String camelContextName) throws Exception
CamelController
getRestModelAsXml
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic String getRestApiDocAsJson(String camelContextName) throws Exception
CamelController
getRestApiDocAsJson
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic List<Map<String,String>> getEndpoints(String camelContextName) throws Exception
CamelController
getEndpoints
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic List<Map<String,String>> getEndpointRuntimeStatistics(String camelContextName) throws Exception
CamelController
getEndpointRuntimeStatistics
in interface CamelController
camelContextName
- the Camel contextException
- can be thrownpublic List<Map<String,String>> getRestServices(String camelContextName) throws Exception
CamelController
getRestServices
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic String explainEndpointAsJSon(String camelContextName, String uri, boolean allOptions) throws Exception
CamelController
explainEndpointAsJSon
in interface CamelController
camelContextName
- the Camel context.uri
- the endpoint uriallOptions
- whether to explain all options, or only the explicit configured options from the uriException
- can be thrownpublic String explainEipAsJSon(String camelContextName, String nameOrId, boolean allOptions) throws Exception
CamelController
explainEipAsJSon
in interface CamelController
camelContextName
- the Camel context.nameOrId
- the name of the EIP (NamedNode.getShortName()
or a node id to refer to a specific node from the routes.allOptions
- whether to explain all options, or only the explicit configured options from the uriException
- can be thrownpublic List<Map<String,String>> listComponents(String camelContextName) throws Exception
CamelController
listComponents
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic List<Map<String,String>> getTransformers(String camelContextName) throws Exception
CamelController
getTransformers
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownpublic List<Map<String,String>> getValidators(String camelContextName) throws Exception
CamelController
getValidators
in interface CamelController
camelContextName
- the Camel context.Exception
- can be thrownApache Camel