public class ClusterTopicImpl<E extends java.io.Serializable> extends AbstractTopic<E> implements ServerDestination<E>
SubscribeTopic
message to TriadTriadTopicMessage
to the TriadTriadTopicMessage
to all the topic subscribersConstructor and Description |
---|
ClusterTopicImpl() |
ClusterTopicImpl(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(java.lang.String msgId)
Acknowledge receipt of the message.
|
void |
close() |
void |
closeSubscriber(AbstractQueue<E> queue) |
AbstractQueue<E> |
createSubscriber(java.lang.String publisher,
java.lang.String name,
boolean noLocal) |
protected void |
destroy() |
java.lang.String |
getUrl()
Returns the JMS configuration url.
|
boolean |
hasMessage(java.lang.String subscriber) |
protected void |
init() |
void |
notifyMessageAvailable() |
E |
receiveLocal(java.lang.String subscriber,
boolean isAutoAck) |
void |
removeCluster(java.lang.String id)
Removes the message from the store, due to another server handling
it
|
void |
rollback(java.lang.String msgId)
Rollback the message read.
|
void |
send(java.lang.String msgId,
E payload,
int priority,
long expireTime,
java.lang.String publisherId)
Sends a message to the queue
|
void |
sendLocal(java.lang.String msgId,
E payload,
int priority,
long timeout,
java.lang.String publisherId)
Polls the next message from the store.
|
void |
sendLocalAsBackup(java.lang.String msgId,
java.io.Serializable payload,
long timeout) |
void |
setCluster(java.lang.String cluster) |
void |
setPath(Path path) |
void |
subscribeTopic()
Subscribes the topic running on the current node to the Topic Cluster
running on the Triad.
|
drainTo, drainTo, iterator, offer, offer, peek, poll, poll, postConstruct, put, receive, remainingCapacity, setTopicName, size, take
generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, hasMessage, setName, setSerializationHandle, toString
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTopicName, toString
public ClusterTopicImpl()
public ClusterTopicImpl(java.lang.String name)
public void setPath(Path path)
public java.lang.String getUrl()
getUrl
in class AbstractDestination<E extends java.io.Serializable>
public void setCluster(java.lang.String cluster)
@PostConstruct protected void init()
init
in class AbstractTopic<E extends java.io.Serializable>
@PreDestroy protected void destroy()
public void subscribeTopic()
ClusterTopicImpl#subscribeTopic(boolean)
public void send(java.lang.String msgId, E payload, int priority, long expireTime, java.lang.String publisherId)
AbstractDestination
send
in class AbstractDestination<E extends java.io.Serializable>
public void rollback(java.lang.String msgId)
AbstractDestination
rollback
in interface ServerDestination<E extends java.io.Serializable>
rollback
in class AbstractDestination<E extends java.io.Serializable>
public void acknowledge(java.lang.String msgId)
AbstractDestination
acknowledge
in interface ServerDestination<E extends java.io.Serializable>
acknowledge
in class AbstractDestination<E extends java.io.Serializable>
msgId
- message to acknowledgepublic void sendLocal(java.lang.String msgId, E payload, int priority, long timeout, java.lang.String publisherId)
sendLocal
in interface ServerDestination<E extends java.io.Serializable>
public void sendLocalAsBackup(java.lang.String msgId, java.io.Serializable payload, long timeout)
sendLocalAsBackup
in interface ServerDestination<E extends java.io.Serializable>
public E receiveLocal(java.lang.String subscriber, boolean isAutoAck)
receiveLocal
in interface ServerDestination<E extends java.io.Serializable>
public boolean hasMessage(java.lang.String subscriber)
hasMessage
in interface ServerDestination<E extends java.io.Serializable>
public void removeCluster(java.lang.String id)
public void notifyMessageAvailable()
public AbstractQueue<E> createSubscriber(java.lang.String publisher, java.lang.String name, boolean noLocal)
createSubscriber
in class AbstractTopic<E extends java.io.Serializable>
public void closeSubscriber(AbstractQueue<E> queue)
closeSubscriber
in class AbstractTopic<E extends java.io.Serializable>
@PreDestroy public void close()
close
in class AbstractDestination<E extends java.io.Serializable>