Class MessageTraceManagerImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List dataReceived  
      private java.util.List dataSent  
      private boolean enabled  
      private byte[] header  
      private boolean RHRCalled  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Discard all messages accumulated since the last call to clear.
      void enable​(boolean flag)
      Called with flag=true to enable capture of messages.
      byte[] getBytes​(java.nio.ByteBuffer bb, int offset)
      Return the contents of the byte buffer.
      byte[][] getDataReceived()
      Return an array of messages (represented as byte[]) for the message(s) received since the last call to clear().
      byte[][] getDataSent()
      Return an array of messages (represented as byte[]) for the message(s) sent on this thread since the last call to clear().
      private void init()  
      private void initHeaderRecorder()  
      boolean isEnabled()
      Returns true if messages are to be captured on this thread, otherwise false.
      void recordBodyReceived​(java.nio.ByteBuffer message)  
      void recordDataSent​(java.nio.ByteBuffer message)  
      void recordHeaderReceived​(java.nio.ByteBuffer message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dataSent

        private java.util.List dataSent
      • dataReceived

        private java.util.List dataReceived
      • enabled

        private boolean enabled
      • RHRCalled

        private boolean RHRCalled
      • header

        private byte[] header
    • Constructor Detail

      • MessageTraceManagerImpl

        public MessageTraceManagerImpl()
    • Method Detail

      • init

        private void init()
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: MessageTraceManager
        Returns true if messages are to be captured on this thread, otherwise false.
        Specified by:
        isEnabled in interface MessageTraceManager
        Returns:
        if messages are captured
      • enable

        public void enable​(boolean flag)
        Description copied from interface: MessageTraceManager
        Called with flag=true to enable capture of messages.
        Specified by:
        enable in interface MessageTraceManager
        Parameters:
        flag - enable capture
      • getDataSent

        public byte[][] getDataSent()
        Description copied from interface: MessageTraceManager
        Return an array of messages (represented as byte[]) for the message(s) sent on this thread since the last call to clear(). If there is a Location Forward in this invocation, the the data returned will include all requests sent starting with the first request.
        Specified by:
        getDataSent in interface MessageTraceManager
        Returns:
        array of messages
      • getDataReceived

        public byte[][] getDataReceived()
        Description copied from interface: MessageTraceManager
        Return an array of messages (represented as byte[]) for the message(s) received since the last call to clear().
        Specified by:
        getDataReceived in interface MessageTraceManager
        Returns:
        messages received
      • initHeaderRecorder

        private void initHeaderRecorder()
      • getBytes

        public byte[] getBytes​(java.nio.ByteBuffer bb,
                               int offset)
        Return the contents of the byte buffer. The ByteBuffer is not modified. The result is written starting at index offset in the byte[].
        Parameters:
        bb - Buffer to read from
        offset - Offset to start from, must be non-negative
        Returns:
        Contents of the buffer
      • recordHeaderReceived

        public void recordHeaderReceived​(java.nio.ByteBuffer message)
      • recordBodyReceived

        public void recordBodyReceived​(java.nio.ByteBuffer message)