org.jboss.jms.server.connectionmanager
Class SimpleConnectionManager

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

public class SimpleConnectionManager
extends java.lang.Object
implements ConnectionManager

Version:
$Revision: 2684 $ $Id: SimpleConnectionManager.java 2684 2007-05-15 07:31:30Z timfox $
Author:
Tim Fox, Ovidiu Feodorov

Field Summary
protected  java.util.Set activeConnectionEndpoints
           
protected  java.util.Map jmsClients
           
protected  java.util.Map remotingSessions
           
 
Constructor Summary
SimpleConnectionManager()
           
 
Method Summary
 boolean containsRemotingSession(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, boolean clientToServer)
           
 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)
           
 void start()
           
 void stop()
           
 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

remotingSessions

protected java.util.Map remotingSessions

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

handleClientFailure

public void handleClientFailure(java.lang.String remotingSessionID,
                                boolean clientToServer)
Specified by:
handleClientFailure in interface ConnectionManager
Parameters:
clientToServer - - true if the failure has been detected on a direct connection from client to this server, false if the failure has been detected while trying to send a callback from this server to the client.

handleConnectionException

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

Parameters:
t - - plan for it to be null!

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

containsRemotingSession

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

getClients

public java.util.Map getClients()

toString

public java.lang.String toString()


Copyright © 2006 JBoss Inc. All Rights Reserved.