SonicMQ API

progress.message.jclient
Class DestinationFactory

java.lang.Object
  extended by progress.message.jclient.DestinationFactory

public abstract class DestinationFactory
extends java.lang.Object

Description: This factory provides a mechanism that can be used to create a SonicMQ Destination without a Session or access to a JMS Object store.

Since:
7.0
Version:
7.0
Author:
Colin MacNaughton

Constructor Summary
DestinationFactory()
           
 
Method Summary
static MultiTopic createMultiTopic()
          Creates a new empty MultiTopic.
static Queue createQueue(java.lang.String queueName)
          Creates a SonicMQ Queue with the given queue name.
static Destination createSonicDestination(Destination dest)
          Creates a SonicMQ Destination from the given destination.
static Topic createTopic(java.lang.String topicName)
          Creates a SonicMQ Topic with the given topic name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestinationFactory

public DestinationFactory()
Method Detail

createTopic

public static final Topic createTopic(java.lang.String topicName)
                               throws JMSException
Creates a SonicMQ Topic with the given topic name.

Use of this factory is preferential to direct construction of a progress.message.jclient.Topic object.

Parameters:
topicName - The name of the topic.
Returns:
A SonicMQ Topic object
Throws:
JMSException

createQueue

public static final Queue createQueue(java.lang.String queueName)
                               throws JMSException
Creates a SonicMQ Queue with the given queue name.

Use of this factory is preferential to direct construction of a progress.message.jclient.Queue object.

Parameters:
queueName - The queue name.
Returns:
A SonicMQ Queue object.
Throws:
JMSException - If the queue cannot be created.

createMultiTopic

public static final MultiTopic createMultiTopic()
                                         throws JMSException
Creates a new empty MultiTopic.

Returns:
A new empty MultiTopic.
Throws:
JMSException - if there is an error creating a MultiTopic.

createSonicDestination

public static final Destination createSonicDestination(Destination dest)
                                                throws JMSException
Creates a SonicMQ Destination from the given destination. This is useful in cases where a javax.jms.Destination is obtained from another JMS Provider. In this case this method provides the programmer with a way to validate the Destination's syntax as well as return a Destination object that is optimized for use with SonicMQ. It is good practice to convert all topics that are to be used with SonicMQ that have not been created through this factory or the AdministeredObjectFactory.

Throws:
JMSException - if there is an error creating a SonicMQ Destination

SonicMQ API

Copyright © 1999-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-March-2012.