org.sblim.slp.internal.msg

Class MsgHeader

public class MsgHeader extends Object implements FunctionIDs

MsgHeader
Field Summary
static intFRESH
FRESH
static intMCAST
MCAST
static intOVERFLOW
OVERFLOW
static intRAW_HDR_LEN
RAW_HDR_LEN
static byteVERSION
VERSION
Constructor Summary
MsgHeader(MsgHeader pHdr)
Ctor.
MsgHeader(int pVersion, int pFunctionID, String pLangTag, boolean pOverflow, boolean pFresh, boolean pMCast, int pXID)
Ctor.
Method Summary
booleanfresh()
fresh
intgetFunctionID()
getFunctionID
StringgetLangTag()
getLangTag
intgetSize()
getSize
intgetVersion()
getVersion
intgetXID()
booleanmulticast()
multicast
booleanoverflows()
overflows
static MsgHeaderparse(SLPInputStream pInStr)
parse
byte[]serialize(int pBodyLength, boolean pOverflow, boolean pSetMultiCastFlag, boolean pKeepXID)
serialize
voidsetXID(int pXID)
The response have to contain the same XID of the request.

Field Detail

FRESH

public static final int FRESH
FRESH

MCAST

public static final int MCAST
MCAST

OVERFLOW

public static final int OVERFLOW
OVERFLOW

RAW_HDR_LEN

public static final int RAW_HDR_LEN
RAW_HDR_LEN

VERSION

public static final byte VERSION
VERSION

Constructor Detail

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 Detail

fresh

public boolean fresh()
fresh

Returns: boolean

getFunctionID

public int getFunctionID()
getFunctionID

Returns: int

getLangTag

public String getLangTag()
getLangTag

Returns: int

getSize

public int getSize()
getSize

Returns: int

getVersion

public int getVersion()
getVersion

Returns: int

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).

multicast

public boolean multicast()
multicast

Returns: boolean

overflows

public boolean overflows()
overflows

Returns: boolean

parse

public static MsgHeader parse(SLPInputStream pInStr)
parse

Parameters: pInStr

Returns: MsgHeader

Throws: ServiceLocationException IOException

serialize

public byte[] serialize(int pBodyLength, boolean pOverflow, boolean pSetMultiCastFlag, boolean pKeepXID)
serialize

Parameters: pBodyLength pOverflow pSetMultiCastFlag pKeepXID

Returns: byte[]

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

Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.