Class MsgHeader

  • All Implemented Interfaces:
    FunctionIDs

    public class MsgHeader
    extends java.lang.Object
    implements FunctionIDs
    MsgHeader
    • Constructor Detail

      • MsgHeader

        public MsgHeader​(MsgHeader pHdr)
        Ctor.
        Parameters:
        pHdr -
      • MsgHeader

        public MsgHeader​(int pVersion,
                         int pFunctionID,
                         java.lang.String pLangTag,
                         boolean pOverflow,
                         boolean pFresh,
                         boolean pMCast,
                         int pXID)
        Ctor.
        Parameters:
        pVersion -
        pFunctionID -
        pLangTag -
        pOverflow -
        pFresh -
        pMCast -
        pXID -
    • Method Detail

      • getVersion

        public int getVersion()
        getVersion
        Returns:
        int
      • getFunctionID

        public int getFunctionID()
        getFunctionID
        Returns:
        int
      • getLangTag

        public java.lang.String getLangTag()
        getLangTag
        Returns:
        int
      • overflows

        public boolean overflows()
        overflows
        Returns:
        boolean
      • fresh

        public boolean fresh()
        fresh
        Returns:
        boolean
      • multicast

        public boolean multicast()
        multicast
        Returns:
        boolean
      • getXID

        public int getXID()
        Returns:
        the XID which is parsed from the message. serialize() doesn't use this value, that serializes a new XID into the stream at every call (unless pKeepXID is setted).
      • setXID

        public void setXID​(int pXID)
        The response have to contain the same XID of the request. So this setter can be useful.
        Parameters:
        pXID -
      • getSize

        public int getSize()
        getSize
        Returns:
        int
      • serialize

        public byte[] serialize​(int pBodyLength,
                                boolean pOverflow,
                                boolean pSetMultiCastFlag,
                                boolean pKeepXID)
        serialize
        Parameters:
        pBodyLength -
        pOverflow -
        pSetMultiCastFlag -
        pKeepXID -
        Returns:
        byte[]