org.eclipse.jetty.monitor
Class JMXMonitor

java.lang.Object
  extended by org.eclipse.jetty.monitor.JMXMonitor

public class JMXMonitor
extends Object

JMXMonitor Performs monitoring of the values of the attributes of MBeans and executes specified actions as well as sends notifications of the specified events that have occurred.


Constructor Summary
JMXMonitor()
          Constructs a JMXMonitor instance.
 
Method Summary
 boolean addActions(MonitorAction... actions)
          Adds monitor actions to the monitor
static boolean addMonitorActions(MonitorAction... actions)
           
 MBeanServerConnection getConnection()
           
static JMXMonitor getInstance()
           
static MBeanServerConnection getServiceConnection()
          Retrieves a connection to JMX service
static void main(String[] args)
           
 boolean removeActions(MonitorAction... actions)
          Removes monitor actions from the monitor
static boolean removeMonitorActions(MonitorAction... actions)
           
static void setServiceUrl(String url)
           
 void setUrl(String url)
          Sets the JMX server URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXMonitor

public JMXMonitor()
Constructs a JMXMonitor instance. Used for XML Configuration. !! DO NOT INSTANTIATE EXPLICITLY !!

Method Detail

addActions

public boolean addActions(MonitorAction... actions)
Adds monitor actions to the monitor

Parameters:
actions - monitor actions to add
Returns:
true if successful

removeActions

public boolean removeActions(MonitorAction... actions)
Removes monitor actions from the monitor

Parameters:
actions - monitor actions to remove
Returns:
true if successful

setUrl

public void setUrl(String url)
Sets the JMX server URL

Parameters:
url - URL of the JMX server

getConnection

public MBeanServerConnection getConnection()
                                    throws IOException
Throws:
IOException

getInstance

public static JMXMonitor getInstance()

addMonitorActions

public static boolean addMonitorActions(MonitorAction... actions)

removeMonitorActions

public static boolean removeMonitorActions(MonitorAction... actions)

setServiceUrl

public static void setServiceUrl(String url)

getServiceConnection

public static MBeanServerConnection getServiceConnection()
                                                  throws IOException
Retrieves a connection to JMX service

Returns:
server connection
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.