|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.robokind.impl.messaging.utils.ConnectionManager
public class ConnectionManager
Utility methods for creating JMS Connections and Destinations and managing them within the OSGi Service Registry. AMQP/Qpid is used for creating the connections and destinations.
| Field Summary | |
|---|---|
static String |
PROP_CONNECTION_ID
Property name for a Connection's unique id within the OSGi Service Registry. |
static String |
PROP_DESTINATION_ID
Property name for a Destination's unique id within the OSGi Service Registry. |
| Constructor Summary | |
|---|---|
ConnectionManager()
|
|
| Method Summary | |
|---|---|
static String |
createAMQPConnectionURL(String username,
String password,
String clientName,
String virtualHost,
String tcpAddress)
Formats an AMQP connection URL from the given details. |
static javax.jms.Connection |
createConnection(String amqpURL)
Creates an JMS Connection from the given connection URL |
static javax.jms.Connection |
createConnection(String username,
String password,
String clientName,
String virtualHost,
String tcpAddress)
Create a JMS Connection from the given details. |
static javax.jms.Destination |
createDestination(String destinationStr)
Creates a JMS Destination from the given destination String |
static javax.jms.Destination |
createQueue(String destinationStr)
|
static javax.jms.Destination |
createTopic(String destinationStr)
|
static org.osgi.framework.ServiceRegistration |
registerConnection(org.osgi.framework.BundleContext context,
String connectionId,
javax.jms.Connection connection,
Properties props)
Registers a JMS Connection to OSGi Service Registry, using a unique id. |
static org.osgi.framework.ServiceRegistration |
registerDestination(org.osgi.framework.BundleContext context,
String destinationId,
javax.jms.Destination destination,
Properties props)
Registers a JMS Connection to OSGi Service Registry, using a unique id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_CONNECTION_ID
public static final String PROP_DESTINATION_ID
| Constructor Detail |
|---|
public ConnectionManager()
| Method Detail |
|---|
public static String createAMQPConnectionURL(String username,
String password,
String clientName,
String virtualHost,
String tcpAddress)
username - broker usernamepassword - broker passwordclientName - connection client namevirtualHost - connection virtual hosttcpAddress - broker tcp address
public static javax.jms.Connection createConnection(String username,
String password,
String clientName,
String virtualHost,
String tcpAddress)
username - broker usernamepassword - broker passwordclientName - connection client namevirtualHost - connection virtual hosttcpAddress - broker tcp address
public static javax.jms.Connection createConnection(String amqpURL)
amqpURL - AMQP connection URL for the broker
public static javax.jms.Destination createDestination(String destinationStr)
destinationStr - destination String defining a JMS Destination
public static javax.jms.Destination createQueue(String destinationStr)
public static javax.jms.Destination createTopic(String destinationStr)
public static org.osgi.framework.ServiceRegistration registerConnection(org.osgi.framework.BundleContext context,
String connectionId,
javax.jms.Connection connection,
Properties props)
context - BundleContext for OSGiconnectionId - unique id for registering the connectionconnection - the JMS Connection to registerprops - optional OSGi registration properties
public static org.osgi.framework.ServiceRegistration registerDestination(org.osgi.framework.BundleContext context,
String destinationId,
javax.jms.Destination destination,
Properties props)
context - BundleContext for OSGidestinationId - unique id for registering the destinationdestination - the JMS Destination to registerprops - optional OSGi registration properties
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||