|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-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
Oracle class implementing oracle.jms.AQjmsQueueReceiver, oracle.jms.AQjmsTopicSubscriber, oracle.jms.AQjmsTopicReceiver
Method Summary | |
void |
close() Closes the message consumer. |
javax.jms.MessageListener |
getMessageListener() Get the message consumer's MessageListener. |
java.lang.String |
getMessageSelector() Get this message consumer's message selector expression. |
int |
getNavigationMode() Get the navigation mode for the consumer |
boolean |
getNoLocal() Get the NoLocal attribute for this TopicSubscriber. |
javax.jms.Queue |
getQueue() Get the queue associated with this queue receiver. |
javax.naming.Reference |
getReference() |
javax.jms.Topic |
getTopic() Get the topic associated with this subscriber. |
java.lang.String |
getTransformation() Get the transformation used by this consumer |
javax.jms.Message |
receive() Receive the next message produced for this message consumer. |
javax.jms.Message |
receive(long timeout) 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. |
javax.jms.Message |
receiveNoWait() Receive the next message if one is immediately available. |
void |
setMessageListener(javax.jms.MessageListener myListener) Set the message consumer's MessageListener. |
void |
setNavigationMode(int mode) Set the navigation mode for the consumer |
void |
setTransformation(java.lang.String transformation) Set the transformation for this consumer |
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 MessageConsumer
JMSException
- if JMS fails to get message selector due to some JMS errorpublic javax.naming.Reference getReference()
getReference
in interface javax.naming.Referenceable
public javax.jms.MessageListener getMessageListener() throws JMSException
getMessageListener
in interface MessageConsumer
JMSException
- if JMS fails to get message listener due to some JMS errorMessageConsumer.setMessageListener(javax.jms.MessageListener)
public void setMessageListener(javax.jms.MessageListener myListener) throws JMSException
setMessageListener
in interface MessageConsumer
myListener
- set the consumer's message listenerJMSException
- if JMS fails to set message listener due to some JMS errorMessageConsumer.getMessageListener()
public javax.jms.Message receive() throws JMSException
This call blocks indefinitely until a message is produced.
receive
in interface MessageConsumer
JMSException
- if JMS fails to receive the next message due to some error.public javax.jms.Message receiveNoWait() throws JMSException
receiveNoWait
in interface MessageConsumer
JMSException
- if JMS fails to receive the next message due to some error.public javax.jms.Message receive(long timeout) throws JMSException
receive
in interface MessageConsumer
timeout
- the timeout value (in milliseconds)JMSException
- if JMS fails to receive the next message due to some error.public void close() throws JMSException
MessageConsumer
Since 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 MessageConsumer
close
in class oracle.jms.AQjmsObject
JMSException
- if the JMS provider fails to close the consumer due to some internal error.public javax.jms.Queue getQueue() throws JMSException
getQueue
in interface QueueReceiver
JMSException
- if JMS fails to get queue for this queue receiver due to some internal error.public javax.jms.Topic getTopic() throws JMSException
getTopic
in interface TopicSubscriber
JMSException
- if JMS fails to get topic for this topic subscriber due to some internal error.public boolean getNoLocal() throws JMSException
getNoLocal
in interface TopicSubscriber
JMSException
- if JMS fails to get noLocal attribute for this topic subscriber due to some internal error.public int getNavigationMode() throws JMSException
getNavigationMode
in interface AQjmsQueueReceiver
JMSException
- if there was an error in getting the navigation modepublic void setNavigationMode(int mode) throws JMSException
setNavigationMode
in interface AQjmsQueueReceiver
mode
- the navigation mode of the consumerJMSException
- if the navigation mode could not be setpublic void setTransformation(java.lang.String transformation)
setTransformation
in interface AQjmsQueueReceiver
transformation
- the transformation used when getting messagespublic java.lang.String getTransformation()
getTransformation
in interface AQjmsQueueReceiver
public void receiveNoData() throws JMSException
receiveNoData
in interface AQjmsQueueReceiver
JMSException
- if the message could not be received due to an errorpublic void receiveNoData(long timeout) throws JMSException
receiveNoData
in interface AQjmsQueueReceiver
timeout
- the timeout value in millisecondsJMSException
- if the message could not be received due to an error
|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |