org.jboss.jms.client.delegate
Class ClientConnectionFactoryDelegate

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

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

The client-side ConnectionFactory delegate class.

Version:
$Revision: 3141 $ $Id: ClientConnectionFactoryDelegate.java 3141 2007-09-26 19:22:42Z ataylor $
Author:
Tim Fox, Ovidiu Feodorov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jms.client.delegate.DelegateSupport
client, id, state, version
 
Constructor Summary
ClientConnectionFactoryDelegate()
           
ClientConnectionFactoryDelegate(java.lang.String uniqueName, java.lang.String objectID, int serverID, java.lang.String serverLocatorURI, Version serverVersion, boolean clientPing, boolean strictTck)
           
 
Method Summary
 CreateConnectionResult createConnectionDelegate(java.lang.String username, java.lang.String password, int failedNodeID)
           
 byte[] getClientAOPStack()
           
 boolean getClientPing()
           
 int getServerID()
           
 java.lang.String getServerLocatorURI()
           
 Version getServerVersion()
           
 boolean getStrictTck()
           
 TopologyResult getTopology()
          Get the current Cluster topology associated with a ClusteredConnectionFactory
static Version getVersionToUse(Version connectionVersion)
           
 void read(java.io.DataInputStream in)
           
 void synchronizeWith(DelegateSupport newDelegate)
          During HA events, delegates corresponding to new enpoints on the new server are created and the state of those delegates has to be transfered to the "failed" delegates.
 java.lang.String toString()
           
 void write(java.io.DataOutputStream out)
           
 
Methods inherited from class org.jboss.jms.client.delegate.DelegateSupport
doInvoke, doInvokeOneway, getClient, getID, getName, getState, handleThrowable, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientConnectionFactoryDelegate

public ClientConnectionFactoryDelegate(java.lang.String uniqueName,
                                       java.lang.String objectID,
                                       int serverID,
                                       java.lang.String serverLocatorURI,
                                       Version serverVersion,
                                       boolean clientPing,
                                       boolean strictTck)

ClientConnectionFactoryDelegate

public ClientConnectionFactoryDelegate()
Method Detail

getVersionToUse

public static Version getVersionToUse(Version connectionVersion)

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

getClientAOPStack

public byte[] getClientAOPStack()
                         throws JMSException
Specified by:
getClientAOPStack in interface ConnectionFactoryEndpoint
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

toString

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

getServerLocatorURI

public java.lang.String getServerLocatorURI()

getServerID

public int getServerID()

getClientPing

public boolean getClientPing()

getServerVersion

public Version getServerVersion()

getStrictTck

public boolean getStrictTck()

synchronizeWith

public void synchronizeWith(DelegateSupport newDelegate)
                     throws java.lang.Exception
Description copied from class: DelegateSupport
During HA events, delegates corresponding to new enpoints on the new server are created and the state of those delegates has to be transfered to the "failed" delegates. For example, a "failed" connection delegate will have to assume the ID of the new connection endpoint, the new RemotingConnection instance, etc.

Overrides:
synchronizeWith in class DelegateSupport
Throws:
java.lang.Exception

read

public void read(java.io.DataInputStream in)
          throws java.lang.Exception
Specified by:
read in interface Streamable
Overrides:
read in class DelegateSupport
Throws:
java.lang.Exception

write

public void write(java.io.DataOutputStream out)
           throws java.lang.Exception
Specified by:
write in interface Streamable
Overrides:
write in class DelegateSupport
Throws:
java.lang.Exception


Copyright © 2006 JBoss Inc. All Rights Reserved.