net.sf.jmsmq
Class MSMQQueueFactory

java.lang.Object
  extended bynet.sf.jmsmq.MSMQQueueFactory
All Implemented Interfaces:
java.io.Serializable

public class MSMQQueueFactory
extends java.lang.Object
implements java.io.Serializable

Factory of connections to MSMQ servers. Microsoft® Message Queuing Server. This class use JNI interfaces over the "jmsmq.dll" library. This library has to have visibility from the environment "PATH" variable of the execution of the application that use this project

See Also:
Serialized Form

Constructor Summary
MSMQQueueFactory(java.lang.String msmqServer)
          Constructor of MSMQQueueFactory.
 
Method Summary
 MSMQQueue createQueue(MQ_QUEUE_TYPE eQueueType, java.lang.String queueName, MQ_XACT_TYPE eXAct)
          Methdo that create a queue in the MSMQ server references by this factory
 void deleteQueue(MSMQQueue queue)
          Method that delete the queue in the MSMQ server references by this factory
 MSMQQueueEnumerator enumPrivateQueues()
          Method that recovery a private queue enumerator from the MSMQ server references by this factory
 java.lang.String getMSMQServer()
          Method that returns the MSMQ server name references by this factory
 MSMQQueue lookupQueue(MQ_QUEUE_TYPE eQueueType, java.lang.String queueName)
          Method that search a queue into the MSMQ server references by this factory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSMQQueueFactory

public MSMQQueueFactory(java.lang.String msmqServer)
                 throws java.net.UnknownHostException
Constructor of MSMQQueueFactory.

Parameters:
msmqServer - MSMQ Server host
Throws:
java.net.UnknownHostException - Throw if an exception occurs when trying to locate MSMQ host
Method Detail

createQueue

public MSMQQueue createQueue(MQ_QUEUE_TYPE eQueueType,
                             java.lang.String queueName,
                             MQ_XACT_TYPE eXAct)
                      throws MSMQException,
                             MSMQMaxLenPropertyException
Methdo that create a queue in the MSMQ server references by this factory

Parameters:
eQueueType - Queue type
queueName - Queue name
eXAct - Queue transactional type
Returns:
MSMQQueue Returns, if success, the reference of the created queue
Throws:
MSMQException - Throw if an exception occurs when creates the queue
MSMQMaxLenPropertyException - Throw if a name overflows the max size for a queue name

deleteQueue

public void deleteQueue(MSMQQueue queue)
                 throws MSMQException
Method that delete the queue in the MSMQ server references by this factory

Parameters:
queue - Referece to queue to delete
Throws:
MSMQException - Throw if an exception occurs when deletes the queue

lookupQueue

public MSMQQueue lookupQueue(MQ_QUEUE_TYPE eQueueType,
                             java.lang.String queueName)
                      throws MSMQException
Method that search a queue into the MSMQ server references by this factory

Parameters:
eQueueType - Queue type
queueName - Queue name
Returns:
MSMQQueue Referece to the founded queue
Throws:
MSMQException - Throw if an exception occurs when searchs the queue

enumPrivateQueues

public MSMQQueueEnumerator enumPrivateQueues()
                                      throws MSMQException
Method that recovery a private queue enumerator from the MSMQ server references by this factory

Returns:
MSMQQueueEnumerator A private queue enumerator reference
Throws:
MSMQException - Throw if an exception occurs when creates the private queue enumerator

getMSMQServer

public java.lang.String getMSMQServer()
Method that returns the MSMQ server name references by this factory

Returns:
String Returns MSMQ server name


Jorge Ruesga © 2006. All rigths reserved.