Class Message

All Implemented Interfaces:
Direct Known Subclasses:
AmopMsg, EventMsg

public class Message
extends java.lang.Object
Messages between sdk and FISCO BCOS node.
See Also:
Serialized Form
  • Field Summary

    Modifier and Type Field Description
    protected byte[] data  
    static int HEADER_LENGTH  
    protected java.lang.Integer length  
    protected java.lang.Integer result  
    protected java.lang.String seq  
    protected java.lang.Short type  
  • Constructor Summary

    Constructor Description
  • Method Summary

    Modifier and Type Method Description
    void decode​(io.netty.buffer.ByteBuf in)
    decode the message from the given ByteBuf
    void encode​(io.netty.buffer.ByteBuf encodedData)
    encode the message into ByteBuf
    byte[] getData()  
    java.lang.Integer getLength()  
    java.lang.Integer getResult()  
    java.lang.String getSeq()  
    java.lang.Short getType()  
    protected void readDataFromByteBuf​(io.netty.buffer.ByteBuf in)  
    protected void readHeader​(io.netty.buffer.ByteBuf in)  
    void setData​(byte[] data)  
    void setLength​(java.lang.Integer length)  
    void setResult​(java.lang.Integer result)  
    void setSeq​(java.lang.String seq)  
    void setType​(java.lang.Short type)  
    protected void writeDataToByteBuf​(io.netty.buffer.ByteBuf out)  
    protected void writeHeader​(io.netty.buffer.ByteBuf out)  

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • encode

      public void encode​(io.netty.buffer.ByteBuf encodedData)
      encode the message into ByteBuf
      encodedData - the ByteBuf stores the encodedData
    • decode

      public void decode​(io.netty.buffer.ByteBuf in)
      decode the message from the given ByteBuf
      in - the ByteBuf that needs to decoded into the message
    • readDataFromByteBuf

      protected void readDataFromByteBuf​(io.netty.buffer.ByteBuf in)
    • writeDataToByteBuf

      protected void writeDataToByteBuf​(io.netty.buffer.ByteBuf out)
    • readHeader

      protected void readHeader​(io.netty.buffer.ByteBuf in)
    • writeHeader

      protected void writeHeader​(io.netty.buffer.ByteBuf out)
    • getLength

      public java.lang.Integer getLength()
    • setLength

      public void setLength​(java.lang.Integer length)
    • getType

      public java.lang.Short getType()
    • setType

      public void setType​(java.lang.Short type)
    • getSeq

      public java.lang.String getSeq()
    • setSeq

      public void setSeq​(java.lang.String seq)
    • getResult

      public java.lang.Integer getResult()
    • setResult

      public void setResult​(java.lang.Integer result)
    • getData

      public byte[] getData()
    • setData

      public void setData​(byte[] data)