|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas.management.monitoring.JMXProxy
public abstract class JMXProxy
Abstract class acting as a JMXConnector client It is implemented by ServerProxy or ClusterDaemonProxy
Field Summary | |
---|---|
protected javax.management.MBeanServerConnection |
connection
JMX connection |
protected javax.management.remote.JMXConnector |
connector
JMX Connector |
protected java.util.Map |
env
Environment used to get the connection |
static int |
FAILED
Server which can't be reached after a several number of retries |
static int |
INITIAL
This is the initial state |
protected JmxServiceImpl |
jmx
Local JMX server. |
protected static org.objectweb.util.monolog.api.Logger |
logger
logger for traces. |
protected java.lang.String |
name
Unique name of the remote object |
protected java.lang.String |
objectName
The OBJECT_NAME of this Proxy MBean Must be initialized before checking connection. |
static int |
RUNNING
Server is RUNNING and its reacheable |
protected javax.management.ObjectName |
serverOn
The server's ObjectName (this corresponds to the J2EEServer MBean registered in the represented server's MBean server) |
static int |
STARTING
Server is starting (temporary state) |
protected int |
state
State of the remote object (as seen from the proxy) |
static int |
STOPPED
Server is stopped |
static int |
STOPPING
Server is stopping (temporary state) |
static int |
UNKNOWN
Server which started without the discovery and can't be reached after a several number of retries |
static int |
UNREACHABLE
This state is corresponding to the situation when the JMX connection is broken - maybe temporary. |
Constructor Summary | |
---|---|
JMXProxy(DomainMonitor dm,
java.lang.String name,
java.util.Collection urls)
Constructor: saves information and connects if urls is not null or the proxy is created for the local server. |
Method Summary | |
---|---|
protected boolean |
checkConnection()
Check the established connection to the remote object, or try to establish a connection if the connection object is null. |
boolean |
connect(java.util.Collection urls)
Try to connect this Proxy to its Server |
void |
disconnect()
Disconnect the proxy if connected. |
java.lang.Object |
getAttribute(javax.management.ObjectName on,
java.lang.String attribute)
Get an MBean Attribute on the remote server |
javax.management.AttributeList |
getAttributes(javax.management.ObjectName on,
java.lang.String[] attributes)
Get a group of MBean Attributes on the remote server |
javax.management.MBeanServerConnection |
getConnection()
|
java.lang.String |
getConnectionUrl()
|
java.lang.String |
getDomain()
|
java.lang.String |
getName()
|
java.lang.String |
getObjectName()
Return this MBean's name |
int |
getServerState()
Return the int giving the server state |
java.lang.String |
getState()
MBean method returning the state as a String Return the String form of the server state |
java.util.ArrayList |
getUrls()
|
boolean |
isRegistered(javax.management.ObjectName on)
Check if an ObjectName is registered on the remote server |
java.util.Set |
queryNames(javax.management.ObjectName on)
|
void |
setObjectName(java.lang.String on)
Set its OBJECT_NAME and register the MBean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.objectweb.util.monolog.api.Logger logger
protected java.lang.String name
protected java.lang.String objectName
protected javax.management.MBeanServerConnection connection
protected javax.management.remote.JMXConnector connector
protected java.util.Map env
protected JmxServiceImpl jmx
protected javax.management.ObjectName serverOn
protected int state
public static final int INITIAL
public static final int UNREACHABLE
public static final int RUNNING
public static final int STOPPED
public static final int FAILED
public static final int UNKNOWN
public static final int STARTING
public static final int STOPPING
Constructor Detail |
---|
public JMXProxy(DomainMonitor dm, java.lang.String name, java.util.Collection urls)
dm
- reference to the domain monitorname
- the proxy nameurls
- the urls that can be used to establish connectionMethod Detail |
---|
public int getServerState()
public java.lang.String getState()
public void disconnect()
public boolean connect(java.util.Collection urls)
urls
- the urls that can be used to establish connection
protected boolean checkConnection()
public java.lang.String getName()
public java.lang.String getObjectName()
public void setObjectName(java.lang.String on)
on
- OBJECT_NAMEpublic javax.management.MBeanServerConnection getConnection()
public boolean isRegistered(javax.management.ObjectName on)
on
- the ObjectName to be checked
public java.lang.Object getAttribute(javax.management.ObjectName on, java.lang.String attribute)
on
- the MBean's ObjectNameattribute
- the attribute name
public javax.management.AttributeList getAttributes(javax.management.ObjectName on, java.lang.String[] attributes)
on
- the MBean's ObjectNameattributes
- the attributes names
public java.util.Set queryNames(javax.management.ObjectName on)
on
- the MBean's ObjectName
public java.lang.String getDomain()
public java.lang.String getConnectionUrl()
public java.util.ArrayList getUrls()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |