Class MsgHeader

java.lang.Object
org.sblim.slp.internal.msg.MsgHeader
All Implemented Interfaces:
FunctionIDs

public class MsgHeader extends Object implements FunctionIDs
MsgHeader
  • Field Details

  • Constructor Details

    • MsgHeader

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

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

    • parse

      public static MsgHeader parse(SLPInputStream pInStr) throws ServiceLocationException, IOException
      parse
      Parameters:
      pInStr -
      Returns:
      MsgHeader
      Throws:
      ServiceLocationException
      IOException
    • getVersion

      public int getVersion()
      getVersion
      Returns:
      int
    • getFunctionID

      public int getFunctionID()
      getFunctionID
      Returns:
      int
    • getLangTag

      public 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 set).
    • 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[]