public class SolTopicSession extends SolSession implements TopicSession
mConnectionConsumerSupport, mConnectionConsumerSupportRAAUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTEDConsumerDispatcherFactoryKey, TransactedSessionKey, XASessionKey| Constructor and Description |
|---|
SolTopicSession(SolConnectionIF connection,
boolean transacted,
int acknowledgeMode,
JMSState state) |
| Modifier and Type | Method and Description |
|---|---|
QueueBrowser |
createBrowser(Queue queue)
Creates a
QueueBrowser object to peek at the messages on
the specified queue. |
QueueBrowser |
createBrowser(Queue queue,
String messageSelector)
Creates a
QueueBrowser object to peek at the messages on
the specified queue using a message selector. |
TopicPublisher |
createPublisher(Topic topic)
Creates a publisher for the specified topic.
|
Queue |
createQueue(String queueName)
Creates a queue identity given a
Queue name. |
TopicSubscriber |
createSubscriber(Topic topic)
Creates a nondurable subscriber to the specified topic.
|
TopicSubscriber |
createSubscriber(Topic topic,
String messageSelector,
boolean noLocal)
Creates a nondurable subscriber to the specified topic, using a
message selector or specifying whether messages published by its
own connection should be delivered to it.
|
TemporaryQueue |
createTemporaryQueue()
Creates a
TemporaryQueue object. |
acknowledge, cancelSends, clearUnackedList, close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDefaultSubscriber, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getConnection, getConsumers, getMessageListener, getName, getProducers, getProperties, getState, getTransacted, isTemporaryQueueUsed, isTemporaryTopicUsed, loadFromConnectionConsumer, loadMessages, onMessageCreate, onMessageSent, recover, remove, remove, remove, rollback, run, setMessageListener, start, stop, unsubscribeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDurableSubscriber, createDurableSubscriber, createTemporaryTopic, createTopic, unsubscribeclose, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListenerpublic SolTopicSession(SolConnectionIF connection, boolean transacted, int acknowledgeMode, JMSState state) throws JMSException
JMSExceptionpublic TopicPublisher createPublisher(Topic topic) throws JMSException
TopicSessionA client uses a TopicPublisher object to publish
messages on a topic.
Each time a client creates a TopicPublisher on a topic, it
defines a
new sequence of messages that have no ordering relationship with the
messages it has previously sent.
createPublisher in interface TopicSessiontopic - the Topic to publish to, or null if this is an
unidentified producerJMSException - if the session fails to create a publisher
due to some internal error.InvalidDestinationException - if an invalid topic is specified.public TopicSubscriber createSubscriber(Topic topic) throws JMSException
TopicSessionA client uses a TopicSubscriber object to receive
messages that have been published to a topic.
Regular TopicSubscriber objects are not durable.
They receive only messages that are published while they are active.
In some cases, a connection may both publish and subscribe to a
topic. The subscriber NoLocal attribute allows a subscriber
to inhibit the delivery of messages published by its own connection.
The default value for this attribute is false.
createSubscriber in interface TopicSessiontopic - the Topic to subscribe toJMSException - if the session fails to create a subscriber
due to some internal error.InvalidDestinationException - if an invalid topic is specified.public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException
TopicSessionA client uses a TopicSubscriber object to receive
messages that have been published to a topic.
Regular TopicSubscriber objects are not durable.
They receive only messages that are published while they are active.
Messages filtered out by a subscriber's message selector will never be delivered to the subscriber. From the subscriber's perspective, they do not exist.
In some cases, a connection may both publish and subscribe to a
topic. The subscriber NoLocal attribute allows a subscriber
to inhibit the delivery of messages published by its own connection.
The default value for this attribute is false.
createSubscriber in interface TopicSessiontopic - the Topic to subscribe tomessageSelector - only messages with properties matching the
message selector expression are delivered. A value of null or
an empty string indicates that there is no message selector
for the message consumer. Supported Since 4.6 SolOS-TR.noLocal - if set, inhibits the delivery of messages published
by its own connection.
Supported Since 5.1 SolOS-TRJMSException - if the session fails to create a subscriber
due to some internal error.InvalidDestinationException - if an invalid topic is specified.InvalidSelectorException - if the message selector is invalid.public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException
SessionQueueBrowser object to peek at the messages on
the specified queue using a message selector.createBrowser in interface SessioncreateBrowser in class SolSessionqueue - the queue to accessmessageSelector - only messages with properties matching the
message selector expression are delivered. A value of null or
an empty string indicates that there is no message selector
for the message consumer.JMSException - if the session fails to create a browser
due to some internal error.InvalidDestinationException - if an invalid destination
is specifiedInvalidSelectorException - if the message selector is invalid.public QueueBrowser createBrowser(Queue queue) throws JMSException
SessionQueueBrowser object to peek at the messages on
the specified queue.createBrowser in interface SessioncreateBrowser in class SolSessionqueue - the queue to accessJMSException - if the session fails to create a browser
due to some internal error.InvalidDestinationException - if an invalid destination
is specifiedpublic Queue createQueue(String queueName) throws JMSException
SessionQueue name.
This facility is provided for the rare cases where clients need to dynamically manipulate queue identity. It allows the creation of a queue identity with a provider-specific name. Clients that depend on this ability are not portable.
Note that this method is not for creating the physical queue.
The physical creation of queues is an administrative task and is not
to be initiated by the JMS API. The one exception is the
creation of temporary queues, which is accomplished with the
createTemporaryQueue method.
Dynamic durables can be enabled through the connection factory property in the JNDI, or overridden through the InitialContext environment usingSupportedProperty.SOLACE_JMS_DYNAMIC_DURABLESand a Boolean value. When enabled, calling this method will cause a durable queue of the name provided to be created on the appliance if it does not already exist. Any durable queue that is created will have its respect-ttl property set to the value of the respect-ttl connection factory property in the JNDI. This value can be overridden through the InitialContext environment usingSupportedProperty.SOLACE_JMS_RESPECT_TIME_TO_LIVEand a Boolean value. If the respect-ttl value differs from the respect-ttl property on an existing durable queue aConfigurationExceptionwill be thrown.
createQueue in interface SessioncreateQueue in class SolSessionqueueName - the name of this Queue. A durable queue of
this name will be created on the appliance if dynamic durables is enabled
and it doesn't already exist.Queue with the given nameJMSException - if the session fails to create a queue
due to some internal error.public TemporaryQueue createTemporaryQueue() throws JMSException
SessionTemporaryQueue object. Its lifetime will be that
of the Connection unless it is deleted earlier.createTemporaryQueue in interface SessioncreateTemporaryQueue in class SolSessionJMSException - if the session fails to create a temporary queue
due to some internal error.Copyright 2004-2019 Solace Corporation. All rights reserved.