org.jboss.jms.client.delegate
Class ClientConsumerDelegate

java.lang.Object
  extended by org.jboss.jms.client.delegate.DelegateSupport
      extended by org.jboss.jms.client.delegate.ClientConsumerDelegate
All Implemented Interfaces:
java.io.Serializable, Closeable, ConsumerDelegate, ConsumerEndpoint, Streamable

public class ClientConsumerDelegate
extends DelegateSupport
implements ConsumerDelegate

The client-side Consumer delegate class.

Version:
$Revision: 3174 $ $Id: ClientConsumerDelegate.java 3174 2007-10-05 15:14:57Z timfox $
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
ClientConsumerDelegate()
           
ClientConsumerDelegate(java.lang.String objectID, int bufferSize, int maxDeliveries, long redeliveryDelay)
           
 
Method Summary
 void changeRate(float newRate)
          Sent to the server to specify a new maximum rate at which to send messages at
 void close()
          Close the instance
 long closing(long sequence)
          Tell the instance to prepare to close
 int getBufferSize()
           
 JBossDestination getDestination()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 int getMaxDeliveries()
           
 MessageListener getMessageListener()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 java.lang.String getMessageSelector()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 boolean getNoLocal()
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 long getRedeliveryDelay()
           
 void read(java.io.DataInputStream in)
           
 Message receive(long timeout)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 void setMessageListener(MessageListener listener)
          This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.
 void setState(HierarchicalState state)
           
 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()
           
 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

ClientConsumerDelegate

public ClientConsumerDelegate(java.lang.String objectID,
                              int bufferSize,
                              int maxDeliveries,
                              long redeliveryDelay)

ClientConsumerDelegate

public ClientConsumerDelegate()
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

changeRate

public void changeRate(float newRate)
                throws JMSException
Description copied from interface: ConsumerEndpoint
Sent to the server to specify a new maximum rate at which to send messages at

Specified by:
changeRate in interface ConsumerEndpoint
Throws:
JMSException

getMessageListener

public MessageListener getMessageListener()
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getMessageListener in interface ConsumerDelegate

receive

public Message receive(long timeout)
                throws JMSException
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
receive in interface ConsumerDelegate
Throws:
JMSException

setMessageListener

public void setMessageListener(MessageListener listener)
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
setMessageListener in interface ConsumerDelegate

getNoLocal

public boolean getNoLocal()
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getNoLocal in interface ConsumerDelegate

getDestination

public JBossDestination getDestination()
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getDestination in interface ConsumerDelegate

getMessageSelector

public java.lang.String getMessageSelector()
This invocation should either be handled by the client-side interceptor chain or by the server-side endpoint.

Specified by:
getMessageSelector in interface ConsumerDelegate

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

toString

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

getBufferSize

public int getBufferSize()

getMaxDeliveries

public int getMaxDeliveries()

getRedeliveryDelay

public long getRedeliveryDelay()


Copyright © 2006 JBoss Inc. All Rights Reserved.