Class MsgHeader
java.lang.Object
org.sblim.slp.internal.msg.MsgHeader
- All Implemented Interfaces:
FunctionIDs
MsgHeader
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFRESHstatic final intMCASTstatic final intOVERFLOWstatic final intRAW_HDR_LENstatic final byteVERSIONFields inherited from interface FunctionIDs
ATTR_RPLY, ATTR_RQST, DA_ADVERT, FIRST_ID, LAST_ID, SA_ADVERT, SRV_ACK, SRV_DEREG, SRV_REG, SRV_RPLY, SRV_RQST, SRV_TYPE_RPLY, SRV_TYPE_RQST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfresh()freshintgetFunctionIDgetLangTagintgetSize()getSizeintgetVersionintgetXID()booleanmulticastbooleanoverflowsstatic MsgHeaderparse(SLPInputStream pInStr) parsebyte[]serialize(int pBodyLength, boolean pOverflow, boolean pSetMultiCastFlag, boolean pKeepXID) serializevoidsetXID(int pXID) The response have to contain the same XID of the request.
-
Field Details
-
VERSION
public static final byte VERSIONVERSION- See Also:
-
RAW_HDR_LEN
public static final int RAW_HDR_LENRAW_HDR_LEN- See Also:
-
OVERFLOW
public static final int OVERFLOWOVERFLOW- See Also:
-
FRESH
public static final int FRESHFRESH- See Also:
-
MCAST
public static final int MCASTMCAST- See Also:
-
-
Constructor Details
-
MsgHeader
-
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
parse- Parameters:
pInStr-- Returns:
- MsgHeader
- Throws:
ServiceLocationExceptionIOException
-
getVersion
public int getVersion()getVersion- Returns:
- int
-
getFunctionID
public int getFunctionID()getFunctionID- Returns:
- int
-
getLangTag
-
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[]
-