public class DefaultJolokiaCamelController extends org.apache.camel.commands.AbstractCamelController implements JolokiaCamelController
CamelController
that uses Jolokia Client to connect to remote JVMs which
has an Jolokia agent running.Constructor and Description |
---|
DefaultJolokiaCamelController() |
Modifier and Type | Method and Description |
---|---|
List<Map<String,Object>> |
browseInflightExchanges(String camelContextName,
int limit,
boolean sortByLongestDuration) |
void |
connect(String url,
String username,
String password)
Connects to the remote JVM using the given url to the remote Jolokia agent
|
String |
explainEipAsJSon(String camelContextName,
String nameOrId,
boolean allOptions) |
String |
explainEndpointAsJSon(String camelContextName,
String uri,
boolean allOptions) |
Map<String,Object> |
getCamelContextInformation(String camelContextName) |
List<Map<String,String>> |
getCamelContexts() |
String |
getCamelContextStatsAsXml(String camelContextName,
boolean fullStats,
boolean includeProcessors) |
List<Map<String,String>> |
getEndpointRuntimeStatistics(String camelContextName) |
List<Map<String,String>> |
getEndpoints(String camelContextName) |
String |
getRestApiDocAsJson(String camelContextName) |
String |
getRestModelAsXml(String camelContextName) |
List<Map<String,String>> |
getRestServices(String camelContextName) |
String |
getRouteModelAsXml(String routeId,
String camelContextName) |
List<Map<String,String>> |
getRoutes(String camelContextName) |
List<Map<String,String>> |
getRoutes(String camelContextName,
String filter) |
String |
getRouteStatsAsXml(String routeId,
String camelContextName,
boolean fullStats,
boolean includeProcessors) |
List<Map<String,String>> |
listComponents(String camelContextName) |
boolean |
ping()
After connecting the ping command can be used to check if the connection works.
|
void |
resetRouteStats(String camelContextName) |
void |
resumeContext(String camelContextName) |
void |
resumeRoute(String camelContextName,
String routeId) |
void |
startContext(String camelContextName) |
void |
startRoute(String camelContextName,
String routeId) |
void |
stopContext(String camelContextName) |
void |
stopRoute(String camelContextName,
String routeId) |
void |
suspendContext(String camelContextName) |
void |
suspendRoute(String camelContextName,
String routeId) |
void |
using(org.jolokia.client.J4pClient client)
To use the existing
J4pClient with this controller. |
componentInfo, getCamelContexts, listComponentsCatalog, listComponentsLabelCatalog, listDataFormatsCatalog, listDataFormatsLabelCatalog, listEipsCatalog, listEipsLabelCatalog, listLanguagesCatalog, listLanguagesLabelCatalog, loadProperties
public void using(org.jolokia.client.J4pClient client)
JolokiaCamelController
J4pClient
with this controller.using
in interface JolokiaCamelController
client
- the client to usepublic void connect(String url, String username, String password) throws Exception
JolokiaCamelController
connect
in interface JolokiaCamelController
url
- the url for the remote jolokia agentusername
- optional usernamepassword
- optional passwordException
- can be thrownpublic boolean ping()
JolokiaCamelController
ping
in interface JolokiaCamelController
public Map<String,Object> getCamelContextInformation(String camelContextName) throws Exception
getCamelContextInformation
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getCamelContexts() throws Exception
getCamelContexts
in interface org.apache.camel.commands.CamelController
Exception
public String getCamelContextStatsAsXml(String camelContextName, boolean fullStats, boolean includeProcessors) throws Exception
getCamelContextStatsAsXml
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,Object>> browseInflightExchanges(String camelContextName, int limit, boolean sortByLongestDuration) throws Exception
browseInflightExchanges
in interface org.apache.camel.commands.CamelController
Exception
public void startContext(String camelContextName) throws Exception
startContext
in interface org.apache.camel.commands.CamelController
Exception
public void stopContext(String camelContextName) throws Exception
stopContext
in interface org.apache.camel.commands.CamelController
Exception
public void suspendContext(String camelContextName) throws Exception
suspendContext
in interface org.apache.camel.commands.CamelController
Exception
public void resumeContext(String camelContextName) throws Exception
resumeContext
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getRoutes(String camelContextName) throws Exception
getRoutes
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getRoutes(String camelContextName, String filter) throws Exception
getRoutes
in interface org.apache.camel.commands.CamelController
Exception
public void resetRouteStats(String camelContextName) throws Exception
resetRouteStats
in interface org.apache.camel.commands.CamelController
Exception
public void startRoute(String camelContextName, String routeId) throws Exception
startRoute
in interface org.apache.camel.commands.CamelController
Exception
public void stopRoute(String camelContextName, String routeId) throws Exception
stopRoute
in interface org.apache.camel.commands.CamelController
Exception
public void suspendRoute(String camelContextName, String routeId) throws Exception
suspendRoute
in interface org.apache.camel.commands.CamelController
Exception
public void resumeRoute(String camelContextName, String routeId) throws Exception
resumeRoute
in interface org.apache.camel.commands.CamelController
Exception
public String getRouteModelAsXml(String routeId, String camelContextName) throws Exception
getRouteModelAsXml
in interface org.apache.camel.commands.CamelController
Exception
public String getRouteStatsAsXml(String routeId, String camelContextName, boolean fullStats, boolean includeProcessors) throws Exception
getRouteStatsAsXml
in interface org.apache.camel.commands.CamelController
Exception
public String getRestModelAsXml(String camelContextName) throws Exception
getRestModelAsXml
in interface org.apache.camel.commands.CamelController
Exception
public String getRestApiDocAsJson(String camelContextName) throws Exception
getRestApiDocAsJson
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getEndpoints(String camelContextName) throws Exception
getEndpoints
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getEndpointRuntimeStatistics(String camelContextName) throws Exception
getEndpointRuntimeStatistics
in interface org.apache.camel.commands.CamelController
Exception
public List<Map<String,String>> getRestServices(String camelContextName) throws Exception
getRestServices
in interface org.apache.camel.commands.CamelController
Exception
public String explainEndpointAsJSon(String camelContextName, String uri, boolean allOptions) throws Exception
explainEndpointAsJSon
in interface org.apache.camel.commands.CamelController
Exception
public String explainEipAsJSon(String camelContextName, String nameOrId, boolean allOptions) throws Exception
explainEipAsJSon
in interface org.apache.camel.commands.CamelController
Exception
Apache Camel