org.sblim.slp.internal.msg
Class SLPMessage

java.lang.Object
  extended byorg.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
SLPMessage(int pFunctionID)
          Ctor.
SLPMessage(int pFunctionID, java.lang.String pLangTag)
          Ctor.
SLPMessage(MsgHeader pHeader)
          Ctor.
 
Method Summary
 boolean fresh()
          fresh
 int getFunctionID()
          getFunctionID
 MsgHeader getHeader()
          getHeader
 java.lang.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)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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


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