org.jboss.mx.remoting
Class MBeanTransportPreference

java.lang.Object
  extended byorg.jboss.mx.remoting.MBeanTransportPreference

public class MBeanTransportPreference
extends java.lang.Object

MBeanTransportPreference is a utility class that will take into account the VM's setup transport preferences when trying to create a preferred connection back to a remote MBeanServer. Since there are cases when multiple invoker transports can exist and all be valid, this will help determine which order the transports should be attempted. You wouldn't want to connect via SOAP, in most cases, when TCP/IP via Sockets is available. There are cases however you do want to explicitly choose SOAP vs. Sockets or RMI, and in which case your preference order might be soap, socket, rmi.


Constructor Summary
MBeanTransportPreference()
           
 
Method Summary
static MBeanServer (src) getServerByTransport(Identity (src)  identity, InvokerLocator (src) [] locators)
          return a server transport to a MBeanServer on a remote server, using the transport preference order specified by the user
static java.lang.String[] getTransportPreferences()
          get the order to use when selecting transports to connect to a remote server
static void setLocalServer(MBeanServer (src)  server, Identity (src)  identity)
           
static void setTransportPreferences(java.lang.String[] order)
          set the order to use when selecting transports to connect to a remote server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanTransportPreference

public MBeanTransportPreference()
Method Detail

setLocalServer

public static void setLocalServer(MBeanServer (src)  server,
                                  Identity (src)  identity)

setTransportPreferences

public static void setTransportPreferences(java.lang.String[] order)
set the order to use when selecting transports to connect to a remote server

Parameters:
order -

getTransportPreferences

public static java.lang.String[] getTransportPreferences()
get the order to use when selecting transports to connect to a remote server

Returns:

getServerByTransport

public static MBeanServer (src)  getServerByTransport(Identity (src)  identity,
                                               InvokerLocator (src) [] locators)
                                        throws ConnectionFailedException (src) 
return a server transport to a MBeanServer on a remote server, using the transport preference order specified by the user

Parameters:
identity -
locators -
Returns:
Throws:
ConnectionFailedException (src)