org.sblim.slp.internal.msg

Class SLPMessage

Implemented Interfaces:
FunctionIDs
Known Direct Subclasses:
ReplyMessage, RequestMessage, ServiceDeregistration, ServiceRegistration

public abstract class SLPMessage
extends java.lang.Object
implements FunctionIDs

SLPMessage

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

SLPMessage(int pFunctionID)
Ctor.
SLPMessage(int pFunctionID, String pLangTag)
Ctor.
SLPMessage(MsgHeader pHeader)
Ctor.

Method Summary

boolean
fresh()
fresh
int
getFunctionID()
getFunctionID
MsgHeader
getHeader()
getHeader
String
getLangTag()
getLangTag
int
getVersion()
getVersion
int
getXID()
getXID
boolean
multicast()
multicast
boolean
overflows()
overflows
byte[]
serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID)
serialize
byte[]
serialize(boolean pSetMulticastFlag, boolean pDatagramLimited, boolean pKeepXID, SerializeOption pOption)
serialize
protected abstract boolean
serializeBody(SLPOutputStream pOutStr, SerializeOption pOption)
void
setXID(int pXID)
String
toString()

Constructor Details

SLPMessage

public SLPMessage(int pFunctionID)
Ctor.
Parameters:
pFunctionID -

SLPMessage

public SLPMessage(int pFunctionID,
                  String pLangTag)
Ctor.
Parameters:
pFunctionID -
pLangTag -

SLPMessage

public SLPMessage(MsgHeader pHeader)
Ctor. used by message parser.
Parameters:
pHeader -

Method Details

fresh

public boolean fresh()
fresh
Returns:
boolean

getFunctionID

public int getFunctionID()
getFunctionID
Returns:
int

getHeader

public MsgHeader getHeader()
getHeader
Returns:
MsgHeader

getLangTag

public String getLangTag()
getLangTag
Returns:
String

getVersion

public int getVersion()
getVersion
Returns:
int

getXID

public int getXID()
getXID
Returns:
int

multicast

public boolean multicast()
multicast
Returns:
boolean

overflows

public boolean overflows()
overflows
Returns:
boolean

serialize

public byte[] serialize(boolean pSetMulticastFlag,
                        boolean pDatagramLimited,
                        boolean pKeepXID)
            throws ServiceLocationException
serialize
Parameters:
pSetMulticastFlag -
pDatagramLimited -
pKeepXID -
Returns:
byte[]

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[]

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)

setXID

public void setXID(int pXID)
Parameters:
pXID -

toString

public String toString()

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