|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.dropboxmq.sessions.SessionImpl net.sf.dropboxmq.sessions.TopicSessionImpl
public class TopicSessionImpl
Created: 10 Mar 2006
Field Summary |
---|
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Constructor Summary | |
---|---|
TopicSessionImpl(DropboxTransaction dropboxTransaction,
ConnectionImpl connection,
Configuration configuration)
|
|
TopicSessionImpl(SessionImpl realSession)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jms.TopicSession |
---|
createDurableSubscriber, createDurableSubscriber, createTemporaryTopic, createTopic, unsubscribe |
Methods inherited from interface javax.jms.Session |
---|
close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener |
Constructor Detail |
---|
public TopicSessionImpl(SessionImpl realSession)
public TopicSessionImpl(DropboxTransaction dropboxTransaction, ConnectionImpl connection, Configuration configuration)
Method Detail |
---|
public TopicSubscriber createSubscriber(Topic topic) throws JMSException
javax.jms.TopicSession
A 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 TopicSession
topic
- the Topic
to subscribe to
JMSException
- if the session fails to create a subscriber
due to some internal error.public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException
javax.jms.TopicSession
A 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 TopicSession
topic
- 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.noLocal
- if set, inhibits the delivery of messages published
by its own connection
JMSException
- if the session fails to create a subscriber
due to some internal error.
InvalidSelectorException
- if the message selector is invalid.public TopicPublisher createPublisher(Topic topic) throws JMSException
javax.jms.TopicSession
A 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 TopicSession
topic
- the Topic
to publish to, or null if this is an
unidentified producer
JMSException
- if the session fails to create a publisher
due to some internal error.public Queue createQueue(String queueName) throws JMSException
javax.jms.Session
Queue
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.
createQueue
in interface Session
createQueue
in class SessionImpl
queueName
- the name of this Queue
Queue
with the given name
JMSException
- if the session fails to create a queue
due to some internal error.public QueueBrowser createBrowser(Queue queue) throws JMSException
javax.jms.Session
QueueBrowser
object to peek at the messages on
the specified queue.
createBrowser
in interface Session
createBrowser
in class SessionImpl
queue
- the queue
to access
JMSException
- if the session fails to create a browser
due to some internal error.public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException
javax.jms.Session
QueueBrowser
object to peek at the messages on
the specified queue using a message selector.
createBrowser
in interface Session
createBrowser
in class SessionImpl
queue
- 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.
InvalidSelectorException
- if the message selector is invalid.public TemporaryQueue createTemporaryQueue() throws JMSException
javax.jms.Session
TemporaryQueue
object. Its lifetime will be that
of the Connection
unless it is deleted earlier.
createTemporaryQueue
in interface Session
createTemporaryQueue
in class SessionImpl
JMSException
- if the session fails to create a temporary queue
due to some internal error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |