org.jboss.messaging.core.remoting.impl
Class ConnectorRegistryImpl
java.lang.Object
org.jboss.messaging.core.remoting.impl.ConnectorRegistryImpl
- All Implemented Interfaces:
- ConnectorRegistry
public class ConnectorRegistryImpl
- extends java.lang.Object
- implements ConnectorRegistry
- Version:
- $Revision$
- Author:
- Jeff Mesnil
Field Summary |
java.util.Map<java.lang.String,org.jboss.messaging.core.remoting.impl.ConnectorRegistryImpl.NIOConnectorHolder> |
connectors
|
static Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final Logger log
connectors
public java.util.Map<java.lang.String,org.jboss.messaging.core.remoting.impl.ConnectorRegistryImpl.NIOConnectorHolder> connectors
ConnectorRegistryImpl
public ConnectorRegistryImpl()
register
public boolean register(Location location,
PacketDispatcher serverDispatcher)
- Specified by:
register
in interface ConnectorRegistry
- Returns:
true
if this Configuration has not already been registered,
false
else
unregister
public boolean unregister(Location location)
- Specified by:
unregister
in interface ConnectorRegistry
- Returns:
true
if this Configuration was registered,
false
else
getConnector
public NIOConnector getConnector(Location location,
ConnectionParams connectionParams)
- Specified by:
getConnector
in interface ConnectorRegistry
removeConnector
public NIOConnector removeConnector(Location location)
- Decrement the number of references on the NIOConnector corresponding to
the Configuration.
If there is only one reference, remove it from the connectors Map and
returns it. Otherwise return null.
- Specified by:
removeConnector
in interface ConnectorRegistry
- Parameters:
location
- a Location
- Returns:
- the NIOConnector if there is no longer any references to it or
null
- Throws:
java.lang.IllegalStateException
- if no NIOConnector were created for the given Configuration
getRegisteredConfigurationSize
public int getRegisteredConfigurationSize()
- Specified by:
getRegisteredConfigurationSize
in interface ConnectorRegistry
getConnectorCount
public int getConnectorCount(Location location)
- Specified by:
getConnectorCount
in interface ConnectorRegistry
clear
public void clear()
- Specified by:
clear
in interface ConnectorRegistry
Copyright © 2006 JBoss Inc. All Rights Reserved.