Package org.apache.camel.component.jmx
Class JMXEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.jmx.JMXEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.EndpointServiceLocation,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.6.0",
scheme="jmx",
title="JMX",
syntax="jmx:serverURL",
consumerOnly=true,
remote=false,
category=MONITORING,
headersClass=JMXConstants.class)
public class JMXEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.spi.EndpointServiceLocation
Receive JMX notifications.
Endpoint that describes a connection to an mbean.
The component can connect to the local platform mbean server with the following URI:
jmx://platform?options
A remote mbean server url can be provided following the initial JMX scheme like so:
jmx:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi?options
You can append query options to the URI in the following format, ?options=valueinvalid input: '&option2'=valueinvalid input: '&'...-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor aProcessor) org.apache.camel.Producerlongintprotected ObjectNameintintintprotected StringgetUser()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisRemote()booleanbooleanisXML()voidsetDifferenceMode(boolean aDifferenceMode) voidsetExecutorService(ExecutorService executorService) voidvoidsetGranularityPeriod(long aGranularityPeriod) voidsetHandback(Object aHandback) voidsetInitThreshold(int aInitThreshold) protected voidsetJMXObjectName(ObjectName aCachedObjectName) voidsetModulus(int aModulus) voidsetMonitorType(String aMonitorType) voidsetNotificationFilter(NotificationFilter aFilterRef) voidsetNotifyDiffer(boolean aNotifyDiffer) voidsetNotifyHigh(boolean aNotifyHigh) voidsetNotifyLow(boolean aNotifyLow) voidsetNotifyMatch(boolean aNotifyMatch) voidsetObjectDomain(String aObjectDomain) voidsetObjectName(String aObjectName) voidsetObjectProperties(Map<String, String> objectProperties) Setter for the ObjectProperties is either called by reflection when processing the URI or manually by the component.voidsetObservedAttribute(String aObservedAttribute) voidsetOffset(int aOffset) voidsetPassword(String aPassword) voidsetReconnectDelay(int reconnectDelay) voidsetReconnectOnConnectionFailure(boolean reconnectOnConnectionFailure) protected voidsetServerURL(String aServerURL) voidsetStringToCompare(String aStringToCompare) voidsetTestConnectionOnStartup(boolean testConnectionOnStartup) voidsetThresholdHigh(Double aThresholdHigh) voidsetThresholdLow(Double aThresholdLow) voidMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
ERR_PLATFORM_SERVER
- See Also:
-
ERR_THRESHOLD_LOW
- See Also:
-
ERR_THRESHOLD_HIGH
- See Also:
-
ERR_GAUGE_NOTIFY
- See Also:
-
ERR_STRING_NOTIFY
- See Also:
-
ERR_STRING_TO_COMPARE
- See Also:
-
ERR_OBSERVED_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
JMXEndpoint
-
-
Method Details
-
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceorg.apache.camel.Endpoint
-
getServiceUrl
- Specified by:
getServiceUrlin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceProtocol
- Specified by:
getServiceProtocolin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceMetadata
- Specified by:
getServiceMetadatain interfaceorg.apache.camel.spi.EndpointServiceLocation
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor aProcessor) throws Exception - Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createProducer
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
getFormat
-
setFormat
-
isXML
public boolean isXML() -
isPlatformServer
public boolean isPlatformServer() -
getUser
-
setUser
-
getPassword
-
setPassword
-
getObjectDomain
-
setObjectDomain
-
getObjectName
-
setObjectName
-
getServerURL
-
setServerURL
-
getNotificationFilter
-
setNotificationFilter
-
getHandback
-
setHandback
-
getObjectProperties
-
setObjectProperties
Setter for the ObjectProperties is either called by reflection when processing the URI or manually by the component. If the URI contained a value with a reference like "objectProperties=#myHashtable" then the Hashtable will be set in place. If there are extra properties that begin with "key." then the component will create a Hashtable with these values after removing the "key." prefix. -
getJMXObjectName
- Throws:
MalformedObjectNameException
-
setJMXObjectName
-
getObservedAttribute
-
setObservedAttribute
-
getGranularityPeriod
public long getGranularityPeriod() -
setGranularityPeriod
public void setGranularityPeriod(long aGranularityPeriod) -
getMonitorType
-
setMonitorType
-
getInitThreshold
public int getInitThreshold() -
setInitThreshold
public void setInitThreshold(int aInitThreshold) -
getOffset
public int getOffset() -
setOffset
public void setOffset(int aOffset) -
getModulus
public int getModulus() -
setModulus
public void setModulus(int aModulus) -
isDifferenceMode
public boolean isDifferenceMode() -
setDifferenceMode
public void setDifferenceMode(boolean aDifferenceMode) -
isNotifyHigh
public boolean isNotifyHigh() -
setNotifyHigh
public void setNotifyHigh(boolean aNotifyHigh) -
isNotifyLow
public boolean isNotifyLow() -
setNotifyLow
public void setNotifyLow(boolean aNotifyLow) -
getThresholdHigh
-
setThresholdHigh
-
getThresholdLow
-
setThresholdLow
-
isNotifyDiffer
public boolean isNotifyDiffer() -
setNotifyDiffer
public void setNotifyDiffer(boolean aNotifyDiffer) -
isNotifyMatch
public boolean isNotifyMatch() -
setNotifyMatch
public void setNotifyMatch(boolean aNotifyMatch) -
getStringToCompare
-
setStringToCompare
-
isTestConnectionOnStartup
public boolean isTestConnectionOnStartup() -
setTestConnectionOnStartup
public void setTestConnectionOnStartup(boolean testConnectionOnStartup) -
isReconnectOnConnectionFailure
public boolean isReconnectOnConnectionFailure() -
setReconnectOnConnectionFailure
public void setReconnectOnConnectionFailure(boolean reconnectOnConnectionFailure) -
getReconnectDelay
public int getReconnectDelay() -
setReconnectDelay
public void setReconnectDelay(int reconnectDelay) -
getExecutorService
-
setExecutorService
-