|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflex.messaging.services.messaging.adapters.JMSProxy
flex.messaging.services.messaging.adapters.JMSConsumer
public abstract class JMSConsumer
A JMSProxy subclass for javax.jms.MessageConsumer instance.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class flex.messaging.services.messaging.adapters.JMSProxy |
|---|
JMSProxy.ConnectionCredentials |
| Constructor Summary | |
|---|---|
JMSConsumer()
|
|
| Method Summary | |
|---|---|
void |
addJMSExceptionListener(JMSExceptionListener listener)
Adds a JMS exception listener. |
void |
addJMSMessageListener(JMSMessageListener listener)
Adds a JMS message listener. |
flex.messaging.services.messaging.adapters.MessageReceiver |
getMessageReceiver()
Returns the MessageReceiver used by the consumer to retrieve
JMS messages. |
String |
getSelectorExpression()
Returns the selector expression used when the underlying javax.jms.MessageConsumer is created. |
void |
onException(javax.jms.JMSException exception)
Implementation of javax.jms.ExceptionListener.onException. |
void |
onMessage(javax.jms.Message jmsMessage)
Acnowledges the receipt of the message to the JMS server and passes the message to registered JMS message listeners. |
javax.jms.Message |
receive()
Receive the next message from the underlying MessageConsumer or wait indefinetely until a message arrives if there is no message. |
javax.jms.Message |
receive(long timeout)
Receive the next message from the underlying MessageConsumer within the specified timeout interval. |
javax.jms.Message |
receiveNoWait()
Receive the new message from the underlying MessageConsumer with no wait. |
void |
removeJMSExceptionListener(JMSExceptionListener listener)
Removes a JMS exception listener. |
void |
removeJMSMessageListener(JMSMessageListener listener)
Removes a JMS message listener. |
javax.jms.MessageListener |
setMessageListener(javax.jms.MessageListener listener)
Sets the message listener of the underlying MessageConsumer. |
void |
setMessageReceiver(flex.messaging.services.messaging.adapters.MessageReceiver messageReceiver)
Sets the MessageReceiver used by the consumer to retrieve
JMS messages. |
void |
setSelectorExpression(String selectorExpression)
Sets the selector expression used when the underlying javax.jms.MessageConsumer is created. |
void |
start()
Starts the JMSConsumer. |
void |
stop()
Stops the JMSConsumer by stopping its associated receiver
adapter and closing the underlying MessageConsumer. |
void |
stop(boolean unsubscribe)
Stops the JMSConsumer and unsubscribes a durable subscription
if one exists. |
| Methods inherited from class flex.messaging.services.messaging.adapters.JMSProxy |
|---|
getAcknowledgeMode, getConnectionCredentials, getConnectionFactoryName, getDestinationJndiName, getInitialContextEnvironment, initialize, setAcknowledgeMode, setConnectionCredentials, setConnectionFactoryName, setDestinationJndiName, setInitialContextEnvironment |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMSConsumer()
| Method Detail |
|---|
public void start()
throws NamingException,
javax.jms.JMSException
JMSConsumer. Subclasses should call super.start.
start in class JMSProxyNamingException - The thrown naming exception.
javax.jms.JMSException - The thrown JMS exception.public void stop()
JMSConsumer by stopping its associated receiver
adapter and closing the underlying MessageConsumer. It then
calls JMSProxy.close for session and connection closure.
stop in class JMSProxypublic void stop(boolean unsubscribe)
JMSConsumer and unsubscribes a durable subscription
if one exists. By default this method delegates to stop()
and doesn't remove a durable subscription.
unsubscribe - Determines whether to unsubscribe a durable subscription
if one exists, or not.public void addJMSMessageListener(JMSMessageListener listener)
listener - The listener to add.JMSMessageListenerpublic void removeJMSMessageListener(JMSMessageListener listener)
listener - The listener to remove.JMSMessageListenerpublic void addJMSExceptionListener(JMSExceptionListener listener)
listener - The listener to add.JMSExceptionListenerpublic void removeJMSExceptionListener(JMSExceptionListener listener)
listener - The listener to remove.JMSExceptionListener
public javax.jms.MessageListener setMessageListener(javax.jms.MessageListener listener)
throws javax.jms.JMSException
listener - Message listener to set on the underlying MessageConsumer.
javax.jms.JMSException - The thrown JMS exception.public flex.messaging.services.messaging.adapters.MessageReceiver getMessageReceiver()
MessageReceiver used by the consumer to retrieve
JMS messages.
MessageReceiver used.public void setMessageReceiver(flex.messaging.services.messaging.adapters.MessageReceiver messageReceiver)
MessageReceiver used by the consumer to retrieve
JMS messages. This property should not change after startup.
messageReceiver - The MessageReceiver used.public String getSelectorExpression()
javax.jms.MessageConsumer is created.
public void setSelectorExpression(String selectorExpression)
javax.jms.MessageConsumer is created. This property should
not change after startup.
selectorExpression - The selector expression.public void onException(javax.jms.JMSException exception)
onException in interface javax.jms.ExceptionListenerexception - The thrown JMS exception.public void onMessage(javax.jms.Message jmsMessage)
jmsMessage - The new JMS message to acknowledge and dispatch.
public javax.jms.Message receive()
throws javax.jms.JMSException
javax.jms.JMSException - The thrown JMS exception.
public javax.jms.Message receive(long timeout)
throws javax.jms.JMSException
timeout - The number of milliseconds to wait for a new message.
javax.jms.JMSException - The thrown JMS exception.
public javax.jms.Message receiveNoWait()
throws javax.jms.JMSException
javax.jms.JMSException - The thrown JMS exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/services/messaging/adapters/JMSConsumer.html