public class JMSTopicAdapter extends Object implements JMSDestination
JMSDestination that uses an underlying
Topic.| Constructor and Description |
|---|
JMSTopicAdapter(javax.jms.TopicConnection theConnection,
javax.jms.Topic theDestination) |
JMSTopicAdapter(javax.jms.TopicConnection theConnection,
javax.jms.Topic theDestination,
String theMessageSelector) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Creates a new session, sender/publisher, and receiver/subscriber.
|
javax.jms.TextMessage |
createMessage() |
void |
disconnect()
Closes the JMS session.
|
javax.jms.Connection |
getConnection() |
String |
getName() |
boolean |
isConnected() |
javax.jms.Message |
receive() |
void |
send(javax.jms.Message theMessage)
Sends the given message to the JMS destination.
|
public JMSTopicAdapter(javax.jms.TopicConnection theConnection, javax.jms.Topic theDestination)
theConnection - the connection over which messages are written and readtheDestination - the destination to/from which messages are written/readpublic JMSTopicAdapter(javax.jms.TopicConnection theConnection, javax.jms.Topic theDestination, String theMessageSelector)
theConnection - the connection over which messages are written and readtheDestination - the destination to/from which messages are written/readtheMessageSelector - a JMS message selector which restricts the inbound
messages that are received (see JMS docs)public String getName() throws javax.jms.JMSException
getName in interface JMSDestinationjavax.jms.JMSExceptionJMSDestination.getName()public javax.jms.TextMessage createMessage() throws javax.jms.JMSException
createMessage in interface JMSDestinationjavax.jms.JMSExceptionJMSDestination.createMessage()public void connect() throws javax.jms.JMSException
JMSDestinationconnect in interface JMSDestinationjavax.jms.JMSExceptionJMSDestination.connect()public void disconnect() throws javax.jms.JMSException
JMSDestinationdisconnect in interface JMSDestinationjavax.jms.JMSExceptionJMSDestination.disconnect()public boolean isConnected()
isConnected in interface JMSDestinationJMSDestination.isConnected()public void send(javax.jms.Message theMessage) throws javax.jms.JMSException
JMSDestinationsend in interface JMSDestinationtheMessage - message to sendjavax.jms.JMSExceptionJMSDestination.send(javax.jms.Message)public javax.jms.Message receive() throws javax.jms.JMSException
receive in interface JMSDestinationjavax.jms.JMSExceptionJMSDestination.receive()public javax.jms.Connection getConnection()
getConnection in interface JMSDestinationJMSDestination.getConnection()Copyright © 2001–2017 University Health Network. All rights reserved.