org.jboss.remoting
Class InvokerRegistry

java.lang.Object
  extended byorg.jboss.remoting.InvokerRegistry

public class InvokerRegistry
extends java.lang.Object

InvokerRegistry is a simple registery for creating client and server side Invoker implementations, getting information about the invokers and register as a invoker creator for one or more specific transports.


Constructor Summary
InvokerRegistry()
           
 
Method Summary
static ClientInvoker (src) createClientInvoker(InvokerLocator (src)  locator)
          create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side invoker to a remote server
static ServerInvoker (src) createServerInvoker(InvokerLocator (src)  locator)
          create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the ServerInvocationHandler interface.
static ServerInvoker (src) createServerInvoker(InvokerLocator (src)  locator, java.util.Map configuration)
          create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the ServerInvocationHandler interface along with
static void destroyClientInvoker(InvokerLocator (src)  locator)
          called to destroy any cached RemoteClientInvoker copies inside the registry.
static ClientInvoker (src) [] getClientInvokers()
          return an array of ClientInvokers that are connected
static java.lang.String[] getRegisteredInvokerTransports()
          return an array of String of the registered transports
static InvokerLocator (src) [] getRegisteredServerLocators()
          return an array of InvokerLocators that are local to this VM (server invokers)
static ServerInvoker (src) [] getServerInvokers()
          return an array of ServerInvokers that are connected
static InvokerLocator (src) getSuitableServerLocatorForRemote(InvokerLocator (src)  remote)
          return a suitable local server invoker that can service the remote invoker locator based on a compatible transport
static boolean isClientInvokerRegistered(InvokerLocator (src)  locator)
          returns true if the client invoker is registered in the local JVM for a given locator
static boolean isServerInvokerRegistered(InvokerLocator (src)  locator)
          returns true if the server invoker is registered in the local JVM for a given locator/handler pair
static void registerInvoker(java.lang.String transport, java.lang.Class client, java.lang.Class server)
          register a client/server invoker Class pair for a given transport
static void unregisterInvoker(java.lang.String transport)
          unregister a client/server invoker pair for the given transport
static void unregisterLocator(InvokerLocator (src)  locator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvokerRegistry

public InvokerRegistry()
Method Detail

getRegisteredServerLocators

public static final InvokerLocator (src) [] getRegisteredServerLocators()
return an array of InvokerLocators that are local to this VM (server invokers)

Returns:

getSuitableServerLocatorForRemote

public static InvokerLocator (src)  getSuitableServerLocatorForRemote(InvokerLocator (src)  remote)
return a suitable local server invoker that can service the remote invoker locator based on a compatible transport

Parameters:
remote -
Returns:

getRegisteredInvokerTransports

public static final java.lang.String[] getRegisteredInvokerTransports()
return an array of String of the registered transports

Returns:

getClientInvokers

public static final ClientInvoker (src) [] getClientInvokers()
return an array of ClientInvokers that are connected

Returns:

getServerInvokers

public static final ServerInvoker (src) [] getServerInvokers()
return an array of ServerInvokers that are connected

Returns:

registerInvoker

public static void registerInvoker(java.lang.String transport,
                                   java.lang.Class client,
                                   java.lang.Class server)
register a client/server invoker Class pair for a given transport

Parameters:
transport -
client -
server -

unregisterInvoker

public static void unregisterInvoker(java.lang.String transport)
unregister a client/server invoker pair for the given transport

Parameters:
transport -

unregisterLocator

public static void unregisterLocator(InvokerLocator (src)  locator)

isClientInvokerRegistered

public static boolean isClientInvokerRegistered(InvokerLocator (src)  locator)
returns true if the client invoker is registered in the local JVM for a given locator

Parameters:
locator -
Returns:

destroyClientInvoker

public static void destroyClientInvoker(InvokerLocator (src)  locator)
called to destroy any cached RemoteClientInvoker copies inside the registry. this method must be called when it is determined that a remote server (via the locator) is no longer available.

Parameters:
locator -

createClientInvoker

public static ClientInvoker (src)  createClientInvoker(InvokerLocator (src)  locator)
                                         throws java.lang.Exception
create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side invoker to a remote server

Parameters:
locator -
Returns:
Throws:
java.lang.Exception

isServerInvokerRegistered

public static boolean isServerInvokerRegistered(InvokerLocator (src)  locator)
returns true if the server invoker is registered in the local JVM for a given locator/handler pair

Parameters:
locator -
Returns:

createServerInvoker

public static ServerInvoker (src)  createServerInvoker(InvokerLocator (src)  locator)
                                         throws java.lang.Exception
create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the ServerInvocationHandler interface. Will use the default configuration values for the transport.

Parameters:
locator -
Returns:
Throws:
java.lang.Exception

createServerInvoker

public static ServerInvoker (src)  createServerInvoker(InvokerLocator (src)  locator,
                                                java.util.Map configuration)
                                         throws java.lang.Exception
create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the ServerInvocationHandler interface along with

Parameters:
locator -
Returns:
Throws:
java.lang.Exception