|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.exolab.jms.server.rmi.RmiJmsServerSession
public class RmiJmsServerSession
This is an implementation of the RemoteJmsServerSessionIfc which delegates all requests to the JmsServerSession class. Actually, an instsnce of this class cannot be created without a JmsServerSession object.
JmsServerSession,
RemoteJmsServerConnectionIfc,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Constructor Summary | |
|---|---|
RmiJmsServerSession(JmsServerSession session)
Instantiate an instance of this class given a JmsServerSession. |
|
| Method Summary | |
|---|---|
void |
acknowledgeMessage(long clientId,
java.lang.String messageId)
Acknowledge that the message id for the specified client identity. |
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 receiver for the specified queue. |
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. |
void |
onMessage(javax.jms.Message message)
|
void |
onMessageAvailable(long clientId)
Inform the session that there is a message available for the message consumer with the specified identity |
void |
onMessages(java.util.Vector messages)
Send the specified collection of messages to the client |
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 |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RmiJmsServerSession(JmsServerSession session)
throws javax.jms.JMSException,
java.rmi.RemoteException
session -
javax.jms.JMSException
java.rmi.RemoteException| Method Detail |
|---|
public java.lang.String getClientId()
throws java.rmi.RemoteException
getClientId in interface RemoteJmsServerSessionIfcjava.rmi.RemoteException
public java.lang.String getSessionId()
throws javax.jms.JMSException,
java.rmi.RemoteException
getSessionId in interface RemoteJmsServerSessionIfcjava.rmi.RemoteException
javax.jms.JMSException
public void close()
throws javax.jms.JMSException,
java.rmi.RemoteException
close in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
java.rmi.RemoteException
public void acknowledgeMessage(long clientId,
java.lang.String messageId)
throws javax.jms.JMSException,
java.rmi.RemoteException
acknowledgeMessage in interface RemoteJmsServerSessionIfcclientId - the client identity.messageId - identity of the message
javax.jms.JMSException - if method does not complete
java.rmi.RemoteException
public void sendMessage(javax.jms.Message message)
throws javax.jms.JMSException,
java.rmi.RemoteException
sendMessage in interface RemoteJmsServerSessionIfcmessage - message to send
javax.jms.JMSException
java.rmi.RemoteException
public void sendMessages(java.util.Vector messages)
throws javax.jms.JMSException,
java.rmi.RemoteException
sendMessages in interface RemoteJmsServerSessionIfcmessages - messages to send
javax.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 message
receiveMessage in interface RemoteJmsServerSessionIfcclientId - the client identitywait - number of ms to wait
javax.jms.JMSException - if there is an app level problem
java.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
RemoteJmsServerSessionIfc
receiveMessages in interface RemoteJmsServerSessionIfcclientId - the client identitycount - max number of messages to receive
javax.jms.JMSException - if there is an app level problem
java.rmi.RemoteException - if there is a RMI based exception.
public void createQueue(JmsQueue queue)
throws javax.jms.JMSException,
java.rmi.RemoteException
createQueue in interface RemoteJmsServerSessionIfcqueue - queue to create
javax.jms.JMSException
java.rmi.RemoteException
public void createTopic(JmsTopic topic)
throws javax.jms.JMSException,
java.rmi.RemoteException
createTopic in interface RemoteJmsServerSessionIfctopic - topic to create
javax.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
createReceiver in interface RemoteJmsServerSessionIfcqueue - receiver destinationclientId - the session allocated identifier of
this consumerselector - the selector to filter messages.
This may be null.
JMSException.
java.rmi.RemoteException
javax.jms.JMSException
public void createSender(JmsQueue queue)
throws javax.jms.JMSException,
java.rmi.RemoteException
You cannot create more than one receiver for the same destination
createSender in interface RemoteJmsServerSessionIfcqueue - receiver destination
JMSException.
java.rmi.RemoteException
javax.jms.JMSException
public void 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.
createBrowser in interface RemoteJmsServerSessionIfcqueue - queue to browseclientId - the client identityselector - message selector. This may be null
javax.jms.JMSException
public void deleteReceiver(long clientId)
throws javax.jms.JMSException,
java.rmi.RemoteException
deleteReceiver in interface RemoteJmsServerSessionIfcid - identity of receiver
JMSException.
java.rmi.RemoteException
javax.jms.JMSException
public void deleteSender(long clientId)
throws javax.jms.JMSException,
java.rmi.RemoteException
deleteSender in interface RemoteJmsServerSessionIfcclientId - identity of client to delete
JMSException.
java.rmi.RemoteException
javax.jms.JMSException
public void deleteBrowser(long clientId)
throws javax.jms.JMSException
deleteBrowser in interface RemoteJmsServerSessionIfcclientId - the identity of the client
javax.jms.JMSException
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
createSubscriber in interface RemoteJmsServerSessionIfctopic - subscriber destinationname - name of the cnsumer; can be nullclientId - the session allocated identifier of
this consumerselector - the selector to filter messages.
This may be null.noLocal - inhibit consuming messages on same
connection.
javax.jms.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
createPublisher in interface RemoteJmsServerSessionIfctopic - receiver destination
JMSException.
java.rmi.RemoteException
javax.jms.JMSException
public void deleteSubscriber(long clientId)
throws javax.jms.JMSException,
java.rmi.RemoteException
deleteSubscriber in interface RemoteJmsServerSessionIfcclientId - the identity of the client
JMSException.
javax.jms.JMSException
java.rmi.RemoteException
public void deletePublisher(JmsTopic topic)
throws javax.jms.JMSException,
java.rmi.RemoteException
deletePublisher in interface RemoteJmsServerSessionIfctopic - topic object
JMSException.
RemoteException.
javax.jms.JMSException
java.rmi.RemoteException
public void unsubscribe(java.lang.String name)
throws javax.jms.JMSException
unsubscribe in interface RemoteJmsServerSessionIfcname - the name used to identify the
subscription
javax.jms.JMSException - if the subscription cannot be removed
public void stopMessageDelivery()
throws javax.jms.JMSException,
java.rmi.RemoteException
stopMessageDelivery in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void startMessageDelivery()
throws javax.jms.JMSException,
java.rmi.RemoteException
startMessageDelivery in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void recover()
throws javax.jms.JMSException,
java.rmi.RemoteException
recover in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void commit()
throws javax.jms.JMSException,
java.rmi.RemoteException
commit in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void rollback()
throws javax.jms.JMSException,
java.rmi.RemoteException
rollback in interface RemoteJmsServerSessionIfcjavax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void commit(javax.transaction.xa.Xid xid,
boolean onePhase)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
commit in interface RemoteJmsServerSessionIfcxid - - the xa transaction identityonePhase - - treu if it is a one phase commit
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public void end(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
end in interface RemoteJmsServerSessionIfcxid - - the xa transaction identityflags - - one of TMSUCCESS, TMFAIL, or TMSUSPEND
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public void forget(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
forget in interface RemoteJmsServerSessionIfcxid - - the xa transaction identity
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public int getTransactionTimeout()
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
getTransactionTimeout in interface RemoteJmsServerSessionIfcjavax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public int prepare(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
prepare in interface RemoteJmsServerSessionIfcxid - - the xa transaction identity
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public javax.transaction.xa.Xid[] recover(int flag)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
recover in interface RemoteJmsServerSessionIfcflag - - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public void rollback(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
rollback in interface RemoteJmsServerSessionIfcxid - - the xa transaction identity
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public boolean setTransactionTimeout(int seconds)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
setTransactionTimeout in interface RemoteJmsServerSessionIfcseconds - - timeout in seconds
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public void start(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
start in interface RemoteJmsServerSessionIfcxid - - the xa transaction identityflags - - One of TMNOFLAGS, TMJOIN, or TMRESUME
javax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public java.lang.String getResourceManagerId()
throws javax.transaction.xa.XAException,
java.rmi.RemoteException
RemoteJmsServerSessionIfc
getResourceManagerId in interface RemoteJmsServerSessionIfcjavax.transaction.xa.XAException - - if there is a problem completing the call
java.rmi.RemoteException - - communication related error
public void setMessageListener(RemoteJmsMessageListenerIfc listener)
throws javax.jms.JMSException,
java.rmi.RemoteException
If the listener is null then throw JMSException
setMessageListener in interface RemoteJmsServerSessionIfclistener - listener to delivery messages too.
javax.jms.JMSException
RemoteException.
java.rmi.RemoteException
public void enableAsynchronousDelivery(long clientId,
java.lang.String id,
boolean enable)
throws javax.jms.JMSException,
java.rmi.RemoteException
enableAsynchronousDelivery in interface RemoteJmsServerSessionIfcclientId - - the id of the client to checkid - - the last message asynchronously delivered to consumerenable - - true to enable; false to disable
javax.jms.JMSException
java.rmi.RemoteExceptionpublic void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListenerpublic void onMessages(java.util.Vector messages)
JmsMessageListener
onMessages in interface JmsMessageListenermessages - - collection of MessageHandle objectspublic void onMessageAvailable(long clientId)
JmsMessageListener
onMessageAvailable in interface JmsMessageListenerclientId - - the identity of the client
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||