Class AbstractJmsRequest

    • Field Detail

      • requestId

        protected volatile int requestId
        Identifier of the request. Declared volatile to allow a thread that is not the thread sending the request to get the identifier in order to cancel it during a close.
      • target

        protected String target
        The request target is either a destination agent name, or a subscription name.
    • Constructor Detail

      • AbstractJmsRequest

        public AbstractJmsRequest()
        Constructs an AbstractJmsRequest.
      • AbstractJmsRequest

        public AbstractJmsRequest​(String target)
        Constructs an AbstractJmsRequest.
        Parameters:
        target - String identifier of the request target, either a queue name, or a subscription name.
    • Method Detail

      • setRequestId

        public final void setRequestId​(int requestId)
        Sets the request identifier.
        Parameters:
        requestId - The request identifier.
      • getRequestId

        public final int getRequestId()
        Returns the request identifier.
        Returns:
        The request identifier.
      • setTarget

        public final void setTarget​(String target)
        Sets the request target name.
        Parameters:
        target - The request target name.
      • getTarget

        public final String getTarget()
        Returns the request target name.
        Returns:
        The request target name.
      • writeTo

        public void writeTo​(OutputStream os)
                     throws IOException
        The object implements the writeTo method to write its contents to the output stream.
        Parameters:
        os - the stream to write the object to
        Throws:
        IOException - an error occurs during IO operation.
      • readFrom

        public void readFrom​(InputStream is)
                      throws IOException
        The object implements the readFrom method to restore its contents from the input stream.
        Parameters:
        is - the stream to read data from in order to restore the object
        Throws:
        IOException - an error occurs during IO operation.
      • getEncodableClassId

        public int getEncodableClassId()
        Description copied from interface: Encodable
        Returns a unique class identifier.
        Returns:
        a unique class identifier
      • getEncodedSize

        public int getEncodedSize()
                           throws Exception
        Description copied from interface: Encodable
        Returns the size of the byte array that results from the encoding of this object.
        Returns:
        the size of the encoded byte array
        Throws:
        Exception - if an error occurs
      • encode

        public void encode​(Encoder encoder)
                    throws Exception
        Description copied from interface: Encodable
        Encodes the content of this object
        Parameters:
        encoder - the encoder to be used for the encoding
        Throws:
        Exception - if an error occurs
      • decode

        public void decode​(Decoder decoder)
                    throws Exception
        Description copied from interface: Encodable
        Decodes the content of this object
        Parameters:
        decoder - the decoder to be used for the decoding
        Throws:
        Exception - if an error occurs