org.jboss.remoting.transport.async
Class Registry

java.lang.Object
  extended byorg.jboss.remoting.transport.async.Registry

public class Registry
extends Object

An application wide registry to hold objects that must be shared accross application components.

Author:
Hiram Chirino

Field Summary
static boolean MOCK_APPLET_SECURITY
           
 
Constructor Summary
Registry()
           
 
Method Summary
static Channel createAsynchChannel()
          Factory method to create AsynchChannel instances.
static ChannelServer createAsynchChannelServer()
          Factory method to create AsynchChannelServer instances.
static ChannelPool getChannelPool(InvokerLocator uri)
          Keeps a map of uri->ChannelPool objects.
static ChannelServer getDefaultServer()
          Gets the system wide AsynchChannelServer.
static AsyncServerInvoker getServerInvoker()
           
static EDU.oswego.cs.dl.util.concurrent.Executor getWorkManager()
          Provides a thread pool that can be shared accros components.
static void setDefaultServer(ChannelServer server)
          Sets the application wide server.
static void setServerInvoker(AsyncServerInvoker invoker)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOCK_APPLET_SECURITY

public static boolean MOCK_APPLET_SECURITY
Constructor Detail

Registry

public Registry()
Method Detail

createAsynchChannel

public static Channel createAsynchChannel()
Factory method to create AsynchChannel instances. TODO: when the NBIO AsynchChannel is available, this needs a way to choose which implementation is used. (jdk and/or system prop)?


createAsynchChannelServer

public static ChannelServer createAsynchChannelServer()
Factory method to create AsynchChannelServer instances. TODO: when the NBIO AsynchChannelServer is available, this needs a way to choose which implementation is used. (jdk and/or system prop)?


getWorkManager

public static EDU.oswego.cs.dl.util.concurrent.Executor getWorkManager()
Provides a thread pool that can be shared accros components.


getDefaultServer

public static ChannelServer getDefaultServer()
Gets the system wide AsynchChannelServer. If a AsynchChannelServer has not been registed explicitly (when running in the jboss server), It attempts to create an AsynchChannelServer that listens on an annonymous port. Returns null if the AsynchChannelServer cannot be created.


setDefaultServer

public static void setDefaultServer(ChannelServer server)
Sets the application wide server. This gets called when running in the JBoss sever and the server is explicity configured.

Parameters:
server -

getChannelPool

public static ChannelPool getChannelPool(InvokerLocator uri)
                                  throws UnknownHostException
Keeps a map of uri->ChannelPool objects. Creates the ChannelPool if it the first time you access the uri. TODO: think of way to remove ChannelPool objects that are not being used.

Throws:
UnknownHostException

setServerInvoker

public static void setServerInvoker(AsyncServerInvoker invoker)

getServerInvoker

public static AsyncServerInvoker getServerInvoker()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.