com.jmrosengard.xmlbroker.broker
Class PortRegistry
java.lang.Object
|
+--com.jmrosengard.xmlbroker.broker.PortRegistry
- public final class PortRegistry
- extends java.lang.Object
Registers and deregisters Port implementations. Each port
represents an HTTP-level view of a service.
All threads access a single instance. This is efforced using
an adaptation of the Singleton Pattern [Gamma,E. et al. 1995].
Note that the methods are not synchronized since
Hashtable is itself synchronized.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
ports
protected java.util.Hashtable ports
reg
private static PortRegistry reg
PortRegistry
private PortRegistry()
register
public void register(PortKey portKey,
Port port)
- Registers a port
deregister
public void deregister(PortKey portKey)
- Deregisters a port. Does nothing if the key does not
exist in the Hashtable.
getDefaultRegistry
public static PortRegistry getDefaultRegistry()
- The only way to create an instance of PortRegistry
is to use this method.
getPort
public Port getPort(PortKey portKey)
- Returns a reference to the instance Port of port matching
the string in portKey.