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: 7644 $ $Id: ClientClusteredConnectionFactoryDelegate.java 7644 2009-07-30 09:54:57Z gaohoward $
Author:
Ovidiu Feodorov, Clebert Suconic, Tim Fox, Howard Gao
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jms.client.delegate.DelegateSupport
client, id, onewayClient, state, version
 
Constructor Summary
ClientClusteredConnectionFactoryDelegate(java.lang.String uniqueName, ClientConnectionFactoryDelegate[] delegates, java.util.Map failoverMap, LoadBalancingPolicy loadBalancingPolicy, boolean supportsFailover, boolean enableOrderingGroup, java.lang.String defaultOrderingGroupName)
           
 
Method Summary
 void closeCallback(boolean isConnFailure)
           
 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(boolean isConnFailure)
           
protected  void finalize()
           
 byte[] getClientAOPStack()
           
 java.lang.String getDefaultOrderingGroupName()
           
 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 isEnableOrderingGroup()
           
 boolean isSupportsFailover()
           
 void setDefaultOrderingGroupName(java.lang.String defaultOrderingGroupName)
           
 void setDelegates(ClientConnectionFactoryDelegate[] dels)
           
 void setEnableOrderingGroup(boolean enableOrderingGroup)
           
 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,
                                                boolean enableOrderingGroup,
                                                java.lang.String defaultOrderingGroupName)
Method Detail

establishCallback

public void establishCallback(boolean isConnFailure)

finalize

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

closeCallback

public void closeCallback(boolean isConnFailure)

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

setEnableOrderingGroup

public void setEnableOrderingGroup(boolean enableOrderingGroup)
Parameters:
enableOrderingGroup - the enableOrderingGroup to set

isEnableOrderingGroup

public boolean isEnableOrderingGroup()
Returns:
the enableOrderingGroup

setDefaultOrderingGroupName

public void setDefaultOrderingGroupName(java.lang.String defaultOrderingGroupName)
Parameters:
defaultOrderingGroupName - the defaultOrderingGroupName to set

getDefaultOrderingGroupName

public java.lang.String getDefaultOrderingGroupName()
Returns:
the defaultOrderingGroupName


Copyright © 2006 JBoss Inc. All Rights Reserved.