Package com.ibm.di.api.local.impl
Class SystemQueueImpl
- java.lang.Object
-
- com.ibm.di.api.local.impl.SystemQueueImpl
-
- All Implemented Interfaces:
SystemQueue
public class SystemQueueImpl extends java.lang.Object implements SystemQueue
System Queue class implements methods exposed through Server API local session.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytesMessage(java.lang.String aQueueName, int aTimeOut)
Retrieves a BytesMessage from the specified System QueueEntry
getEntry(java.lang.String aQueueName, int aTimeOut)
Retrieves an Entry object from the specified System Queuejavax.jms.Message
getMessage(java.lang.String aQueueName, int aTimeOut)
Retrieves a JMS Message from the specified System Queuejava.lang.String
getTextMessage(java.lang.String aQueueName, int aTimeOut)
Retrieves a TextMessage from the specified System Queuestatic SystemQueue
newInstance()
Gets a new Instance of this class.void
putBytesMessage(java.lang.String aQueueName, byte[] aMessageBytes)
Stores a BytesMessage in the specified System Queuevoid
putEntry(java.lang.String aQueueName, Entry aEntry)
Stores an Entry object to the specified System Queuevoid
putMessage(java.lang.String aQueueName, javax.jms.Message aMessage)
Stores a Message to the specified System Queuevoid
putTextMessage(java.lang.String aQueueName, java.lang.String aMessageText)
Stores a TextMessage to the System Queue
-
-
-
Method Detail
-
newInstance
public static SystemQueue newInstance() throws DIException
Gets a new Instance of this class.- Returns:
- the SystemQueue object.
- Throws:
DIException
- if an error occurs.
-
getMessage
public javax.jms.Message getMessage(java.lang.String aQueueName, int aTimeOut) throws DIException
Retrieves a JMS Message from the specified System Queue- Specified by:
getMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue from which the message is retrievedaTimeOut
- - specifies the maximum time in seconds to wait for a new message; if 0 is specified - if there is no message available this method returns immediately; if a negative number is specified, this method will wait indefinitely or until a message becomes available- Returns:
- the javax.jms.Message object.
- Throws:
DIException
- if an error occurs during receiving
-
putMessage
public void putMessage(java.lang.String aQueueName, javax.jms.Message aMessage) throws DIException
Stores a Message to the specified System Queue- Specified by:
putMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue to which the message is to be storedaMessage
- - the Message object to be stored- Throws:
DIException
- if an error occurs during storing
-
getTextMessage
public java.lang.String getTextMessage(java.lang.String aQueueName, int aTimeOut) throws DIException
Retrieves a TextMessage from the specified System Queue- Specified by:
getTextMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue from which the message is retrievedaTimeOut
- - specifies the maximum time in seconds to wait for a new message; if 0 is specified - if there is no message available this method returns immediately; if a negative number is specified, this method will wait indefinitely or until a message becomes available- Returns:
- The text of the message
- Throws:
DIException
- if an error occurs during receiving
-
putTextMessage
public void putTextMessage(java.lang.String aQueueName, java.lang.String aMessageText) throws DIException
Stores a TextMessage to the System Queue- Specified by:
putTextMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue to which the message is to be storedaMessageText
- - the text to be stored- Throws:
DIException
- if an error occurs during sending
-
getBytesMessage
public byte[] getBytesMessage(java.lang.String aQueueName, int aTimeOut) throws DIException
Retrieves a BytesMessage from the specified System Queue- Specified by:
getBytesMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue from which the message is retrievedaTimeOut
- - specifies the maximum time in seconds to wait for a new message; if 0 is specified - if there is no message available this method returns immediately; if a negative number is specified, this method will wait indefinitely or until a message becomes available- Returns:
- The bytes of the message in a byte array
- Throws:
DIException
- if an error occurs during receiving
-
putBytesMessage
public void putBytesMessage(java.lang.String aQueueName, byte[] aMessageBytes) throws DIException
Stores a BytesMessage in the specified System Queue- Specified by:
putBytesMessage
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue to which the message is to be storedaMessageBytes
- - the byte array to be stored- Throws:
DIException
- if an error occurs during sending
-
getEntry
public Entry getEntry(java.lang.String aQueueName, int aTimeOut) throws DIException
Retrieves an Entry object from the specified System Queue- Specified by:
getEntry
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue from which the message is retrievedaTimeOut
- - specifies the maximum time in seconds to wait for a new message; if 0 is specified - if there is no message available this method returns immediately; if a negative number is specified, this method will wait indefinitely or until a message becomes available- Returns:
- The retrieved com.ibm.di.entry.Entry object
- Throws:
DIException
- if an error occurs during receiving, or if the message retrieved is not an ObjectMessage or if the ObjectMessage retrieved does not store a com.ibm.di.entry.Entry object
-
putEntry
public void putEntry(java.lang.String aQueueName, Entry aEntry) throws DIException
Stores an Entry object to the specified System Queue- Specified by:
putEntry
in interfaceSystemQueue
- Parameters:
aQueueName
- - the name of the queue to which the Entry is to be storedaEntry
- - the Entry object to be stored- Throws:
DIException
- if an error occurs during sending
-
-