org.jboss.mx.remoting
Class MBeanServerLocator

java.lang.Object
  extended by org.jboss.mx.remoting.MBeanServerLocator
All Implemented Interfaces:
Serializable

public class MBeanServerLocator
extends Object
implements Serializable

MBeanServerLocator is an object that is used to identify and locate an MBeanServer on the network via JMX Remoting.

The MBeanServerLocator can be serialized and passed across the network, as long as the target server has access back to the MBeanServer via JMX Remoting Connector and has been detected by a JMX Remoting Detector.

Version:
$Revision: 81023 $
Author:
Jeff Haynie
See Also:
Serialized Form

Field Summary
protected  MBeanServer server
           
 
Constructor Summary
MBeanServerLocator(org.jboss.remoting.ident.Identity identity)
           
 
Method Summary
 boolean equals(Object obj)
           
 InetAddress getAddress()
          return the InetAddress for the MBeanServer
 org.jboss.remoting.ident.Identity getIdentity()
          return the identity of the server
 String getInstanceId()
          return the MBeanServer InstanceID
 MBeanServer getMBeanServer()
          return a proxy to the MBeanServer
 String getServerId()
          return the MBeanServer ID
 int hashCode()
           
protected  MBeanServer resolveServer()
          try and resolve the serverid to a MBeanServer instance or proxy to a remote server
 void setAutoLocate(boolean autoLocate)
          set true (default) to automatically locate the appropriate MBeanServer on deserialization or false to only locate on demand to the call to getMBeanServer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

server

protected transient MBeanServer server
Constructor Detail

MBeanServerLocator

public MBeanServerLocator(org.jboss.remoting.ident.Identity identity)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

getServerId

public String getServerId()
return the MBeanServer ID

Returns:

getIdentity

public final org.jboss.remoting.ident.Identity getIdentity()
return the identity of the server

Returns:

getInstanceId

public String getInstanceId()
return the MBeanServer InstanceID

Returns:

getAddress

public InetAddress getAddress()
return the InetAddress for the MBeanServer

Returns:

getMBeanServer

public MBeanServer getMBeanServer()
return a proxy to the MBeanServer

Returns:

resolveServer

protected MBeanServer resolveServer()
                             throws org.jboss.remoting.ConnectionFailedException
try and resolve the serverid to a MBeanServer instance or proxy to a remote server

Returns:
Throws:
org.jboss.remoting.ConnectionFailedException

setAutoLocate

public void setAutoLocate(boolean autoLocate)
set true (default) to automatically locate the appropriate MBeanServer on deserialization or false to only locate on demand to the call to getMBeanServer.

Parameters:
autoLocate -


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.