Package org.sblim.slp.internal.msg
Class SLPMessage
- java.lang.Object
-
- org.sblim.slp.internal.msg.SLPMessage
-
- All Implemented Interfaces:
FunctionIDs
- Direct Known Subclasses:
ReplyMessage
,RequestMessage
,ServiceDeregistration
,ServiceRegistration
public abstract class SLPMessage extends java.lang.Object implements FunctionIDs
SLPMessage
-
-
Field Summary
-
Fields inherited from interface org.sblim.slp.internal.msg.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 Constructor Description SLPMessage(int pFunctionID)
Ctor.SLPMessage(int pFunctionID, java.lang.String pLangTag)
Ctor.SLPMessage(MsgHeader pHeader)
Ctor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
fresh()
freshint
getFunctionID()
getFunctionIDMsgHeader
getHeader()
getHeaderjava.lang.String
getLangTag()
getLangTagint
getVersion()
getVersionint
getXID()
getXIDboolean
multicast()
multicastboolean
overflows()
overflowsbyte[]
serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID)
serializebyte[]
serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID, SerializeOption pOption)
serializeprotected abstract boolean
serializeBody(SLPOutputStream pOutStr, SerializeOption pOption)
void
setXID(int pXID)
java.lang.String
toString()
-
-
-
Constructor Detail
-
SLPMessage
public SLPMessage(int pFunctionID)
Ctor.- Parameters:
pFunctionID
-
-
SLPMessage
public SLPMessage(int pFunctionID, java.lang.String pLangTag)
Ctor.- Parameters:
pFunctionID
-pLangTag
-
-
SLPMessage
public SLPMessage(MsgHeader pHeader)
Ctor. used by message parser.- Parameters:
pHeader
-
-
-
Method Detail
-
getHeader
public MsgHeader getHeader()
getHeader- Returns:
- MsgHeader
-
getVersion
public int getVersion()
getVersion- Returns:
- int
-
getFunctionID
public int getFunctionID()
getFunctionID- Returns:
- int
-
getLangTag
public java.lang.String getLangTag()
getLangTag- Returns:
- String
-
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()
getXID- Returns:
- int
-
setXID
public void setXID(int pXID)
- Parameters:
pXID
-- See Also:
MsgHeader.setXID(int)
-
serialize
public byte[] serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID) throws ServiceLocationException
serialize- Parameters:
pSetMulticastFlag
-pDatagramLimited
-pKeepXID
-- Returns:
- byte[]
- Throws:
ServiceLocationException
-
serialize
public byte[] serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID, SerializeOption pOption) throws ServiceLocationException
serialize- Parameters:
pSetMulticastFlag
-pDatagramLimited
-pKeepXID
-pOption
- - passed to the serializeBody() method of the inherited classes- Returns:
- byte[]
- Throws:
ServiceLocationException
-
serializeBody
protected abstract boolean serializeBody(SLPOutputStream pOutStr, SerializeOption pOption) throws ServiceLocationException
- Returns:
- true if all data is written into pOStr (all data fits into size limit)
- Throws:
ServiceLocationException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-