org.hornetq.api.jms
Class HornetQJMSClient

java.lang.Object
  extended by org.hornetq.api.jms.HornetQJMSClient

public class HornetQJMSClient
extends Object

A utility class for creating HornetQ client-side JMS managed resources.

Author:
Andy Taylor

Method Summary
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory()
          Creates a HornetQConnectionFactory using all the defaults.
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(ClientSessionFactory sessionFactory)
          Creates a HornetQConnectionFactory using the ClientSessionFactory for its underlying connection.
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(List<Pair<TransportConfiguration,TransportConfiguration>> staticConnectors)
          Creates a HornetQConnectionFactory using a List of TransportConfigurations and backups.
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(String discoveryAddress, int discoveryPort)
          Creates a HornetQConnectionFactory that will use discovery to connect to the server.
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(TransportConfiguration connectorConfig)
          Creates a HornetQConnectionFactory to connect to a single live server.
static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(TransportConfiguration connectorConfig, TransportConfiguration backupConnectorConfig)
          Creates a HornetQConnectionFactory using a single pair of live-backup TransportConfiguration.
static Queue createQueue(String name)
          Creates a client-side representation of a JMS Queue.
static Topic createTopic(String name)
          Creates a client-side representation of a JMS Topic.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory()
Creates a HornetQConnectionFactory using all the defaults.

Returns:
The HornetQConnectionFactory.

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(ClientSessionFactory sessionFactory)
Creates a HornetQConnectionFactory using the ClientSessionFactory for its underlying connection.

Parameters:
sessionFactory - The underlying ClientSessionFactory to use.
Returns:
The HornetQConnectionFactory.

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(String discoveryAddress,
                                                                                      int discoveryPort)
Creates a HornetQConnectionFactory that will use discovery to connect to the server.

Parameters:
discoveryAddress - The address to use for discovery.
discoveryPort - The port to use for discovery.
Returns:
The HornetQConnectionFactory.

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(List<Pair<TransportConfiguration,TransportConfiguration>> staticConnectors)
Creates a HornetQConnectionFactory using a List of TransportConfigurations and backups.

Parameters:
staticConnectors - The list of TransportConfiguration to use.
Returns:
The HornetQConnectionFactory.

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(TransportConfiguration connectorConfig,
                                                                                      TransportConfiguration backupConnectorConfig)
Creates a HornetQConnectionFactory using a single pair of live-backup TransportConfiguration.

Parameters:
connectorConfig - The TransportConfiguration of the server to connect to.
backupConnectorConfig - The TransportConfiguration of the backup server to connect to. can be null.
Returns:
The HornetQConnectionFactory.

createConnectionFactory

public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactory(TransportConfiguration connectorConfig)
Creates a HornetQConnectionFactory to connect to a single live server.

Parameters:
connectorConfig - The TransportConfiguration of the server.
Returns:
The HornetQConnectionFactory.

createTopic

public static Topic createTopic(String name)
Creates a client-side representation of a JMS Topic.

Parameters:
name - the name of the topic
Returns:
The Topic

createQueue

public static Queue createQueue(String name)
Creates a client-side representation of a JMS Queue.

Parameters:
name - the name of the queue
Returns:
The Queue


Copyright © 2009 Red Hat Inc. All Rights Reserved.