Package com.ibm.di.systemqueue
Class SystemQueue
- java.lang.Object
-
- com.ibm.di.systemqueue.SystemQueue
-
public class SystemQueue extends java.lang.ObjectThe System Queue holds single connection to JMS Provider. It capsulate JMS specific methods and expose API for working with JMS. It receive all needed specific parameters to create JMS Driver, Connection Factories, Queues, Topics. It provides methods for sending and receiving messages to/from JMS Provider.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSystemQueue(java.lang.String aJmsDriverName, java.lang.String username, java.lang.String password, java.util.Hashtable aDriverParams)Constructor for the SystemQueueEngine object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytesMessage(java.lang.String queueName, int aTimeOut)Gets a BytesMessage from the System Queue.EntrygetEntry(java.lang.String aQueueName, int aTimeOut)Gets an Entry object from the System Queuejavax.jms.MessagegetMessage(java.lang.String aQueueName, int aTimeOut)Gets a Message from the System Queuejavax.jms.QueueConnectionFactorygetQueueConnectionFactory()Public getter of QueueConnectionFactoryjava.lang.StringgetTextMessage(java.lang.String aQueueName, int aTimeOut)Gets a TextMessage from the System Queuejavax.jms.TopicConnectionFactorygetTopicConnectionFactory()Public getter of TopicConnectionFactoryvoidputBytesMessage(java.lang.String aQueueName, byte[] aMessageBytes)Puts a BytesMessage to the System Queue.voidputEntry(java.lang.String aQueueName, Entry aEntry)Puts an Entry object to the System QueuevoidputMessage(java.lang.String aQueueName, javax.jms.Message aMessage)Puts a Message to the System QueuevoidputTextMessage(java.lang.String aQueueName, java.lang.String aMessageText)Puts a TextMessage to the System Queue
-
-
-
Constructor Detail
-
SystemQueue
protected SystemQueue(java.lang.String aJmsDriverName, java.lang.String username, java.lang.String password, java.util.Hashtable aDriverParams) throws java.lang.ExceptionConstructor for the SystemQueueEngine object- Parameters:
aJmsDriverName- the JMS Driver classnameaDriverParams- properties used for JMS Driver initialization- Throws:
java.lang.Exception- if JMS Driver cannot be initialized and used
-
-
Method Detail
-
getQueueConnectionFactory
public javax.jms.QueueConnectionFactory getQueueConnectionFactory() throws java.lang.ExceptionPublic getter of QueueConnectionFactory- Returns:
- QueueConnectionFactory object that holds Queue connection to JMS Provider
- Throws:
java.lang.Exception- i f QueueConnectionFactory cannot be obtained
-
getTopicConnectionFactory
public javax.jms.TopicConnectionFactory getTopicConnectionFactory() throws java.lang.ExceptionPublic getter of TopicConnectionFactory- Returns:
- TopicConnectionFactory object that holds Topic connection to JMS Provider
- Throws:
java.lang.Exception- if TopicConnectionFactory cannot be obtained
-
getMessage
public javax.jms.Message getMessage(java.lang.String aQueueName, int aTimeOut) throws java.lang.ExceptionGets a Message from the System Queue- Parameters:
aQueueName- queue name from what the message is getaTimeOut- Specifies the maximum time of waiting for a new message- Returns:
- the javax.jms.Message object.
- Throws:
java.lang.Exception- if an error occurs during receiving
-
putMessage
public void putMessage(java.lang.String aQueueName, javax.jms.Message aMessage) throws java.lang.ExceptionPuts a Message to the System Queue- Parameters:
aQueueName- queue name to what the message have to be sentaMessage- object that have to be sent- Throws:
java.lang.Exception- if an error occurs during sending
-
getTextMessage
public java.lang.String getTextMessage(java.lang.String aQueueName, int aTimeOut) throws java.lang.ExceptionGets a TextMessage from the System Queue- Parameters:
aQueueName- queue name from what the message is getaTimeOut- Specifies the maximum time of waiting for a new message- Returns:
- The text of the message
- Throws:
java.lang.Exception- if an error occurs during receiving
-
putTextMessage
public void putTextMessage(java.lang.String aQueueName, java.lang.String aMessageText) throws java.lang.ExceptionPuts a TextMessage to the System Queue- Parameters:
aQueueName- queue name to what the message have to be sentaMessageText- The text of the message to be sent- Throws:
java.lang.Exception- if an error occurs during sending
-
getBytesMessage
public byte[] getBytesMessage(java.lang.String queueName, int aTimeOut) throws java.lang.ExceptionGets a BytesMessage from the System Queue.- Parameters:
queueName- queue name from what the message is getaTimeOut- Specifies the maximum time of waiting for a new message- Returns:
- The bytes of the message
- Throws:
java.lang.Exception- if an error occurs during receiving
-
putBytesMessage
public void putBytesMessage(java.lang.String aQueueName, byte[] aMessageBytes) throws java.lang.ExceptionPuts a BytesMessage to the System Queue.- Parameters:
aQueueName- Queue name to what the message have to be sent.aMessageBytes- The bytes of the message to be sent.- Throws:
java.lang.Exception- if an error occurs during sending
-
getEntry
public Entry getEntry(java.lang.String aQueueName, int aTimeOut) throws java.lang.Exception
Gets an Entry object from the System Queue- Parameters:
aQueueName- queue name from what the message is getaTimeOut- Specifies the maximum time of waiting for a new message- Returns:
- The Entry
- Throws:
java.lang.Exception- if an error occurs during receiving
-
putEntry
public void putEntry(java.lang.String aQueueName, Entry aEntry) throws java.lang.ExceptionPuts an Entry object to the System Queue- Parameters:
aQueueName- queue name to what the message have to be sentaEntry- The Entry to be sent- Throws:
java.lang.Exception- if an error occurs during sending
-
-