org.jboss.jms.server.endpoint
Class ServerConnectionFactoryEndpoint

java.lang.Object
  extended by org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint
All Implemented Interfaces:
ConnectionFactoryEndpoint

public class ServerConnectionFactoryEndpoint
extends java.lang.Object
implements ConnectionFactoryEndpoint

Concrete implementation of ConnectionFactoryEndpoint

Version:
$Revision: 3147 $ $Id: ServerConnectionFactoryEndpoint.java 3147 2007-09-27 19:12:12Z anil.saldhana@jboss.com $
Author:
Ovidiu Feodorov, Tim Fox

Constructor Summary
ServerConnectionFactoryEndpoint(java.lang.String uniqueName, java.lang.String id, ServerPeer serverPeer, java.lang.String defaultClientID, JNDIBindings jndiBindings, int preFetchSize, boolean slowConsumers, int defaultTempQueueFullSize, int defaultTempQueuePageSize, int defaultTempQueueDownCacheSize, int dupsOKBatchSize, boolean supportsFailover)
           
 
Method Summary
 void addCallback(java.lang.String VMID, java.lang.String remotingSessionID, ServerInvokerCallbackHandler callbackHandler)
           
 CreateConnectionResult createConnectionDelegate(java.lang.String username, java.lang.String password, int failedNodeID)
           
 CreateConnectionResult createConnectionDelegate(java.lang.String username, java.lang.String password, int failedNodeID, java.lang.String remotingSessionID, java.lang.String clientVMID, byte versionToUse, ServerInvokerCallbackHandler callbackHandler)
           
 byte[] getClientAOPStack()
           
 java.lang.String getID()
           
 JNDIBindings getJNDIBindings()
           
 ServerPeer getServerPeer()
           
 TopologyResult getTopology()
          Get the current Cluster topology associated with a ClusteredConnectionFactory
 boolean isSlowConsumers()
           
 void removeCallback(java.lang.String VMID, java.lang.String remotingSessionID, ServerInvokerCallbackHandler callbackHandler)
           
 java.lang.String toString()
           
 void updateClusteredClients(ClientConnectionFactoryDelegate[] delegates, java.util.Map failoverMap)
          Sends a cluster view update message to its associated ClusteredConnectionFactories.
 void updateTopology(ClientConnectionFactoryDelegate[] delegates, java.util.Map failoverMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerConnectionFactoryEndpoint

public ServerConnectionFactoryEndpoint(java.lang.String uniqueName,
                                       java.lang.String id,
                                       ServerPeer serverPeer,
                                       java.lang.String defaultClientID,
                                       JNDIBindings jndiBindings,
                                       int preFetchSize,
                                       boolean slowConsumers,
                                       int defaultTempQueueFullSize,
                                       int defaultTempQueuePageSize,
                                       int defaultTempQueueDownCacheSize,
                                       int dupsOKBatchSize,
                                       boolean supportsFailover)
Parameters:
jndiBindings - - names under which the corresponding JBossConnectionFactory is bound in JNDI.
Method Detail

createConnectionDelegate

public CreateConnectionResult createConnectionDelegate(java.lang.String username,
                                                       java.lang.String password,
                                                       int failedNodeID)
                                                throws JMSException
Specified by:
createConnectionDelegate in interface ConnectionFactoryEndpoint
failedNodeID - - zero or positive values mean the connection creation attempt is result of failover. Negative values are ignored (mean regular connection creation attempt).
Throws:
JMSException

createConnectionDelegate

public CreateConnectionResult createConnectionDelegate(java.lang.String username,
                                                       java.lang.String password,
                                                       int failedNodeID,
                                                       java.lang.String remotingSessionID,
                                                       java.lang.String clientVMID,
                                                       byte versionToUse,
                                                       ServerInvokerCallbackHandler callbackHandler)
                                                throws JMSException
Parameters:
failedNodeID - - zero or positive values mean connection creation attempt is result of failover. -1 are ignored (mean regular connection creation attempt).
Throws:
JMSException

getClientAOPStack

public byte[] getClientAOPStack()
                         throws JMSException
Specified by:
getClientAOPStack in interface ConnectionFactoryEndpoint
Throws:
JMSException

addCallback

public void addCallback(java.lang.String VMID,
                        java.lang.String remotingSessionID,
                        ServerInvokerCallbackHandler callbackHandler)
                 throws JMSException
Throws:
JMSException

removeCallback

public void removeCallback(java.lang.String VMID,
                           java.lang.String remotingSessionID,
                           ServerInvokerCallbackHandler callbackHandler)
                    throws JMSException
Throws:
JMSException

getTopology

public TopologyResult getTopology()
                           throws JMSException
Description copied from interface: ConnectionFactoryEndpoint
Get the current Cluster topology associated with a ClusteredConnectionFactory

Specified by:
getTopology in interface ConnectionFactoryEndpoint
Throws:
JMSException

getID

public java.lang.String getID()

getJNDIBindings

public JNDIBindings getJNDIBindings()

getServerPeer

public ServerPeer getServerPeer()

updateClusteredClients

public void updateClusteredClients(ClientConnectionFactoryDelegate[] delegates,
                                   java.util.Map failoverMap)
                            throws java.lang.Exception
Sends a cluster view update message to its associated ClusteredConnectionFactories. Observation: It is placed here, because if we decide to lock the ServerEndpoint while we send updates, we would need the method here to perform WriteLocks on objects.

Throws:
java.lang.Exception

updateTopology

public void updateTopology(ClientConnectionFactoryDelegate[] delegates,
                           java.util.Map failoverMap)

isSlowConsumers

public boolean isSlowConsumers()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006 JBoss Inc. All Rights Reserved.