|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j_spaces.jms.GSSessionImpl
com.j_spaces.jms.GSQueueSessionImpl
public class GSQueueSessionImpl
GigaSpaces implementation of the javax.jms.QueueSession
interface.
A QueueSession
object provides methods for creating
QueueReceiver
, QueueSender
,
TBD --
QueueBrowser
, and TemporaryQueue
objects.
If there are messages that have been received but not acknowledged
when a QueueSession
terminates, these messages will be retained
and redelivered when a consumer next accesses the queue.
A QueueSession
is used for creating Point-to-Point specific
objects. In general, use the Session
object.
The QueueSession
is used to support
existing code. Using the Session
object simplifies the
programming model, and allows transactions to be used across the two
messaging domains.
A QueueSession
cannot be used to create objects specific to the
publish/subscribe domain. The following methods inherit from
Session
, but must throw an
IllegalStateException
if they are used from QueueSession
:
createDurableSubscriber
createTemporaryTopic
createTopic
unsubscribe
Session
,
QueueConnection.createQueueSession(boolean, int)
,
XAQueueSession.getQueueSession()
Field Summary |
---|
Fields inherited from class com.j_spaces.jms.GSSessionImpl |
---|
txLeaseTime |
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Constructor Summary | |
---|---|
GSQueueSessionImpl(com.j_spaces.jms.GSConnectionImpl connection,
boolean transacted,
int acknowledgeMode)
Constructs a queue session. |
Method Summary | |
---|---|
TopicSubscriber |
createDurableSubscriber(Topic topic,
String name)
API method. |
TopicSubscriber |
createDurableSubscriber(Topic topic,
String name,
String selector,
boolean noLocal)
API method. |
TemporaryTopic |
createTemporaryTopic()
Creates a TemporaryTopic object. |
Topic |
createTopic(String topicName)
API method. |
void |
unsubscribe(String name)
API method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GSQueueSessionImpl(com.j_spaces.jms.GSConnectionImpl connection, boolean transacted, int acknowledgeMode) throws JMSException
connection
- The connection the session belongs to.transacted
- true
for a transacted session.acknowledgeMode
- 1 (auto), 2 (client) or 3 (dups ok).
JMSException
- In case of an invalid acknowledge mode.Method Detail |
---|
public TemporaryTopic createTemporaryTopic() throws JMSException
GSSessionImpl
TemporaryTopic
object. Its lifetime will be that
of the TopicConnection
unless it is deleted earlier.
We use the same space proxy we obtained in the session and we write
another External Entry, which will have a class name of 'TempQueue_ < >.
The only message m_consumers that can consume from a temporary
destination are those created by the same connection that created the
destination. Any message producer can send to the temporary destination.
If you close the connection that a temporary destination belongs to, the
destination is closed and its contents lost. You can use temporary
destinations to implement a simple request/reply mechanism. If you create
a temporary destination and specify it as the value of the JMSReplyTo
message header field when you send a message, the consumer of the message
can use the value of the JMSReplyTo field as the destination to which it
sends a reply and can also reference the original request by setting the
JMSCorrelationID header field of the reply message to the value of the
JMSMessageID header field of the request.
createTemporaryTopic
in interface Session
createTemporaryTopic
in interface TopicSession
createTemporaryTopic
in class GSSessionImpl
JMSException
Session.createTemporaryQueue()
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String selector, boolean noLocal) throws JMSException
createDurableSubscriber
in interface Session
createDurableSubscriber
in interface TopicSession
createDurableSubscriber
in class GSSessionImpl
IllegalStateException
- Systematically.
JMSException
Session.createDurableSubscriber(Topic, String, String, boolean)
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException
createDurableSubscriber
in interface Session
createDurableSubscriber
in interface TopicSession
createDurableSubscriber
in class GSSessionImpl
IllegalStateException
- Systematically.
JMSException
Session.createDurableSubscriber(Topic, String)
public Topic createTopic(String topicName) throws JMSException
createTopic
in interface Session
createTopic
in interface TopicSession
createTopic
in class GSSessionImpl
IllegalStateException
- Systematically.
JMSException
Session.createTopic(java.lang.String)
public void unsubscribe(String name) throws JMSException
unsubscribe
in interface Session
unsubscribe
in interface TopicSession
unsubscribe
in class GSSessionImpl
IllegalStateException
- Systematically.
JMSException
Session.unsubscribe(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |