org.jboss.jms.client.delegate
Class DelegateSupport
java.lang.Object
org.jboss.jms.client.delegate.DelegateSupport
- All Implemented Interfaces:
- java.io.Serializable, Streamable
- Direct Known Subclasses:
- ClientBrowserDelegate, ClientClusteredConnectionFactoryDelegate, ClientConnectionDelegate, ClientConnectionFactoryDelegate, ClientConsumerDelegate, ClientProducerDelegate, ClientSessionDelegate
public abstract class DelegateSupport
- extends java.lang.Object
- implements Streamable, java.io.Serializable
Base class for all client-side delegate classes.
Client-side delegate classes provide an empty implementation of the appropriate delegate
interface. The classes are advised using JBoss AOP to provide the client side advice stack.
The methods in the delegate class will never actually be invoked since they will either be
handled in the advice stack or invoked on the server before reaching the delegate.
The delegates are created on the server and serialized back to the client. When they arrive on
the client, the init() method is called which causes the advices to be bound to the advised
class.
- Version:
- $Revision: 3197 $
$Id: DelegateSupport.java 3197 2007-10-18 15:51:20Z timfox $
- Author:
- Tim Fox, Ovidiu Feodorov
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected java.lang.String id
state
protected transient HierarchicalState state
version
protected transient byte version
client
protected transient Client client
DelegateSupport
public DelegateSupport(java.lang.String id)
DelegateSupport
public DelegateSupport()
getName
public java.lang.String getName()
read
public void read(java.io.DataInputStream in)
throws java.lang.Exception
- Specified by:
read
in interface Streamable
- Throws:
java.lang.Exception
write
public void write(java.io.DataOutputStream out)
throws java.lang.Exception
- Specified by:
write
in interface Streamable
- Throws:
java.lang.Exception
getState
public HierarchicalState getState()
setState
public void setState(HierarchicalState state)
getID
public java.lang.String getID()
synchronizeWith
public void synchronizeWith(DelegateSupport newDelegate)
throws java.lang.Exception
- 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.
- Throws:
java.lang.Exception
doInvoke
protected java.lang.Object doInvoke(Client client,
RequestSupport req)
throws JMSException
- Throws:
JMSException
doInvokeOneway
protected java.lang.Object doInvokeOneway(Client client,
RequestSupport req)
throws JMSException
- Throws:
JMSException
handleThrowable
public JMSException handleThrowable(java.lang.Throwable t)
getClient
public Client getClient()
Copyright © 2006 JBoss Inc. All Rights Reserved.