org.jboss.jms.server.connectionmanager
Class SimpleConnectionManager

java.lang.Object
  extended byorg.jboss.jms.server.connectionmanager.SimpleConnectionManager
All Implemented Interfaces:
ConnectionManager

public class SimpleConnectionManager
extends java.lang.Object
implements ConnectionManager

Version:
1.1 SimpleConnectionManager.java,v 1.1 2006/02/21 07:44:00 timfox Exp
Author:
Tim Fox, Ovidiu Feodorov

Field Summary
protected  java.util.Set activeConnectionEndpoints
           
protected  java.util.Map jmsClients
           
protected  java.util.Map sessions
           
 
Constructor Summary
SimpleConnectionManager()
           
 
Method Summary
 boolean containsSession(java.lang.String remotingClientSessionID)
           
 java.util.List getActiveConnections()
          Returns a list of active connection endpoints currently maintained by an instance of this manager.
 java.util.Map getClients()
           
 void handleClientFailure(java.lang.String remotingSessionID)
           
 void handleConnectionException(java.lang.Throwable t, Client client)
          Be aware that ConnectionNotifier uses to call this method with null Throwables.
 void registerConnection(java.lang.String jmsClientVMId, java.lang.String remotingClientSessionID, ConnectionEndpoint endpoint)
           
 java.lang.String toString()
           
 ConnectionEndpoint unregisterConnection(java.lang.String jmsClientVMId, java.lang.String remotingClientSessionID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

jmsClients

protected java.util.Map jmsClients

sessions

protected java.util.Map sessions

activeConnectionEndpoints

protected java.util.Set activeConnectionEndpoints
Constructor Detail

SimpleConnectionManager

public SimpleConnectionManager()
Method Detail

registerConnection

public void registerConnection(java.lang.String jmsClientVMId,
                               java.lang.String remotingClientSessionID,
                               ConnectionEndpoint endpoint)
Specified by:
registerConnection in interface ConnectionManager

unregisterConnection

public ConnectionEndpoint unregisterConnection(java.lang.String jmsClientVMId,
                                               java.lang.String remotingClientSessionID)
Specified by:
unregisterConnection in interface ConnectionManager
Returns:
null if there is no such connection.

getActiveConnections

public java.util.List getActiveConnections()
Description copied from interface: ConnectionManager
Returns a list of active connection endpoints currently maintained by an instance of this manager. The implementation should make a copy of the list to avoid ConcurrentModificationException. The list could be empty, but never null.

Specified by:
getActiveConnections in interface ConnectionManager
Returns:
List

containsSession

public boolean containsSession(java.lang.String remotingClientSessionID)
Specified by:
containsSession in interface ConnectionManager

getClients

public java.util.Map getClients()

handleClientFailure

public void handleClientFailure(java.lang.String remotingSessionID)
Specified by:
handleClientFailure in interface ConnectionManager

handleConnectionException

public void handleConnectionException(java.lang.Throwable t,
                                      Client client)
Be aware that ConnectionNotifier uses to call this method with null Throwables.

Parameters:
t - - expect it to be null!

toString

public java.lang.String toString()


Copyright © 2006 JBoss Inc. All Rights Reserved.