com.ibm.di.api.jmx.mbeans
Class SystemQueue

java.lang.Object
  extended by com.ibm.di.api.jmx.mbeans.BaseAdmin
      extended by com.ibm.di.api.jmx.mbeans.SystemQueue
All Implemented Interfaces:
BaseAdminMBean, BaseMBean, SystemQueueMBean

public class SystemQueue
extends BaseAdmin
implements SystemQueueMBean

SystemQueue class implements public methods exposed through JMX layer.


Field Summary
static String MBEAN_ID
          Id of the MBean.
static String MBEAN_TYPE
          Type of the MBean.
 
Constructor Summary
SystemQueue(SystemQueue aLocalSystemQueue)
           
 
Method Summary
 byte[] getBytesMessage(String aQueueName, int aTimeOut)
          Retrieves a BytesMessage from the specified System Queue
 Entry getEntry(String aQueueName, int aTimeOut)
          Retrieves an Entry object from the specified System Queue
 String getId()
          Reads attribute "Id".
 javax.jms.Message getMessage(String aQueueName, int aTimeOut)
          Retrieves a JMS Message from the specified System Queue
 String getTextMessage(String aQueueName, int aTimeOut)
          Retrieves a TextMessage from the specified System Queue
 String getType()
          Reads attribute "Type".
 void putBytesMessage(String aQueueName, byte[] aMessageBytes)
          Stores a BytesMessage in the specified System Queue
 void putEntry(String aQueueName, Entry aEntry)
          Stores an Entry object to the specified System Queue
 void putMessage(String aQueueName, javax.jms.Message aMessage)
          Stores a Message to the specified System Queue
 void putTextMessage(String aQueueName, String aMessageText)
          Stores a TextMessage to the System Queue
 
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_TYPE

public static final String MBEAN_TYPE
Type of the MBean.

See Also:
Constant Field Values

MBEAN_ID

public static final String MBEAN_ID
Id of the MBean.

See Also:
Constant Field Values
Constructor Detail

SystemQueue

public SystemQueue(SystemQueue aLocalSystemQueue)
            throws DIException
Parameters:
aLocalSystemQueue - SystemQueue
Throws:
DIException
Method Detail

getType

public String getType()
Reads attribute "Type".

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getType in interface BaseMBean
Returns:
the type of this MBean.

getId

public String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getId in interface BaseMBean
Returns:
the Id of this MBean.

getMessage

public javax.jms.Message getMessage(String aQueueName,
                                    int aTimeOut)
                             throws DIException
Retrieves a JMS Message from the specified System Queue

Specified by:
getMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue from which the message is retrieved
aTimeOut - - 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(String aQueueName,
                       javax.jms.Message aMessage)
                throws DIException
Stores a Message to the specified System Queue

Specified by:
putMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue to which the message is to be stored
aMessage - - the Message object to be stored
Throws:
DIException - if an error occurs during storing

getTextMessage

public String getTextMessage(String aQueueName,
                             int aTimeOut)
                      throws DIException
Retrieves a TextMessage from the specified System Queue

Specified by:
getTextMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue from which the message is retrieved
aTimeOut - - 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(String aQueueName,
                           String aMessageText)
                    throws DIException
Stores a TextMessage to the System Queue

Specified by:
putTextMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue to which the message is to be stored
aMessageText - - the text to be stored
Throws:
DIException - if an error occurs during sending

getBytesMessage

public byte[] getBytesMessage(String aQueueName,
                              int aTimeOut)
                       throws DIException
Retrieves a BytesMessage from the specified System Queue

Specified by:
getBytesMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue from which the message is retrieved
aTimeOut - - 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(String aQueueName,
                            byte[] aMessageBytes)
                     throws DIException
Stores a BytesMessage in the specified System Queue

Specified by:
putBytesMessage in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue to which the message is to be stored
aMessageBytes - - the byte array to be stored
Throws:
DIException - if an error occurs during sending

getEntry

public Entry getEntry(String aQueueName,
                      int aTimeOut)
               throws DIException
Retrieves an Entry object from the specified System Queue

Specified by:
getEntry in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue from which the message is retrieved
aTimeOut - - 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(String aQueueName,
                     Entry aEntry)
              throws DIException
Stores an Entry object to the specified System Queue

Specified by:
putEntry in interface SystemQueueMBean
Parameters:
aQueueName - - the name of the queue to which the Entry is to be stored
aEntry - - the Entry object to be stored
Throws:
DIException - if an error occurs during sending