org.sblim.slp.internal
Class ServiceLocationHeader

java.lang.Object
  extended by org.sblim.slp.internal.ServiceLocationHeader
All Implemented Interfaces:
java.lang.Cloneable

public abstract class ServiceLocationHeader
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
static int ATTRRPLY
           
static int ATTRRQST
           
static int DAADVERT
           
static int SAADVERT
           
static int SRVACK
           
static int SRVDEREG
           
static int SRVREG
           
static int SRVRPLY
           
static int SRVRQST
           
static int SRVTYPERPLY
           
static int SRVTYPERQST
           
 
Constructor Summary
ServiceLocationHeader()
           
 
Method Summary
 void addPreviousResponder(java.net.InetAddress pInetAddress)
           
 java.lang.Object clone()
           
static java.lang.String getBytesString(byte[] pBuffer, java.lang.String pEncoding)
           
 short getErrorCode()
          Getter for errorCode
 int getFunctionCode()
          Getter for functionCode
 ServiceLocationHeader getHeader()
           
 int getInt(java.io.DataInputStream pStream)
           
protected  int getInt24(java.io.DataInputStream pStream)
           
static int getInteger(java.io.DataInputStream pStream)
           
 int getLength()
          Getter for length
 java.util.Locale getLocale()
          Getter for locale
 int getNumberOfBytes()
          Getter for numberOfBytes
 int getNumberOfReplies()
          Getter for numberOfReplies
 int getPacketLength()
          Getter for packetLength
 byte[] getPayload()
          Getter for payload
 java.util.Vector getPreviousResponse()
          Getter for previousResponse
 java.util.Vector getScopes()
          Getter for scopes
 byte[] getString(java.lang.StringBuffer pBuffer, java.io.DataInputStream pStream)
           
static byte[] getStringField(java.lang.StringBuffer pBuffer, java.io.DataInputStream pStream, java.lang.String pString)
           
static short getUniqueXID()
           
 int getVersion()
          Getter for version
 short getXid()
          Getter for xid
 void incrementNumberOfBytes(int pIncrement)
           
 boolean isFresh()
          Getter for fresh
 boolean isMCast()
          Getter for mCast
 boolean isOverflow()
          Getter for overflow
 org.sblim.slp.internal.ServiceLocationMessage makeErrorReply(java.lang.Exception pException)
           
abstract  void parseHeader(int pFunctionCode, java.io.DataInputStream pStream)
           
abstract  org.sblim.slp.internal.ServiceLocationMessage parseMsg(java.io.DataInputStream pStream)
           
abstract  void parseOptions(java.io.DataInputStream pStream)
           
 void putInt(int pValue, java.io.ByteArrayOutputStream pStream)
           
protected  void putInt24(int pValue, java.io.ByteArrayOutputStream pStream)
           
static void putInteger(int pValue, java.io.ByteArrayOutputStream pStream)
           
 byte[] putString(java.lang.String pValue, java.io.ByteArrayOutputStream pStream)
           
static byte[] putStringField(java.lang.String pString, java.io.ByteArrayOutputStream pStream, java.lang.String pEncoding)
           
abstract  void serialize(java.io.ByteArrayOutputStream pStream, boolean pUsingMCast, boolean pUsingStreams)
           
protected  byte[] serializeCommaSeparatedList(java.util.Vector pList, java.io.ByteArrayOutputStream pStream)
           
 void setErrorCode(short pErrorCode)
          Setter for errorCode
 void setFresh(boolean pFresh)
          Setter for fresh
 void setFunctionCode(int pFunctionCode)
          Setter for functionCode
 void setLength(int pLength)
          Setter for length
 void setLocale(java.util.Locale pLocale)
          Setter for locale
 void setMCast(boolean pCast)
          Setter for mCast
 void setNumberOfBytes(int pNumberOfBytes)
          Setter for numberOfBytes
 void setNumberOfReplies(int pNumberOfReplies)
          Setter for numberOfReplies
 void setOverflow(boolean pOverflow)
          Setter for overflow
 void setPacketLength(int pPacketLength)
          Setter for packetLength
 void setPayload(byte[] pPayload)
          Setter for payload
 void setPreviousResponse(java.util.Vector pPreviousResponse)
          Setter for previousResponse
 void setScopes(java.util.Vector pScopes)
          Setter for scopes
 void setVersion(int pVersion)
          Setter for version
 void setXid(short pXid)
          Setter for xid
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRRPLY

public static final int ATTRRPLY
See Also:
Constant Field Values

ATTRRQST

public static final int ATTRRQST
See Also:
Constant Field Values

DAADVERT

public static final int DAADVERT
See Also:
Constant Field Values

SAADVERT

public static final int SAADVERT
See Also:
Constant Field Values

SRVACK

public static final int SRVACK
See Also:
Constant Field Values

SRVDEREG

public static final int SRVDEREG
See Also:
Constant Field Values

SRVREG

public static final int SRVREG
See Also:
Constant Field Values

SRVRPLY

public static final int SRVRPLY
See Also:
Constant Field Values

SRVRQST

public static final int SRVRQST
See Also:
Constant Field Values

SRVTYPERPLY

public static final int SRVTYPERPLY
See Also:
Constant Field Values

SRVTYPERQST

public static final int SRVTYPERQST
See Also:
Constant Field Values
Constructor Detail

ServiceLocationHeader

public ServiceLocationHeader()
Method Detail

getBytesString

public static java.lang.String getBytesString(byte[] pBuffer,
                                              java.lang.String pEncoding)

getInteger

public static int getInteger(java.io.DataInputStream pStream)
                      throws ServiceLocationException,
                             java.io.IOException
Throws:
ServiceLocationException
java.io.IOException

getStringField

public static byte[] getStringField(java.lang.StringBuffer pBuffer,
                                    java.io.DataInputStream pStream,
                                    java.lang.String pString)
                             throws ServiceLocationException,
                                    java.io.IOException
Throws:
ServiceLocationException
java.io.IOException

getUniqueXID

public static short getUniqueXID()

putInteger

public static void putInteger(int pValue,
                              java.io.ByteArrayOutputStream pStream)

putStringField

public static byte[] putStringField(java.lang.String pString,
                                    java.io.ByteArrayOutputStream pStream,
                                    java.lang.String pEncoding)

getErrorCode

public short getErrorCode()
Getter for errorCode

Returns:
Returns the errorCode.

setErrorCode

public void setErrorCode(short pErrorCode)
Setter for errorCode

Parameters:
pErrorCode - The errorCode to set.

isFresh

public boolean isFresh()
Getter for fresh

Returns:
Returns the fresh.

setFresh

public void setFresh(boolean pFresh)
Setter for fresh

Parameters:
pFresh - The fresh to set.

getFunctionCode

public int getFunctionCode()
Getter for functionCode

Returns:
Returns the functionCode.

setFunctionCode

public void setFunctionCode(int pFunctionCode)
Setter for functionCode

Parameters:
pFunctionCode - The functionCode to set.

getLength

public int getLength()
Getter for length

Returns:
Returns the length.

setLength

public void setLength(int pLength)
Setter for length

Parameters:
pLength - The length to set.

getLocale

public java.util.Locale getLocale()
Getter for locale

Returns:
Returns the locale.

setLocale

public void setLocale(java.util.Locale pLocale)
Setter for locale

Parameters:
pLocale - The locale to set.

isMCast

public boolean isMCast()
Getter for mCast

Returns:
Returns the mCast.

setMCast

public void setMCast(boolean pCast)
Setter for mCast

Parameters:
pCast - The mCast to set.

getNumberOfBytes

public int getNumberOfBytes()
Getter for numberOfBytes

Returns:
Returns the numberOfBytes.

setNumberOfBytes

public void setNumberOfBytes(int pNumberOfBytes)
Setter for numberOfBytes

Parameters:
pNumberOfBytes - The numberOfBytes to set.

getNumberOfReplies

public int getNumberOfReplies()
Getter for numberOfReplies

Returns:
Returns the numberOfReplies.

setNumberOfReplies

public void setNumberOfReplies(int pNumberOfReplies)
Setter for numberOfReplies

Parameters:
pNumberOfReplies - The numberOfReplies to set.

isOverflow

public boolean isOverflow()
Getter for overflow

Returns:
Returns the overflow.

setOverflow

public void setOverflow(boolean pOverflow)
Setter for overflow

Parameters:
pOverflow - The overflow to set.

getPacketLength

public int getPacketLength()
Getter for packetLength

Returns:
Returns the packetLength.

setPacketLength

public void setPacketLength(int pPacketLength)
Setter for packetLength

Parameters:
pPacketLength - The packetLength to set.

getPayload

public byte[] getPayload()
Getter for payload

Returns:
Returns the payload.

setPayload

public void setPayload(byte[] pPayload)
Setter for payload

Parameters:
pPayload - The payload to set.

getPreviousResponse

public java.util.Vector getPreviousResponse()
Getter for previousResponse

Returns:
Returns the previousResponse.

setPreviousResponse

public void setPreviousResponse(java.util.Vector pPreviousResponse)
Setter for previousResponse

Parameters:
pPreviousResponse - The previousResponse to set.

getScopes

public java.util.Vector getScopes()
Getter for scopes

Returns:
Returns the scopes.

setScopes

public void setScopes(java.util.Vector pScopes)
Setter for scopes

Parameters:
pScopes - The scopes to set.

getVersion

public int getVersion()
Getter for version

Returns:
Returns the version.

setVersion

public void setVersion(int pVersion)
Setter for version

Parameters:
pVersion - The version to set.

getXid

public short getXid()
Getter for xid

Returns:
Returns the xid.

setXid

public void setXid(short pXid)
Setter for xid

Parameters:
pXid - The xid to set.

addPreviousResponder

public void addPreviousResponder(java.net.InetAddress pInetAddress)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getHeader

public ServiceLocationHeader getHeader()

getInt

public int getInt(java.io.DataInputStream pStream)
           throws ServiceLocationException,
                  java.io.IOException
Throws:
ServiceLocationException
java.io.IOException

getInt24

protected int getInt24(java.io.DataInputStream pStream)
                throws ServiceLocationException,
                       java.io.IOException
Throws:
ServiceLocationException
java.io.IOException

getString

public byte[] getString(java.lang.StringBuffer pBuffer,
                        java.io.DataInputStream pStream)
                 throws ServiceLocationException,
                        java.io.IOException
Throws:
ServiceLocationException
java.io.IOException

incrementNumberOfBytes

public void incrementNumberOfBytes(int pIncrement)

makeErrorReply

public org.sblim.slp.internal.ServiceLocationMessage makeErrorReply(java.lang.Exception pException)

parseHeader

public abstract void parseHeader(int pFunctionCode,
                                 java.io.DataInputStream pStream)
                          throws ServiceLocationException,
                                 java.io.IOException,
                                 java.lang.IllegalArgumentException
Throws:
ServiceLocationException
java.io.IOException
java.lang.IllegalArgumentException

parseMsg

public abstract org.sblim.slp.internal.ServiceLocationMessage parseMsg(java.io.DataInputStream pStream)
                                                                throws ServiceLocationException,
                                                                       java.io.IOException,
                                                                       java.lang.IllegalArgumentException
Throws:
ServiceLocationException
java.io.IOException
java.lang.IllegalArgumentException

parseOptions

public abstract void parseOptions(java.io.DataInputStream pStream)
                           throws ServiceLocationException,
                                  java.io.IOException,
                                  java.lang.IllegalArgumentException
Throws:
ServiceLocationException
java.io.IOException
java.lang.IllegalArgumentException

putInt

public void putInt(int pValue,
                   java.io.ByteArrayOutputStream pStream)

putInt24

protected void putInt24(int pValue,
                        java.io.ByteArrayOutputStream pStream)

putString

public byte[] putString(java.lang.String pValue,
                        java.io.ByteArrayOutputStream pStream)

serialize

public abstract void serialize(java.io.ByteArrayOutputStream pStream,
                               boolean pUsingMCast,
                               boolean pUsingStreams)
                        throws ServiceLocationException
Throws:
ServiceLocationException

serializeCommaSeparatedList

protected byte[] serializeCommaSeparatedList(java.util.Vector pList,
                                             java.io.ByteArrayOutputStream pStream)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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