|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JmsSessionStubIfc
This is the interface that session stubs must implement in order to support remote invocations. This level of indirection will enable us to support different ORB environments. The only restriction is that the stubs must support this interface and that it must have a default constructor.
Method Summary | |
---|---|
void |
acknowledgeMessage(long clientId,
java.lang.String messageId)
Acknowledge the following message If this method does not complete then throw JMSException. |
void |
beforeClose()
This method is called before the call to close , so that the
stub can do some local clean up |
void |
close()
Close and release any resource allocated to this session. |
void |
commit()
Commit the session which will send all the published messages and acknowledge all received messages |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commits an XA transaction that is in progress. |
void |
createBrowser(JmsQueue queue,
long clientId,
java.lang.String selector)
Create a queue browser for this session. |
void |
createPublisher(JmsTopic topic)
Create a publisher endpoint for this session. |
void |
createQueue(JmsQueue queue)
Create a queue with the specified name. |
void |
createReceiver(JmsQueue queue,
long clientId,
java.lang.String selector)
Create a receiver endpoint for this session. |
void |
createSender(JmsQueue queue)
Create a sender endpoint for this session. |
void |
createSubscriber(JmsTopic topic,
java.lang.String name,
long clientId,
java.lang.String selector,
boolean noLocal)
Create a subscriber endpoint for this session. |
void |
createTopic(JmsTopic topic)
Create a topic with the specified name. |
void |
deleteBrowser(long clientId)
Delete the queue browser associated with the corresponding client id. |
void |
deleteReceiver(long clientId)
Delete the receiver with the corresponding client id. |
void |
deleteSubscriber(long clientId)
Delete the subscriber associated with the sepcified identity. |
void |
enableAsynchronousDelivery(long clientId,
java.lang.String id,
boolean enable)
Enable or disable asynchronous message delivery for a particular consumer |
void |
end(javax.transaction.xa.Xid xid,
int flags)
Ends the work performed on behalf of a transaction branch. |
void |
forget(javax.transaction.xa.Xid xid)
Tell the resource manager to forget about a heuristically completed transaction branch. |
java.lang.String |
getClientId()
Return the client id associated with this session. |
java.lang.String |
getResourceManagerId()
Return the identity of the associated resource manager. |
java.lang.String |
getSessionId()
Return the session identity. |
int |
getTransactionTimeout()
Return the transaction timeout for this instance of the resource manager. |
int |
prepare(javax.transaction.xa.Xid xid)
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid |
javax.jms.Message |
receiveMessage(long clientId,
long wait)
Return the next message for the specified client. |
java.util.Vector |
receiveMessages(long clientId,
int count)
Return a collection of messages from the specified client upto the nominated count. |
void |
recover()
Recover the session. |
javax.transaction.xa.Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager. |
void |
rollback()
Rollback the session, which will not acknowledge any of the sent messages |
void |
rollback(javax.transaction.xa.Xid xid)
Inform the resource manager to roll back work done on behalf of a transaction branch |
void |
sendMessage(javax.jms.Message message)
Send the specified message to the server. |
void |
sendMessages(java.util.Vector messages)
Send the specified messages to the server. |
void |
setMessageListener(JmsMessageListener listener)
Set the listener for this session. |
boolean |
setTransactionTimeout(int seconds)
Set the current transaction timeout value for this XAResource instance. |
void |
start(javax.transaction.xa.Xid xid,
int flags)
Start work on behalf of a transaction branch specified in xid If TMJOIN is specified, the start is for joining a transaction previously seen by the resource manager |
void |
startMessageDelivery()
Start message delivery to this session |
void |
stopMessageDelivery()
Stop message delivery to this session |
void |
unsubscribe(java.lang.String name)
Unsubscribe a durable subscription |
Method Detail |
---|
java.lang.String getClientId() throws javax.jms.JMSException
javax.jms.JMSException
- for any JMS errorjava.lang.String getSessionId() throws javax.jms.JMSException
javax.jms.JMSException
- for any JMS errorvoid beforeClose() throws javax.jms.JMSException
close
, so that the
stub can do some local clean up
javax.jms.JMSException
- for any JMS errorvoid close() throws javax.jms.JMSException
javax.jms.JMSException
- for any JMS errorvoid acknowledgeMessage(long clientId, java.lang.String messageId) throws javax.jms.JMSException
clientId
- the identity ofthe clientmessageId
- the message identity to ack
javax.jms.JMSException
- for any JMS errorvoid sendMessage(javax.jms.Message message) throws javax.jms.JMSException
message
- the message to send
javax.jms.JMSException
- for any JMS errorvoid sendMessages(java.util.Vector messages) throws javax.jms.JMSException
messages
- the messages to send
javax.jms.JMSException
- for any JMS errorjavax.jms.Message receiveMessage(long clientId, long wait) throws javax.jms.JMSException
clientId
- the client identitywait
- the number of ms to wait. -1 means wait indefinitely.
javax.jms.JMSException
- for any JMS errorjava.util.Vector receiveMessages(long clientId, int count) throws javax.jms.JMSException
client
- the client identitycount
- max messages to return
javax.jms.JMSException
- for any JMS errorvoid createQueue(JmsQueue queue) throws javax.jms.JMSException
queue
- the queue to create
javax.jms.JMSException
- for any JMS errorvoid createTopic(JmsTopic topic) throws javax.jms.JMSException
topic
- the topic to create
javax.jms.JMSException
- for any JMS errorvoid createReceiver(JmsQueue queue, long clientId, java.lang.String selector) throws javax.jms.JMSException
You cannot create more than one receiver for the same destination
queue
- the receiver destinationclientId
- the session allocated identifier of this consumerselector
- the message selector. This may be null.
javax.jms.JMSException
- for any JMS errorvoid createSender(JmsQueue queue) throws javax.jms.JMSException
You cannot create more than one receiver for the same destination
queue
- the receiver destination
javax.jms.JMSException
- for any JMS errorvoid createBrowser(JmsQueue queue, long clientId, java.lang.String selector) throws javax.jms.JMSException
You cannot create more than one queue browser for the same queue in a single session.
queue
- the queue to browseclientId
- the client identityselector
- the message selector. This may be null
javax.jms.JMSException
- for any JMS errorvoid deleteReceiver(long clientId) throws javax.jms.JMSException
clientId
- the identity of the receiver to delete
javax.jms.JMSException
- for any JMS errorvoid deleteBrowser(long clientId) throws javax.jms.JMSException
clientId
- the id of the browser
javax.jms.JMSException
- for any JMS errorvoid createSubscriber(JmsTopic topic, java.lang.String name, long clientId, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
You cannot create more than one subscriber for the same destination
topic
- subscriber destinationname
- name of the consumer associated with the subscriber.
This may be null.clientId
- the session allocated identifier of this consumerselector
- message selector. This may be null.noLocal
- inhibit consuming messages on same connection.
javax.jms.JMSException
- for any JMS errorvoid createPublisher(JmsTopic topic) throws javax.jms.JMSException
You cannot create more than one publisher for the same destination
topic
- receiver destination
javax.jms.JMSException
- for any JMS errorvoid deleteSubscriber(long clientId) throws javax.jms.JMSException
clientid
- the client identity
javax.jms.JMSException
- for any JMS errorvoid unsubscribe(java.lang.String name) throws javax.jms.JMSException
name
- the name used to identify the subscription
javax.jms.JMSException
- for any JMS errorvoid stopMessageDelivery() throws javax.jms.JMSException
javax.jms.JMSException
- for any JMS errorvoid startMessageDelivery() throws javax.jms.JMSException
javax.jms.JMSException
- for any JMS errorvoid setMessageListener(JmsMessageListener listener)
listener
- the message listenervoid enableAsynchronousDelivery(long clientId, java.lang.String id, boolean enable) throws javax.jms.JMSException
clientId
- the id of the client to checkid
- the message id of the last delivered messageenable
- true to enable; false to disable
javax.jms.JMSException
- for any JMS errorvoid recover() throws javax.jms.JMSException
javax.jms.JMSException
- if the session cannot be recoveredvoid commit() throws javax.jms.JMSException
javax.jms.JMSException
- if the session cannot be committedvoid rollback() throws javax.jms.JMSException
javax.jms.JMSException
- if the session cannot be rolled backvoid commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
xid
- the xa transaction identityonePhase
- true if it is a one phase commit
javax.transaction.xa.XAException
- if there is a problem completing the callvoid end(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
xid
- the xa transaction identityflags
- one of TMSUCCESS, TMFAIL, or TMSUSPEND
javax.transaction.xa.XAException
- if there is a problem completing the callvoid forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- the xa transaction identity
javax.transaction.xa.XAException
- if there is a problem completing the callint getTransactionTimeout() throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- if there is a problem completing the callint prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- the xa transaction identity
javax.transaction.xa.XAException
- if there is a problem completing the calljavax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
flag
- One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
javax.transaction.xa.XAException
- - if there is a problem completing the callvoid rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- the xa transaction identity
javax.transaction.xa.XAException
- if there is a problem completing the callboolean setTransactionTimeout(int seconds) throws javax.transaction.xa.XAException
seconds
- timeout in seconds
javax.transaction.xa.XAException
- if there is a problem completing the callvoid start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
xid
- the xa transaction identityflags
- One of TMNOFLAGS, TMJOIN, or TMRESUME
javax.transaction.xa.XAException
- if there is a problem completing the calljava.lang.String getResourceManagerId() throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- if there is a problem completing the call
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |