org.jboss.jms.client.delegate
Class ClientConnectionDelegate

java.lang.Object
  extended by org.jboss.jms.client.delegate.DelegateSupport
      extended by org.jboss.jms.client.delegate.ClientConnectionDelegate
All Implemented Interfaces:
java.io.Serializable, Closeable, ConnectionDelegate, ConnectionEndpoint, Streamable

public class ClientConnectionDelegate
extends DelegateSupport
implements ConnectionDelegate

The client-side Connection delegate class.

Version:
$Revision: 3248 $ $Id: ClientConnectionDelegate.java 3248 2007-10-26 20:14:06Z timfox $
Author:
Tim Fox, Ovidiu Feodorov, Clebert Suconic
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jms.client.delegate.DelegateSupport
client, id, state, version
 
Constructor Summary
ClientConnectionDelegate()
           
ClientConnectionDelegate(java.lang.String objectID, int serverID)
           
 
Method Summary
 void close()
          Close the instance
 long closing(long sequence)
          Tell the instance to prepare to close
 JBossConnectionConsumer createConnectionConsumer(Destination dest, java.lang.String subscriptionName, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 SessionDelegate createSessionDelegate(boolean transacted, int acknowledgmentMode, boolean isXA)
           
 java.lang.String getClientID()
           
 ConnectionMetaData getConnectionMetaData()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 ExceptionListener getExceptionListener()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 IDBlock getIdBlock(int size)
           
 MessagingXid[] getPreparedTransactions()
           
 JMSRemotingConnection getRemotingConnection()
           
 int getServerID()
           
 Version getVersionToUse()
           
 void read(java.io.DataInputStream in)
           
 void registerFailoverListener(FailoverListener l)
          This invocation should be handled by the client-side interceptor chain.
 void sendTransaction(TransactionRequest request, boolean checkForDuplicates)
           
 void setClientID(java.lang.String clientID)
           
 void setExceptionListener(ExceptionListener listener)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 void setRemotingConnection(JMSRemotingConnection conn)
           
 void setState(HierarchicalState state)
           
 void setVersionToUse(Version versionToUse)
           
 void start()
           
 void startAfterFailover()
           
 void stop()
           
 void synchronizeWith(DelegateSupport nd)
          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()
           
 boolean unregisterFailoverListener(FailoverListener l)
          This invocation should be handled by the client-side interceptor chain.
 void write(java.io.DataOutputStream out)
           
 
Methods inherited from class org.jboss.jms.client.delegate.DelegateSupport
doInvoke, doInvokeOneway, getClient, getID, getName, getState, handleThrowable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientConnectionDelegate

public ClientConnectionDelegate(java.lang.String objectID,
                                int serverID)

ClientConnectionDelegate

public ClientConnectionDelegate()
Method Detail

synchronizeWith

public void synchronizeWith(DelegateSupport nd)
                     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

setState

public void setState(HierarchicalState state)
Overrides:
setState in class DelegateSupport

close

public void close()
           throws JMSException
Description copied from interface: Closeable
Close the instance

Specified by:
close in interface Closeable
Throws:
JMSException

closing

public long closing(long sequence)
             throws JMSException
Description copied from interface: Closeable
Tell the instance to prepare to close

Specified by:
closing in interface Closeable
Throws:
JMSException

createConnectionConsumer

public JBossConnectionConsumer createConnectionConsumer(Destination dest,
                                                        java.lang.String subscriptionName,
                                                        java.lang.String messageSelector,
                                                        ServerSessionPool sessionPool,
                                                        int maxMessages)
                                                 throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
createConnectionConsumer in interface ConnectionDelegate
Throws:
JMSException

createSessionDelegate

public SessionDelegate createSessionDelegate(boolean transacted,
                                             int acknowledgmentMode,
                                             boolean isXA)
                                      throws JMSException
Specified by:
createSessionDelegate in interface ConnectionEndpoint
Throws:
JMSException

getClientID

public java.lang.String getClientID()
                             throws JMSException
Specified by:
getClientID in interface ConnectionEndpoint
Throws:
JMSException

getConnectionMetaData

public ConnectionMetaData getConnectionMetaData()
                                         throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getConnectionMetaData in interface ConnectionDelegate
Throws:
JMSException

getExceptionListener

public ExceptionListener getExceptionListener()
                                       throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getExceptionListener in interface ConnectionDelegate
Throws:
JMSException

sendTransaction

public void sendTransaction(TransactionRequest request,
                            boolean checkForDuplicates)
                     throws JMSException
Specified by:
sendTransaction in interface ConnectionEndpoint
Throws:
JMSException

setClientID

public void setClientID(java.lang.String clientID)
                 throws JMSException
Specified by:
setClientID in interface ConnectionEndpoint
Throws:
JMSException

setExceptionListener

public void setExceptionListener(ExceptionListener listener)
                          throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
setExceptionListener in interface ConnectionDelegate
Throws:
JMSException

start

public void start()
           throws JMSException
Specified by:
start in interface ConnectionEndpoint
Throws:
JMSException

startAfterFailover

public void startAfterFailover()
                        throws JMSException
Specified by:
startAfterFailover in interface ConnectionDelegate
Throws:
JMSException

stop

public void stop()
          throws JMSException
Specified by:
stop in interface ConnectionEndpoint
Throws:
JMSException

getPreparedTransactions

public MessagingXid[] getPreparedTransactions()
                                       throws JMSException
Specified by:
getPreparedTransactions in interface ConnectionEndpoint
Throws:
JMSException

registerFailoverListener

public void registerFailoverListener(FailoverListener l)
This invocation should be handled by the client-side interceptor chain.

Specified by:
registerFailoverListener in interface ConnectionDelegate

unregisterFailoverListener

public boolean unregisterFailoverListener(FailoverListener l)
This invocation should be handled by the client-side interceptor chain.

Specified by:
unregisterFailoverListener in interface ConnectionDelegate

getIdBlock

public IDBlock getIdBlock(int size)
                   throws JMSException
Specified by:
getIdBlock in interface ConnectionEndpoint
Throws:
JMSException

setRemotingConnection

public void setRemotingConnection(JMSRemotingConnection conn)

getRemotingConnection

public JMSRemotingConnection getRemotingConnection()

getServerID

public int getServerID()

getVersionToUse

public Version getVersionToUse()

setVersionToUse

public void setVersionToUse(Version versionToUse)

toString

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

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.