|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--org.exolab.jms.client.rmi.RmiJmsSessionStub
This class is repsonsible for managing a reference to a remote session object in additon to registering itself as an object, with the RMI registry. This object is called back by the JMS Server when it has messages for it.
The act that it extends UnicastRemoteObject means that it is a server as well as a client to other RMI objects
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
protected |
RmiJmsSessionStub(RemoteJmsServerSessionIfc session)
Instantiate an instance of this class using the specified session stub. |
| 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 |
deletePublisher(JmsTopic topic)
|
void |
deleteReceiver(long clientId)
Delete the receiver with the corresponding client id. |
void |
deleteSender(long clientId)
|
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. |
void |
onMessage(javax.jms.Message message)
This method is called back by the server whenever it has a message for this session |
void |
onMessageAvailable(long clientId)
Notify the client that a message is available for it on the server |
void |
onMessages(java.util.Vector messages)
This method is called back by the server whenever it has one or more messages for this session |
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 |
| 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 |
protected RmiJmsSessionStub(RemoteJmsServerSessionIfc session)
throws javax.jms.JMSException,
java.rmi.RemoteException
RmiJmsServerSession - javax.jms.JMSException - java.rmi.RemoteException - | Method Detail |
public java.lang.String getClientId()
throws javax.jms.JMSException
JmsSessionStubIfcgetClientId in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS error
public java.lang.String getSessionId()
throws javax.jms.JMSException
JmsSessionStubIfcgetSessionId in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS error
public void beforeClose()
throws javax.jms.JMSException
JmsSessionStubIfcclose, so that the
stub can do some local clean upbeforeClose in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS error
public void close()
throws javax.jms.JMSException
JmsSessionStubIfcclose in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS error
public void acknowledgeMessage(long clientId,
java.lang.String messageId)
throws javax.jms.JMSException
JmsSessionStubIfcacknowledgeMessage in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientId - the identity ofthe clientmessageId - the message identity to ackjavax.jms.JMSException - for any JMS error
public void sendMessage(javax.jms.Message message)
throws javax.jms.JMSException
JmsSessionStubIfcsendMessage in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcmessage - the message to sendjavax.jms.JMSException - for any JMS error
public void sendMessages(java.util.Vector messages)
throws javax.jms.JMSException
JmsSessionStubIfcsendMessages in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcmessages - the messages to sendjavax.jms.JMSException - for any JMS error
public javax.jms.Message receiveMessage(long clientId,
long wait)
throws javax.jms.JMSException
JmsSessionStubIfcreceiveMessage in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientId - the client identitywait - the number of ms to wait. -1 means wait indefinitely.javax.jms.JMSException - for any JMS error
public java.util.Vector receiveMessages(long clientId,
int count)
throws javax.jms.JMSException
JmsSessionStubIfcreceiveMessages in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclient - the client identitycount - max messages to returnjavax.jms.JMSException - for any JMS error
public void createQueue(JmsQueue queue)
throws javax.jms.JMSException
JmsSessionStubIfccreateQueue in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcqueue - the queue to createjavax.jms.JMSException - for any JMS error
public void createTopic(JmsTopic topic)
throws javax.jms.JMSException
JmsSessionStubIfccreateTopic in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfctopic - the topic to createjavax.jms.JMSException - for any JMS error
public void createReceiver(JmsQueue queue,
long clientId,
java.lang.String selector)
throws javax.jms.JMSException
JmsSessionStubIfcYou cannot create more than one receiver for the same destination
createReceiver in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcqueue - the receiver destinationclientId - the session allocated identifier of this consumerselector - the message selector. This may be null.javax.jms.JMSException - for any JMS error
public void createSender(JmsQueue queue)
throws javax.jms.JMSException
JmsSessionStubIfcYou cannot create more than one receiver for the same destination
createSender in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcqueue - the receiver destinationjavax.jms.JMSException - for any JMS error
public void createBrowser(JmsQueue queue,
long clientId,
java.lang.String selector)
throws javax.jms.JMSException
JmsSessionStubIfcYou cannot create more than one queue browser for the same queue in a single session.
createBrowser in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcqueue - the queue to browseclientId - the client identityselector - the message selector. This may be nulljavax.jms.JMSException - for any JMS error
public void deleteReceiver(long clientId)
throws javax.jms.JMSException
JmsSessionStubIfcdeleteReceiver in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientId - the identity of the receiver to deletejavax.jms.JMSException - for any JMS error
public void deleteSender(long clientId)
throws javax.jms.JMSException
public void deleteBrowser(long clientId)
throws javax.jms.JMSException
JmsSessionStubIfcdeleteBrowser in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientId - the id of the browserjavax.jms.JMSException - for any JMS error
public void createSubscriber(JmsTopic topic,
java.lang.String name,
long clientId,
java.lang.String selector,
boolean noLocal)
throws javax.jms.JMSException
JmsSessionStubIfcYou cannot create more than one subscriber for the same destination
createSubscriber in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfctopic - 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 error
public void createPublisher(JmsTopic topic)
throws javax.jms.JMSException
JmsSessionStubIfcYou cannot create more than one publisher for the same destination
createPublisher in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfctopic - receiver destinationjavax.jms.JMSException - for any JMS error
public void deleteSubscriber(long clientId)
throws javax.jms.JMSException
JmsSessionStubIfcdeleteSubscriber in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientid - the client identityjavax.jms.JMSException - for any JMS error
public void deletePublisher(JmsTopic topic)
throws javax.jms.JMSException
public void unsubscribe(java.lang.String name)
throws javax.jms.JMSException
JmsSessionStubIfcunsubscribe in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcname - the name used to identify the subscriptionjavax.jms.JMSException - for any JMS error
public void stopMessageDelivery()
throws javax.jms.JMSException
JmsSessionStubIfcstopMessageDelivery in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS error
public void startMessageDelivery()
throws javax.jms.JMSException
JmsSessionStubIfcstartMessageDelivery in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - for any JMS errorpublic void setMessageListener(JmsMessageListener listener)
JmsSessionStubIfcsetMessageListener in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfclistener - the message listener
public void enableAsynchronousDelivery(long clientId,
java.lang.String id,
boolean enable)
throws javax.jms.JMSException
JmsSessionStubIfcenableAsynchronousDelivery in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcclientId - the id of the client to checkid - the message id of the last delivered messageenable - true to enable; false to disablejavax.jms.JMSException - for any JMS error
public void recover()
throws javax.jms.JMSException
JmsSessionStubIfcrecover in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - if the session cannot be recovered
public void commit()
throws javax.jms.JMSException
JmsSessionStubIfccommit in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - if the session cannot be committed
public void rollback()
throws javax.jms.JMSException
JmsSessionStubIfcrollback in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.jms.JMSException - if the session cannot be rolled back
public void commit(javax.transaction.xa.Xid xid,
boolean onePhase)
throws javax.transaction.xa.XAException
JmsSessionStubIfccommit in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityonePhase - true if it is a one phase commitjavax.transaction.xa.XAException - if there is a problem completing the call
public void end(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
JmsSessionStubIfcend in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityflags - one of TMSUCCESS, TMFAIL, or TMSUSPENDjavax.transaction.xa.XAException - if there is a problem completing the call
public void forget(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
JmsSessionStubIfcforget in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityjavax.transaction.xa.XAException - if there is a problem completing the call
public java.lang.String getResourceManagerId()
throws javax.transaction.xa.XAException
JmsSessionStubIfcgetResourceManagerId in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.transaction.xa.XAException - if there is a problem completing the call
public int getTransactionTimeout()
throws javax.transaction.xa.XAException
JmsSessionStubIfcgetTransactionTimeout in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcjavax.transaction.xa.XAException - if there is a problem completing the call
public int prepare(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
JmsSessionStubIfcprepare in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityjavax.transaction.xa.XAException - if there is a problem completing the call
public javax.transaction.xa.Xid[] recover(int flag)
throws javax.transaction.xa.XAException
JmsSessionStubIfcrecover in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcflag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGSjavax.transaction.xa.XAException - - if there is a problem completing the call
public void rollback(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
JmsSessionStubIfcrollback in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityjavax.transaction.xa.XAException - if there is a problem completing the call
public boolean setTransactionTimeout(int seconds)
throws javax.transaction.xa.XAException
JmsSessionStubIfcsetTransactionTimeout in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcseconds - timeout in secondsjavax.transaction.xa.XAException - if there is a problem completing the call
public void start(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
JmsSessionStubIfcstart in interface JmsSessionStubIfcorg.exolab.jms.client.JmsSessionStubIfcxid - the xa transaction identityflags - One of TMNOFLAGS, TMJOIN, or TMRESUMEjavax.transaction.xa.XAException - if there is a problem completing the call
public void onMessage(javax.jms.Message message)
throws java.rmi.RemoteException
RemoteJmsMessageListenerIfconMessage in interface RemoteJmsMessageListenerIfcorg.exolab.jms.client.rmi.RemoteJmsMessageListenerIfcmessage - java.rmi.RemoteException -
public void onMessages(java.util.Vector messages)
throws java.rmi.RemoteException
RemoteJmsMessageListenerIfconMessages in interface RemoteJmsMessageListenerIfcorg.exolab.jms.client.rmi.RemoteJmsMessageListenerIfcmessages - - vector of messagesjava.rmi.RemoteException -
public void onMessageAvailable(long clientId)
throws java.rmi.RemoteException
RemoteJmsMessageListenerIfconMessageAvailable in interface RemoteJmsMessageListenerIfcorg.exolab.jms.client.rmi.RemoteJmsMessageListenerIfcclientId - - the id of the client to notifyjava.rmi.RemoteException -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||