jrun.jms.core.messagemgr
Class DurableConsumerEndpoint
java.lang.Object
|
+--jrun.jms.core.messagemgr.ConsumerEndpoint
|
+--jrun.jms.core.messagemgr.TopicConsumerEndpoint
|
+--jrun.jms.core.messagemgr.DurableConsumerEndpoint
- All Implemented Interfaces:
- DestinationCacheEventListener, DestinationEventListener, Identifiable, java.lang.Runnable, java.io.Serializable
- public class DurableConsumerEndpoint
- extends TopicConsumerEndpoint
A durable subscriber extends ConsumerEndpoint and is only associated
with a Topic destination. The state of the durable subscriber is
maintained across server invocations by the persistent layer
- Version:
- $Revision: 1.10 $ $Date: 2001/10/12 07:55:31 $
- Author:
- Jim Alateras
- See Also:
- Serialized Form
| Fields inherited from class jrun.jms.core.messagemgr.ConsumerEndpoint |
_ackMode, _connectionId, _destroyed, _listener, _messages, _nolocal, _scheduled, _scheduler, _selector, _session, _size, _stopped, _transacted |
|
Method Summary |
void |
activate(long clientId,
java.lang.String selector)
Create a durable consumer endpoint with the specified attributes. |
void |
deactivate()
Active the durable consumer for the specified client using the nominated
selector. |
java.lang.String |
getName()
Return the string form of the destination |
boolean |
isActive()
Check if the remote side of this endpoint is active |
boolean |
messageAdded(MessageImpl message)
This event is called when a non-persistent message is added to the
DestinationCache. |
| Methods inherited from class jrun.jms.core.messagemgr.TopicConsumerEndpoint |
canGarbageCollect, clearMessages, destinationAdded, destinationRemoved, destroy, getDestination, getUnprocessedMessageCount, messageRemoved, persistentMessageRemoved, receiveMessage, recover, returnMessage, run, setLastMessageProcessed, setMessageListener, stopMessageDelivery, unregister |
| Methods inherited from class jrun.jms.core.messagemgr.ConsumerEndpoint |
getAckMode, getClientId, getConnectionId, getId, getIdAsString, getLogger, getMaximumSize, getMessageCount, getNoLocal, getSelector, getSession, getTransacted, getUnsentMessages, hashCode, persistentMessageAdded, schedule, setAckMode, setCacheEvictionPolicy, setClientId, setConnectionId, setMaximumSize, setNoLocal, setSelector, setStopped, setTransacted, shutdown, startMessageDelivery, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
activate
public void activate(long clientId,
java.lang.String selector)
throws javax.jms.JMSException
- Create a durable consumer endpoint with the specified attributes.
It will restore the complete state from the persistent adapter
during construction time.
If it fails to construct the endpoint then it will throw a
JMSException.
- Parameters:
clientId - - the client identity scoped to the sessionselector - - the selector attached to the subscriber- Throws:
JMSException -
deactivate
public void deactivate()
throws javax.jms.JMSException
- Active the durable consumer for the specified client using the nominated
selector. If the durable consumer is already active then raise the
JMSException exception.
- Parameters:
clientId - - the remote clientselector - - the message filter or null- Throws:
JMSException - - if already active
getName
public java.lang.String getName()
- Return the string form of the destination
- Returns:
- String
isActive
public boolean isActive()
- Check if the remote side of this endpoint is active
- Returns:
- boolean - true if active
messageAdded
public boolean messageAdded(MessageImpl message)
- Description copied from interface:
DestinationCacheEventListener
- This event is called when a non-persistent message is added to the
DestinationCache.
- Overrides:
messageAdded in class ConsumerEndpoint
- Following copied from interface:
jrun.jms.core.messagemgr.DestinationCacheEventListener
- Parameters:
message - - message added to cache
Copyright � 2002 Macromedia Corporation. All Rights Reserved.