org.jboss.remoting
Class InvokerRegistry

java.lang.Object
  extended by org.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.

Version:
$Revision: 4650 $
Author:
Jeff Haynie, Tom Elrod

Constructor Summary
InvokerRegistry()
           
 
Method Summary
static ClientInvoker createClientInvoker(InvokerLocator locator)
          create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side invoker to a remote server.
static ClientInvoker createClientInvoker(InvokerLocator locator, java.util.Map configuration)
          create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side invoker to a remote server
static ServerInvoker createServerInvoker(InvokerLocator locator)
          create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the ServerInvocationHandler interface.
static ServerInvoker createServerInvoker(InvokerLocator 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 locator, java.util.Map configuration)
          Called to destroy any cached RemoteClientInvoker copies inside the registry.
static void destroyServerInvoker(ServerInvoker invoker)
           
static ClientInvoker[] 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[] getRegisteredServerLocators()
          return an array of InvokerLocators that are local to this VM (server invokers)
static ServerInvoker[] getServerInvokers()
          return an array of ServerInvokers that are connected
static InvokerLocator getSuitableServerLocatorForRemote(InvokerLocator remote)
          return a suitable local server invoker that can service the remote invoker locator based on a compatible transport
static boolean isClientInvokerRegistered(InvokerLocator locator)
          returns true if the client invoker is registered in the local JVM for a given locator
static boolean isServerInvokerRegistered(InvokerLocator locator)
          returns true if the server invoker is registered in the local JVM for a given locator/handler pair
static boolean isSSLSupported(java.lang.String transport)
          Indicates if a specific transport protocol type (e.g.
static void registerInvokerFactories(java.lang.String transport, java.lang.Class clientFactory, java.lang.Class serverFactory)
          register a client/server invoker factory Class pair for a given transport
 java.lang.String toString()
           
static void unregisterInvokerFactories(java.lang.String transport)
          unregister a client/server invoker factory pair for the given transport
static void unregisterLocator(InvokerLocator locator)
           
static void updateServerInvokerLocator(InvokerLocator locator, InvokerLocator newLocator)
          This is needed by the ServerInvoker since it may change the port being used (if port specified was <= 0) to next available port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvokerRegistry

public InvokerRegistry()
Method Detail

getRegisteredServerLocators

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


getSuitableServerLocatorForRemote

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

Parameters:
remote -

getRegisteredInvokerTransports

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


getClientInvokers

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


getServerInvokers

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


registerInvokerFactories

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

Parameters:
transport -
clientFactory - implementation of org.jboss.remoting.transport.ClientFactory
serverFactory - implementation of org.jboss.remoting.transport.ServerFactory

unregisterInvokerFactories

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

Parameters:
transport -

unregisterLocator

public static void unregisterLocator(InvokerLocator locator)

isClientInvokerRegistered

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

Parameters:
locator -

destroyClientInvoker

public static void destroyClientInvoker(InvokerLocator locator,
                                        java.util.Map configuration)
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.


createClientInvoker

public static ClientInvoker createClientInvoker(InvokerLocator locator)
                                         throws java.lang.Exception
create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side invoker to a remote server. Will use the default configuration values for the transport.

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

createClientInvoker

public static ClientInvoker createClientInvoker(InvokerLocator locator,
                                                java.util.Map configuration)
                                         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 locator)
returns true if the server invoker is registered in the local JVM for a given locator/handler pair

Parameters:
locator -

createServerInvoker

public static ServerInvoker createServerInvoker(InvokerLocator 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 createServerInvoker(InvokerLocator 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

destroyServerInvoker

public static void destroyServerInvoker(ServerInvoker invoker)

updateServerInvokerLocator

public static void updateServerInvokerLocator(InvokerLocator locator,
                                              InvokerLocator newLocator)
This is needed by the ServerInvoker since it may change the port being used (if port specified was <= 0) to next available port.

Parameters:
locator -
newLocator -

isSSLSupported

public static boolean isSSLSupported(java.lang.String transport)
                              throws java.lang.Exception
Indicates if a specific transport protocol type (e.g. socket, sslsocket, rmi, https) supports ssl. Note: almost all transports are able to support ssl if socket/serversocket factory is set with an ssl version, so this is really just a hint from the invoker implementation.

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.