|
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) B14291-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.jms.AQjmsObject
oracle.jms.AQjmsConsumer
This is an Oracle class which implements oracle.jms.AQjmsQueueReceiver, oracle.jms.AQjmsTopicSubscriber and oracle.jms.AQjmsTopicReceiver.
| Method Summary | |
Message |
bufferReceive()Receives the next message from both the in-memory and persistent portion of the queue. |
Message |
bufferReceive(long timeout)Receives the next message from both the in-memory and persistent portion of the queue if one is available within the specified timeout. |
Message |
bufferReceiveNoWait()Receives the next message from both the in-memory and persistent portion of the queue if one is immediately available. |
void |
close()Closes the message consumer. |
MessageListener |
getMessageListener()Gets this message consumer's MessageListener. |
java.lang.String |
getMessageSelector()Gets this message consumer's message selector expression. |
int |
getNavigationMode()Gets the navigation mode used for receiving messages. |
boolean |
getNoLocal()Gets the NoLocal attribute for this TopicSubscriber. |
Queue |
getQueue()Gets the queue associated with this queue receiver. |
javax.naming.Reference |
getReference()Creates a message consumer reference. |
Topic |
getTopic()Gets the topic associated with this topic subscriber. |
java.lang.String |
getTransformation()Gets this consumer's transformation. |
Message |
receive()Receives the next message. |
Message |
receive(long timeout)Receives the next message if one is available within the specified timeout. |
void |
receiveNoData()Consumes the message without returning it to the user. |
void |
receiveNoData(long timeout)Consumes the message without returning it to the user. |
Message |
receiveNoWait()Receives the next message if one is immediately available. |
void |
setMessageListener(MessageListener myListener)Set this message consumer's MessageListener. |
void |
setNavigationMode(int mode)Sets the navigation mode used for receiving messages. |
void |
setTransformation(java.lang.String transformation)Sets this consumer's transformation. |
| Methods inherited from class oracle.jms.AQjmsObject |
checkClosed, children, finalize, getID, getParent, isOpen, localClose, preClose |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.jms.AQjmsTopicSubscriber |
receive |
| Methods inherited from interface oracle.jms.AQjmsTopicReceiver |
receive, receive, receiveSignature, receiveSignature |
| Method Detail |
public java.lang.String getMessageSelector()
throws JMSException
getMessageSelector in interface MessageConsumerJMSException - if:
close()public javax.naming.Reference getReference()
getReference in interface javax.naming.Referenceable
public MessageListener getMessageListener()
throws JMSException
MessageListener.getMessageListener in interface MessageConsumernull if no listener is setJMSException - if:
close(), AQjmsSession.setMessageListener(javax.jms.MessageListener)
public void setMessageListener(MessageListener myListener)
throws JMSException
MessageListener. Once set, myListener's MessageListener.onMessage(javax.jms.Message) method is called when there are messages for this consumer.setMessageListener in interface MessageConsumermyListener - the listener to which incoming messages are to be sentJMSException - if:
close(), AQjmsSession.setMessageListener(javax.jms.MessageListener)
public Message receive()
throws JMSException
Blocks indefinitely until a message is received or this consumer is closed.
receive in interface MessageConsumernull if the receive was pending and was then terminated due to this consumer being closedJMSException - if the next message is not received due to some error.
public Message receiveNoWait()
throws JMSException
receiveNoWait in interface MessageConsumernull if none are immediately availableJMSException - if the next message is not received due to some error.
public Message receive(long timeout)
throws JMSException
Blocks until a message is received, the timeout expires, or this consumer is closed. A timeout of zero never expires.
receive in interface MessageConsumertimeout - the timeout value (in milliseconds)null if none are available in timeJMSException - if the next message is not received due to some error.
public Message bufferReceive()
throws JMSException
Blocks indefinitely until a message is received or this consumer is closed.
null if the receive was pending and was then terminated due to this consumer being closedJMSException - if the next message is not received due to some error.
public Message bufferReceiveNoWait()
throws JMSException
null if none are immediately availableJMSException - if the next message is not received due to some error.
public Message bufferReceive(long timeout)
throws JMSException
Blocks until a message is received, the timeout expires, or this consumer is closed. A timeout of zero never expires.
timeout - the timeout value (in milliseconds)null if none are available in timeJMSException - if the next message is not received due to some error.
public void close()
throws JMSException
MessageConsumerSince a provider may allocate some resources on behalf of a MessageConsumer outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
This call blocks until a receive or message listener in progress has completed. A blocked message consumer receive call returns null when this message consumer is closed.
close in interface MessageConsumerJMSException
public Queue getQueue()
throws JMSException
getQueue in interface QueueReceiverJMSException - if called on a topic subscriber.
public Topic getTopic()
throws JMSException
getTopic in interface TopicSubscriberJMSException - if called on a queue receiver.
public boolean getNoLocal()
throws JMSException
NoLocal attribute for this TopicSubscriber. The default value for this attribute is false.getNoLocal in interface TopicSubscribertrue if locally published messages are being inhibited.JMSException - if:
NoLocal attribute is not available because the consumer is a durable topic subscriber which was created via some non-JMS API or from a different JVM.
public int getNavigationMode()
throws JMSException
AQjmsConstants.NAVIGATION_FIRST_MESSAGEAQjmsConstants.NAVIGATION_NEXT_MESSAGEAQjmsConstants.NAVIGATION_NEXT_TRANSACTIONgetNavigationMode in interface AQjmsQueueReceiverJMSException - if this consumer has already been closed.
public void setNavigationMode(int mode)
throws JMSException
AQjmsConstants.NAVIGATION_FIRST_MESSAGEAQjmsConstants.NAVIGATION_NEXT_MESSAGEAQjmsConstants.NAVIGATION_NEXT_TRANSACTIONsetNavigationMode in interface AQjmsQueueReceivermode - the new navigation mode for this consumerJMSException - if:
mode does not match any of the above listed navigation modes.public void setTransformation(java.lang.String transformation)
setTransformation in interface AQjmsQueueReceivertransformation - the transformation to use when getting messagespublic java.lang.String getTransformation()
getTransformation in interface AQjmsQueueReceiver
public void receiveNoData()
throws JMSException
Blocks indefinitely until a message is received or this consumer is closed.
receiveNoData in interface AQjmsQueueReceiverJMSException - if the message could not be received due to some error.
public void receiveNoData(long timeout)
throws JMSException
Blocks until a message is received, the timeout expires, or this consumer is closed. A timeout of zero never expires.
receiveNoData in interface AQjmsQueueReceivertimeout - the timeout value in millisecondsJMSException - if the message could not be received due to some error.
|
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) B14291-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||