|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is an RMI wrapper for the JmsServerSession object. It allows remote access to this object.
For more semantic information on this object refer to org.exolab.jms.server. JmsServerSession.
All the methods throw RemoteException which is used to indicate an RMI specific error.
JmsServerSession
,
RemoteJmsServerConnectionIfc
Method Summary | |
void |
acknowledgeMessage(long clientId,
java.lang.String messageId)
Acknowledge that the message with the following id has been processed |
void |
close()
Close and release any resource allocated to this session. |
void |
commit()
Commit the session. |
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 specified queue from the session. |
void |
deletePublisher(JmsTopic topic)
Delete the publisher for the specified topic. |
void |
deleteReceiver(long clientId)
Delete the specified receiver |
void |
deleteSender(long clientId)
Delete the sender for the specified queue. |
void |
deleteSubscriber(long clientId)
Delete the subscriber for the specified topic. |
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 a reference to the client id. |
java.lang.String |
getResourceManagerId()
Return the resource manager identity |
java.lang.String |
getSessionId()
Return a reference to the session id |
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 upto count messages from the endpoint with the specified client identity. |
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. |
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(RemoteJmsMessageListenerIfc listener)
All server side sessions register with the consumer manager for message consumption (i.e push-model). |
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 |
public java.lang.String getClientId() throws java.rmi.RemoteException
java.rmi.RemoteException
- public java.lang.String getSessionId() throws javax.jms.JMSException, java.rmi.RemoteException
java.rmi.RemoteException
- public void close() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- java.rmi.RemoteException
- public void acknowledgeMessage(long clientId, java.lang.String messageId) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- the client identitymessageId
- id of message to ackjavax.jms.JMSException
- if method does not completejava.rmi.RemoteException
- public void sendMessage(javax.jms.Message message) throws javax.jms.JMSException, java.rmi.RemoteException
message
- message to sendjavax.jms.JMSException
- java.rmi.RemoteException
- public void sendMessages(java.util.Vector messages) throws javax.jms.JMSException, java.rmi.RemoteException
messages
- messages to sendjavax.jms.JMSException
- java.rmi.RemoteException
- public javax.jms.Message receiveMessage(long clientId, long wait) throws javax.jms.JMSException, java.rmi.RemoteException
wait
parameter indicates how long many milliseconds to wait for a message
before returning. If wait
is 0 then do not wait at all. If
wait
is -1 then wait indefinitely for the next messageclientId
- the client identitywait
- number of ms to waitjavax.jms.JMSException
- if there is an app level problemjava.rmi.RemoteException
- if there is a RMI based exception.public java.util.Vector receiveMessages(long clientId, int count) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- the client identitycount
- max number of messages to receivejavax.jms.JMSException
- if there is an app level problemjava.rmi.RemoteException
- if there is a RMI based exception.public void createQueue(JmsQueue queue) throws javax.jms.JMSException, java.rmi.RemoteException
queue
- queue to createjavax.jms.JMSException
- java.rmi.RemoteException
- public void createTopic(JmsTopic topic) throws javax.jms.JMSException, java.rmi.RemoteException
topic
- topic to createjavax.jms.JMSException
- java.rmi.RemoteException
- public void createReceiver(JmsQueue queue, long clientId, java.lang.String selector) throws javax.jms.JMSException, java.rmi.RemoteException
You cannot create more than one receiver for the same destination
queue
- receiver destinationclientId
- the session allocated identifier of
this consumerselector
- the selector to filter messages.
This may be null.JMSException.
- java.rmi.RemoteException
- public void createSender(JmsQueue queue) throws javax.jms.JMSException, java.rmi.RemoteException
You cannot create more than one receiver for the same destination
queue
- receiver destinationJMSException.
- java.rmi.RemoteException
- public void createBrowser(JmsQueue queue, long clientId, java.lang.String selector) throws javax.jms.JMSException, java.rmi.RemoteException
You cannot create more than one queue browser for the same queue in a single session.
queue
- queue to browseclientId
- identity of the clientselector
- message selector. This may be nulljavax.jms.JMSException
- java.rmi.RemoteException
- public void deleteReceiver(long clientId) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- the identity of the receiverJMSException.
- java.rmi.RemoteException
- public void deleteSender(long clientId) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- the unique client identityJMSException.
- java.rmi.RemoteException
- public void deleteBrowser(long clientId) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- - the client identityjavax.jms.JMSException
- java.rmi.RemoteException
- public void createSubscriber(JmsTopic topic, java.lang.String name, long clientId, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException, java.rmi.RemoteException
You cannot create more than one subscriber for the same destination
topic
- subscriber destinationname
- consumer nameclientId
- the session allocated identifier of
this consumerselector
- the selector to filter messages.
This may be null.noLocal
- inhibit consuming messages on same
connection.JMSException.
- java.rmi.RemoteException
- public void createPublisher(JmsTopic topic) throws javax.jms.JMSException, java.rmi.RemoteException
You cannot create more than one publisher for the same destination
topic
- receiver destinationJMSException.
- java.rmi.RemoteException
- public void deleteSubscriber(long clientId) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- the client identityJMSException.
- public void deletePublisher(JmsTopic topic) throws javax.jms.JMSException, java.rmi.RemoteException
topic
- topic nameJMSException.
- RemoteException.
- public void unsubscribe(java.lang.String name) throws javax.jms.JMSException, java.rmi.RemoteException
name
- the name used to identify the
subscriptionjavax.jms.JMSException
- if the subscription cannot be removedjava.rmi.RemoteException
- public void stopMessageDelivery() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- RemoteException.
- public void startMessageDelivery() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- RemoteException.
- public void recover() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- RemoteException.
- public void commit() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- RemoteException.
- public void rollback() throws javax.jms.JMSException, java.rmi.RemoteException
javax.jms.JMSException
- RemoteException.
- public void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityonePhase
- - treu if it is a one phase commitjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic void end(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityflags
- - one of TMSUCCESS, TMFAIL, or TMSUSPENDjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic int getTransactionTimeout() throws javax.transaction.xa.XAException, java.rmi.RemoteException
javax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException, java.rmi.RemoteException
flag
- - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGSXid[]
- - the set of Xids to recoverjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic boolean setTransactionTimeout(int seconds) throws javax.transaction.xa.XAException, java.rmi.RemoteException
seconds
- - timeout in secondsjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic void start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException, java.rmi.RemoteException
xid
- - the xa transaction identityflags
- - One of TMNOFLAGS, TMJOIN, or TMRESUMEjavax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic java.lang.String getResourceManagerId() throws javax.transaction.xa.XAException, java.rmi.RemoteException
javax.transaction.xa.XAException
- - if there is a problem completing the calljava.rmi.RemoteException
- - communication related errorpublic void setMessageListener(RemoteJmsMessageListenerIfc listener) throws javax.jms.JMSException, java.rmi.RemoteException
If the listener is null then throw JMSException
listener
- listener to delivery messages too.javax.jms.JMSException
- RemoteException.
- public void enableAsynchronousDelivery(long clientId, java.lang.String id, boolean enable) throws javax.jms.JMSException, java.rmi.RemoteException
clientId
- - the id of the client to checkid
- - the last message asynchronously deliveredenable
- - true to enable; false to disable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |