Class SystemQueueImpl

  • All Implemented Interfaces:
    SystemQueue, java.io.Serializable, java.rmi.Remote

    public class SystemQueueImpl
    extends APIRemoteObject
    implements SystemQueue
    System Queue class implements methods exposed through Server API remote session.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.rmi.server.RemoteObject

        ref
    • 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 Queue
      Entry getEntry​(java.lang.String aQueueName, int aTimeOut)
      Retrieves an Entry object from the specified System Queue
      javax.jms.Message getMessage​(java.lang.String aQueueName, int aTimeOut)
      Retrieves a JMS Message from the specified System Queue
      java.lang.String getTextMessage​(java.lang.String aQueueName, int aTimeOut)
      Retrieves a TextMessage from the specified System Queue
      static SystemQueue newInstance​(SystemQueue localSystemQueue)
      Creates new instance of this class.
      void putBytesMessage​(java.lang.String aQueueName, byte[] aMessageBytes)
      Stores a BytesMessage in the specified System Queue
      void putEntry​(java.lang.String aQueueName, Entry aEntry)
      Stores an Entry object to the specified System Queue
      void putMessage​(java.lang.String aQueueName, javax.jms.Message aMessage)
      Stores a Message to the specified System Queue
      void putTextMessage​(java.lang.String aQueueName, java.lang.String aMessageText)
      Stores a TextMessage to the System Queue
      • Methods inherited from class java.rmi.server.UnicastRemoteObject

        clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
      • Methods inherited from class java.rmi.server.RemoteServer

        getClientHost, getLog, setLog
      • Methods inherited from class java.rmi.server.RemoteObject

        equals, getRef, hashCode, toString, toStub
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • newInstance

        public static SystemQueue newInstance​(SystemQueue localSystemQueue)
                                       throws java.rmi.RemoteException
        Creates new instance of this class.
        Parameters:
        localSystemQueue - local system queue
        Returns:
        SystemQueue object
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
      • getMessage

        public javax.jms.Message getMessage​(java.lang.String aQueueName,
                                            int aTimeOut)
                                     throws DIException,
                                            java.rmi.RemoteException
        Retrieves a JMS Message from the specified System Queue
        Specified by:
        getMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • putMessage

        public void putMessage​(java.lang.String aQueueName,
                               javax.jms.Message aMessage)
                        throws DIException,
                               java.rmi.RemoteException
        Stores a Message to the specified System Queue
        Specified by:
        putMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • getTextMessage

        public java.lang.String getTextMessage​(java.lang.String aQueueName,
                                               int aTimeOut)
                                        throws DIException,
                                               java.rmi.RemoteException
        Retrieves a TextMessage from the specified System Queue
        Specified by:
        getTextMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • putTextMessage

        public void putTextMessage​(java.lang.String aQueueName,
                                   java.lang.String aMessageText)
                            throws DIException,
                                   java.rmi.RemoteException
        Stores a TextMessage to the System Queue
        Specified by:
        putTextMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • getBytesMessage

        public byte[] getBytesMessage​(java.lang.String aQueueName,
                                      int aTimeOut)
                               throws DIException,
                                      java.rmi.RemoteException
        Retrieves a BytesMessage from the specified System Queue
        Specified by:
        getBytesMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • putBytesMessage

        public void putBytesMessage​(java.lang.String aQueueName,
                                    byte[] aMessageBytes)
                             throws DIException,
                                    java.rmi.RemoteException
        Stores a BytesMessage in the specified System Queue
        Specified by:
        putBytesMessage in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • getEntry

        public Entry getEntry​(java.lang.String aQueueName,
                              int aTimeOut)
                       throws DIException,
                              java.rmi.RemoteException
        Retrieves an Entry object from the specified System Queue
        Specified by:
        getEntry in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails
      • putEntry

        public void putEntry​(java.lang.String aQueueName,
                             Entry aEntry)
                      throws DIException,
                             java.rmi.RemoteException
        Stores an Entry object to the specified System Queue
        Specified by:
        putEntry in interface SystemQueue
        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
        java.rmi.RemoteException - If the Server API RMI connection fails