Package com.ibm.di.systemqueue
Class SystemQueue
- java.lang.Object
-
- com.ibm.di.systemqueue.SystemQueue
-
public class SystemQueue extends java.lang.Object
The 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 protected
SystemQueue(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.Entry
getEntry(java.lang.String aQueueName, int aTimeOut)
Gets an Entry object from the System Queuejavax.jms.Message
getMessage(java.lang.String aQueueName, int aTimeOut)
Gets a Message from the System Queuejavax.jms.QueueConnectionFactory
getQueueConnectionFactory()
Public getter of QueueConnectionFactoryjava.lang.String
getTextMessage(java.lang.String aQueueName, int aTimeOut)
Gets a TextMessage from the System Queuejavax.jms.TopicConnectionFactory
getTopicConnectionFactory()
Public getter of TopicConnectionFactoryvoid
putBytesMessage(java.lang.String aQueueName, byte[] aMessageBytes)
Puts a BytesMessage to the System Queue.void
putEntry(java.lang.String aQueueName, Entry aEntry)
Puts an Entry object to the System Queuevoid
putMessage(java.lang.String aQueueName, javax.jms.Message aMessage)
Puts a Message to the System Queuevoid
putTextMessage(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.Exception
Constructor 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.Exception
Public 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.Exception
Public 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.Exception
Gets 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.Exception
Puts 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.Exception
Gets 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.Exception
Puts 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.Exception
Gets 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.Exception
Puts 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.Exception
Puts 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
-
-