org.jboss.jms.client.delegate
Class ClientClusteredConnectionFactoryDelegate

java.lang.Object
  extended by org.jboss.jms.client.delegate.DelegateSupport
      extended by org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate
All Implemented Interfaces:
java.io.Serializable, ConnectionFactoryDelegate, ConnectionFactoryEndpoint, Streamable

public class ClientClusteredConnectionFactoryDelegate
extends DelegateSupport
implements java.io.Serializable, ConnectionFactoryDelegate

A ClientClusteredConnectionFactoryDelegate. It DOESN'T extend DelegateSupport, because none of DelegateSupport's attributes make sense here: there is no corresponding enpoint on the server, there's no ID, etc. This is just a "shallow" delegate, that in turn delegates to its sub-delegates (ClientConnectionFactoryDelegate instances)

Version:
$Revision: 3262 $ $Id: ClientClusteredConnectionFactoryDelegate.java 3262 2007-10-30 09:09:55Z timfox $
Author:
Ovidiu Feodorov, Clebert Suconic, Tim Fox
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jms.client.delegate.DelegateSupport
client, id, state, version
 
Constructor Summary
ClientClusteredConnectionFactoryDelegate(java.lang.String uniqueName, ClientConnectionFactoryDelegate[] delegates, java.util.Map failoverMap, LoadBalancingPolicy loadBalancingPolicy, boolean supportsFailover)
           
 
Method Summary
 void closeCallback()
           
 CreateConnectionResult createConnectionDelegate(java.lang.String username, java.lang.String password, int failedNodeID)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 void establishCallback()
           
protected  void finalize()
           
 byte[] getClientAOPStack()
           
 ClientConnectionFactoryDelegate[] getDelegates()
           
 java.util.Map getFailoverMap()
           
 IDBlock getIdBlock(int size)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 LoadBalancingPolicy getLoadBalancingPolicy()
           
 TopologyResult getTopology()
          Get the current Cluster topology associated with a ClusteredConnectionFactory
 java.lang.String getUniqueName()
           
 boolean isSupportsFailover()
           
 void setDelegates(ClientConnectionFactoryDelegate[] dels)
           
 void setFailoverMap(java.util.Map failoverMap)
           
 void setSupportsFailover(boolean failover)
           
 java.lang.String toString()
           
 void updateFailoverInfo(ClientConnectionFactoryDelegate[] delegates, java.util.Map newFailoverMap)
          Method used to update the delegate and failoverMap during viewChange
 
Methods inherited from class org.jboss.jms.client.delegate.DelegateSupport
doInvoke, doInvokeOneway, getClient, getID, getName, getState, handleThrowable, read, setState, synchronizeWith, write
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientClusteredConnectionFactoryDelegate

public ClientClusteredConnectionFactoryDelegate(java.lang.String uniqueName,
                                                ClientConnectionFactoryDelegate[] delegates,
                                                java.util.Map failoverMap,
                                                LoadBalancingPolicy loadBalancingPolicy,
                                                boolean supportsFailover)
Method Detail

establishCallback

public void establishCallback()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

closeCallback

public void closeCallback()

getClientAOPStack

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

createConnectionDelegate

public CreateConnectionResult createConnectionDelegate(java.lang.String username,
                                                       java.lang.String password,
                                                       int failedNodeID)
                                                throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

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

getIdBlock

public IDBlock getIdBlock(int size)
                   throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Throws:
JMSException

getDelegates

public ClientConnectionFactoryDelegate[] getDelegates()

setDelegates

public void setDelegates(ClientConnectionFactoryDelegate[] dels)

getFailoverMap

public java.util.Map getFailoverMap()

setFailoverMap

public void setFailoverMap(java.util.Map failoverMap)

getLoadBalancingPolicy

public LoadBalancingPolicy getLoadBalancingPolicy()

isSupportsFailover

public boolean isSupportsFailover()

getUniqueName

public java.lang.String getUniqueName()

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

setSupportsFailover

public void setSupportsFailover(boolean failover)

updateFailoverInfo

public void updateFailoverInfo(ClientConnectionFactoryDelegate[] delegates,
                               java.util.Map newFailoverMap)
Method used to update the delegate and failoverMap during viewChange


toString

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


Copyright © 2006 JBoss Inc. All Rights Reserved.