org.apache.camel.component.jmx
Class JMXEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.component.jmx.JMXEndpoint
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class JMXEndpoint
extends org.apache.camel.impl.DefaultEndpoint

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=value&option2=value&...


Field Summary
protected static String ERR_GAUGE_NOTIFY
           
protected static String ERR_OBSERVED_ATTRIBUTE
           
protected static String ERR_PLATFORM_SERVER
           
protected static String ERR_STRING_NOTIFY
           
protected static String ERR_STRING_TO_COMPARE
           
protected static String ERR_THRESHOLD_HIGH
           
protected static String ERR_THRESHOLD_LOW
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
JMXEndpoint(String aEndpointUri, JMXComponent aComponent)
           
 
Method Summary
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor aProcessor)
           
 org.apache.camel.Producer createProducer()
           
 String getFormat()
           
 long getGranularityPeriod()
           
 Object getHandback()
           
 int getInitThreshold()
           
protected  ObjectName getJMXObjectName()
           
 int getModulus()
           
 String getMonitorType()
           
 NotificationFilter getNotificationFilter()
           
 String getObjectDomain()
           
 String getObjectName()
           
 Hashtable<String,String> getObjectProperties()
           
 String getObservedAttribute()
           
 int getOffset()
           
 String getPassword()
           
 int getReconnectDelay()
           
 boolean getReconnectOnConnectionFailure()
           
protected  String getServerURL()
           
 String getStringToCompare()
           
 boolean getTestConnectionOnStartup()
           
 Double getThresholdHigh()
           
 Double getThresholdLow()
           
 String getUser()
           
 boolean isDifferenceMode()
           
 boolean isNotifyDiffer()
           
 boolean isNotifyHigh()
           
 boolean isNotifyLow()
           
 boolean isNotifyMatch()
           
 boolean isPlatformServer()
           
 boolean isSingleton()
           
 boolean isXML()
           
 void setDifferenceMode(boolean aDifferenceMode)
           
 void setFormat(String aFormat)
           
 void setGranularityPeriod(long aGranularityPeriod)
           
 void setHandback(Object aHandback)
           
 void setInitThreshold(int aInitThreshold)
           
protected  void setJMXObjectName(ObjectName aCachedObjectName)
           
 void setModulus(int aModulus)
           
 void setMonitorType(String aMonitorType)
           
 void setNotificationFilter(NotificationFilter aFilterRef)
           
 void setNotifyDiffer(boolean aNotifyDiffer)
           
 void setNotifyHigh(boolean aNotifyHigh)
           
 void setNotifyLow(boolean aNotifyLow)
           
 void setNotifyMatch(boolean aNotifyMatch)
           
 void setObjectDomain(String aObjectDomain)
           
 void setObjectName(String aObjectName)
           
 void setObjectProperties(Hashtable<String,String> aObjectProperties)
          Setter for the ObjectProperties is either called by reflection when processing the URI or manually by the component.
 void setObservedAttribute(String aObservedAttribute)
           
 void setOffset(int aOffset)
           
 void setPassword(String aPassword)
           
 void setReconnectDelay(int reconnectDelay)
           
 void setReconnectOnConnectionFailure(boolean reconnectOnConnectionFailure)
           
protected  void setServerURL(String aServerURL)
           
 void setStringToCompare(String aStringToCompare)
           
 void setTestConnectionOnStartup(boolean testConnectionOnStartup)
           
 void setThresholdHigh(Double aThresholdHigh)
           
 void setThresholdLow(Double aThresholdLow)
           
 void setUser(String aUser)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

ERR_PLATFORM_SERVER

protected static final String ERR_PLATFORM_SERVER
See Also:
Constant Field Values

ERR_THRESHOLD_LOW

protected static final String ERR_THRESHOLD_LOW
See Also:
Constant Field Values

ERR_THRESHOLD_HIGH

protected static final String ERR_THRESHOLD_HIGH
See Also:
Constant Field Values

ERR_GAUGE_NOTIFY

protected static final String ERR_GAUGE_NOTIFY
See Also:
Constant Field Values

ERR_STRING_NOTIFY

protected static final String ERR_STRING_NOTIFY
See Also:
Constant Field Values

ERR_STRING_TO_COMPARE

protected static final String ERR_STRING_TO_COMPARE
See Also:
Constant Field Values

ERR_OBSERVED_ATTRIBUTE

protected static final String ERR_OBSERVED_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

JMXEndpoint

public JMXEndpoint(String aEndpointUri,
                   JMXComponent aComponent)
Method Detail

createConsumer

public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor aProcessor)
                                         throws Exception
Throws:
Exception

createProducer

public org.apache.camel.Producer createProducer()
                                         throws Exception
Throws:
Exception

isSingleton

public boolean isSingleton()

getFormat

public String getFormat()

setFormat

public void setFormat(String aFormat)

isXML

public boolean isXML()

isPlatformServer

public boolean isPlatformServer()

getUser

public String getUser()

setUser

public void setUser(String aUser)

getPassword

public String getPassword()

setPassword

public void setPassword(String aPassword)

getObjectDomain

public String getObjectDomain()

setObjectDomain

public void setObjectDomain(String aObjectDomain)

getObjectName

public String getObjectName()

setObjectName

public void setObjectName(String aObjectName)

getServerURL

protected String getServerURL()

setServerURL

protected void setServerURL(String aServerURL)

getNotificationFilter

public NotificationFilter getNotificationFilter()

setNotificationFilter

public void setNotificationFilter(NotificationFilter aFilterRef)

getHandback

public Object getHandback()

setHandback

public void setHandback(Object aHandback)

getObjectProperties

public Hashtable<String,String> getObjectProperties()

setObjectProperties

public void setObjectProperties(Hashtable<String,String> aObjectProperties)
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

protected ObjectName getJMXObjectName()
                               throws MalformedObjectNameException
Throws:
MalformedObjectNameException

setJMXObjectName

protected void setJMXObjectName(ObjectName aCachedObjectName)

getObservedAttribute

public String getObservedAttribute()

setObservedAttribute

public void setObservedAttribute(String aObservedAttribute)

getGranularityPeriod

public long getGranularityPeriod()

setGranularityPeriod

public void setGranularityPeriod(long aGranularityPeriod)

getMonitorType

public String getMonitorType()

setMonitorType

public void setMonitorType(String aMonitorType)

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

public Double getThresholdHigh()

setThresholdHigh

public void setThresholdHigh(Double aThresholdHigh)

getThresholdLow

public Double getThresholdLow()

setThresholdLow

public void setThresholdLow(Double aThresholdLow)

isNotifyDiffer

public boolean isNotifyDiffer()

setNotifyDiffer

public void setNotifyDiffer(boolean aNotifyDiffer)

isNotifyMatch

public boolean isNotifyMatch()

setNotifyMatch

public void setNotifyMatch(boolean aNotifyMatch)

getStringToCompare

public String getStringToCompare()

setStringToCompare

public void setStringToCompare(String aStringToCompare)

getTestConnectionOnStartup

public boolean getTestConnectionOnStartup()

setTestConnectionOnStartup

public void setTestConnectionOnStartup(boolean testConnectionOnStartup)

getReconnectOnConnectionFailure

public boolean getReconnectOnConnectionFailure()

setReconnectOnConnectionFailure

public void setReconnectOnConnectionFailure(boolean reconnectOnConnectionFailure)

getReconnectDelay

public int getReconnectDelay()

setReconnectDelay

public void setReconnectDelay(int reconnectDelay)


Apache Camel