Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


oracle.jms
Interface AQjmsTopicSubscriber

All Superinterfaces:
MessageConsumer, TopicSubscriber
All Known Implementing Classes:
AQjmsConsumer

public interface AQjmsTopicSubscriber
extends TopicSubscriber

Adds Oracle Streams Advanced Queuing extensions to javax.jms.TopicSubscriber
Allows use of navigation mode and methods to consume message without returning it to user.


Method Summary
 int getNavigationMode()
          Get the navigation mode for receiving messages.
 Message receive(long timeout, oracle.jms.AQjmsSignature signature)
          Receive the next message if available within the specified timeout.
 void receiveNoData()
          Consume the message without returning it to the user.
 void receiveNoData(long timeout)
          Consume the message without returning it to the user.
 void setNavigationMode(int mode)
          Set the navigation mode used for receiving messagess.

 

Methods inherited from interface javax.jms.TopicSubscriber
getNoLocal, getTopic

 

Methods inherited from interface javax.jms.MessageConsumer
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener

 

Method Detail

getNavigationMode

public int getNavigationMode()
                      throws JMSException
Get the navigation mode for receiving messages.
Returns:
the navigation mode. See the Oracle "Streams Advanced Queuing User's Guide and Reference" for the explanation of the navigation mode.
Throws:
JMSException - if the navigation mode could not be set

setNavigationMode

public void setNavigationMode(int mode)
                       throws JMSException
Set the navigation mode used for receiving messagess.
Parameters:
mode - the new value of the navigation mode. See Oracle "Streams Advanced Queuing User's Guide and Reference" for explanation of the navigation mode. the valid values of this parameter are oracle.jms.AQjmsConstants.FIRST_MESSAGE oracle.jms.AQjmsConstants.NEXT_MESSAGE oracle.jms.AQjmsConstants.NEXT_TRANSACTION
Throws:
JMSException - if there was an error in getting the navigation mode.

receiveNoData

public void receiveNoData()
                   throws JMSException
Consume the message without returning it to the user. This call will avoid the ovehead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser.
Throws:
JMSException - if the message could not be received due to an error.

receiveNoData

public void receiveNoData(long timeout)
                   throws JMSException
Consume the message without returning it to the user. This call will avoid the ovehead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser. This call will block until a message arrives or the timeout expires.
Parameters:
timeout - the timeout value in milliseconds.
Throws:
JMSException - if the message could not be received due to an error.

receive

public Message receive(long timeout,
                       oracle.jms.AQjmsSignature signature)
                throws JMSException
Receive the next message if available within the specified timeout.
Parameters:
timeout - the timeout value (in milliseconds) signature the signature value.
Returns:
the next message produced for this message consumer, or null if one is not available.
Throws:
JMSException - if JMS fails to receive the next message due to some error.

Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


Copyright © 2003, 2005, Oracle. All rights reserved.