|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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(java.lang.String[] messages)
Commit messages on the session which will send all specified published messages and acknowledge all specified received messages |
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 |
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,
long id,
boolean enable)
Enable or disable asynchronous message delivery for a particular consumer |
java.lang.String |
getClientId()
Return the client id associated with this session. |
java.lang.String |
getSessionId()
Return a copy of the session identity. |
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. |
void |
rollback()
Rollback the session, which will not acknowledge any of the sent messages |
void |
rollback(java.lang.String[] messages)
Rollback messages on the session, which will not acknowledge any of the specified sent messages |
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. |
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 javax.jms.JMSException
JMSException -
public java.lang.String getSessionId()
throws javax.jms.JMSException
JMSException -
public void beforeClose()
throws javax.jms.JMSException
close, so that the
stub can do some local clean upJMSException -
public void close()
throws javax.jms.JMSException
JMSException -
public void acknowledgeMessage(long clientId,
java.lang.String messageId)
throws javax.jms.JMSException
clientId - the identity ofthe clientmessageId - the message identity to ackJMSException -
public void sendMessage(javax.jms.Message message)
throws javax.jms.JMSException
message - message to sendJMSException -
public void sendMessages(java.util.Vector messages)
throws javax.jms.JMSException
messages - - messages to sendJMSException -
public javax.jms.Message receiveMessage(long clientId,
long wait)
throws javax.jms.JMSException
client - the client identitywait - the number of ms to wait. -1
means wait indefinitely.
public java.util.Vector receiveMessages(long clientId,
int count)
throws javax.jms.JMSException
client - the client identitycount - max messages to returnJMSException -
public void createQueue(JmsQueue queue)
throws javax.jms.JMSException
queue - queue to createJMSException -
public void createTopic(JmsTopic topic)
throws javax.jms.JMSException
topic - topic to createJMSException -
public void 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 - receiver destinationclientId - the session allocated identifier of
this consumerselector - message selector. This may be null.JMSException. -
public void createSender(JmsQueue queue)
throws javax.jms.JMSException
You cannot create more than one receiver for the same destination
queue - receiver destinationJMSException. -
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.
queue - queue to browseclientId - the client identityselector - message selector. This may be nullJMSException -
public void deleteReceiver(long clientId)
throws javax.jms.JMSException
clientId - identity of the receiver to deleteJMSException -
public void deleteBrowser(long clientId)
throws javax.jms.JMSException
clientId - the id of the browserJMSException -
public void 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.JMSException. -
public void createPublisher(JmsTopic topic)
throws javax.jms.JMSException
You cannot create more than one publisher for the same destination
topic - receiver destinationJMSException. -
public void deleteSubscriber(long clientId)
throws javax.jms.JMSException
clientid - the client identityJMSException. -
public void unsubscribe(java.lang.String name)
throws javax.jms.JMSException
name - the name used to identify the
subscriptionJMSException - if the subscription cannot be removed
public void stopMessageDelivery()
throws javax.jms.JMSException
JMSException -
public void startMessageDelivery()
throws javax.jms.JMSException
JMSException - public void setMessageListener(JmsMessageListener listener)
listener -
public void enableAsynchronousDelivery(long clientId,
long 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
public void recover()
throws javax.jms.JMSException
JMSException - - if we are unable to recover
public void commit()
throws javax.jms.JMSException
JMSException - - if we cannot commit the session
public void rollback()
throws javax.jms.JMSException
JMSException - - if there is an error with this operation
public void commit(java.lang.String[] messages)
throws javax.jms.JMSException
JMSException - - if we cannot commit the session
public void rollback(java.lang.String[] messages)
throws javax.jms.JMSException
JMSException - - if there is an error with this operation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||