net.sourceforge.jwap.wsp.pdu
Class CWSPCapabilities

java.lang.Object
  |
  +--net.sourceforge.jwap.wsp.pdu.CWSPCapabilities

public class CWSPCapabilities
extends java.lang.Object

Capabilities allow the client to negotiate characteristics and extended behaviours of the protocol (see section 8.3 of the WSP spec.).


Field Summary
static short OPTION_ACK_HEADERS
           
static short OPTION_CONF_PUSH_FACILITY
          section 8.3.2.3
static short OPTION_LARGE_DATA_TRANSFER
           
static short OPTION_PUSH_FACILITY
           
static short OPTION_SESSION_RESUME_FACILITY
           
static short TYPE_aliases
           
static short TYPE_clientMessageSize
           
static short TYPE_clientSDUSize
          Table 37
static short TYPE_extendedMethods
           
static short TYPE_headerCodePages
           
static short TYPE_methodMOR
           
static short TYPE_protocolOptions
           
static short TYPE_pushMOR
           
static short TYPE_serverMessageSize
           
static short TYPE_serverSDUSize
           
 
Constructor Summary
CWSPCapabilities()
           
 
Method Summary
 boolean addAlias(boolean bearerTypeIncluded, boolean portNumberIncluded, short bearerType, int portNumber, java.lang.String bearerAddressToUse)
          add a alias (alternate address of the sender)
 boolean addExtendedMethod(long pduType, java.lang.String name)
           
 boolean addHeaderCodePage(long pageCode, java.lang.String name)
          add a header code page
 java.util.Vector getAliases()
           
 byte[] getBytes()
          encode all capabilities in a byte array according to WAP-230-WSP-20010705-a section 8.3 "capability encoding"
 long getClientMessageSize()
           
 long getClientSDUSize()
           
 java.util.Hashtable getExtendedMethods()
           
 java.util.Hashtable getHeaderCodePages()
           
 long getMethodMOR()
           
 boolean getProtocolOption(short option)
          is the Option option set? use constants in this class beginnig with "OPTION_"
 byte getProtocolOptions()
           
 long getPushMOR()
           
 long getServerMessageSize()
           
 long getServerSDUSize()
           
static void main(java.lang.String[] args)
          Test method
 boolean removeAlias(boolean bearerTypeIncluded, boolean portNumberIncluded, short bearerType, int portNumber, java.lang.String bearerAddressToUse)
          remove a alias using the values as given
 boolean removeExtendedMethod(long pduType)
           
 boolean removeHeaderCodePage(long pageCode)
          remove a header code page if it exists.
 void setClientMessageSize(long size)
           
 void setClientSDUSize(long clientSDUSize)
           
 void setMethodMOR(long methodMOR)
           
 void setProtocolOption(short option, boolean on_off)
          set a protocoloption use constans in this class beginning with "OPTION_"
 void setPushMOR(long pushMOR)
           
 void setServerMessageSize(long size)
           
 void setServerSDUSize(long serverSDUSize)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_clientSDUSize

public static final short TYPE_clientSDUSize
Table 37

TYPE_serverSDUSize

public static final short TYPE_serverSDUSize

TYPE_protocolOptions

public static final short TYPE_protocolOptions

TYPE_methodMOR

public static final short TYPE_methodMOR

TYPE_pushMOR

public static final short TYPE_pushMOR

TYPE_extendedMethods

public static final short TYPE_extendedMethods

TYPE_headerCodePages

public static final short TYPE_headerCodePages

TYPE_aliases

public static final short TYPE_aliases

TYPE_clientMessageSize

public static final short TYPE_clientMessageSize

TYPE_serverMessageSize

public static final short TYPE_serverMessageSize

OPTION_CONF_PUSH_FACILITY

public static final short OPTION_CONF_PUSH_FACILITY
section 8.3.2.3

OPTION_PUSH_FACILITY

public static final short OPTION_PUSH_FACILITY

OPTION_SESSION_RESUME_FACILITY

public static final short OPTION_SESSION_RESUME_FACILITY

OPTION_ACK_HEADERS

public static final short OPTION_ACK_HEADERS

OPTION_LARGE_DATA_TRANSFER

public static final short OPTION_LARGE_DATA_TRANSFER
Constructor Detail

CWSPCapabilities

public CWSPCapabilities()
Method Detail

setClientSDUSize

public void setClientSDUSize(long clientSDUSize)

getClientSDUSize

public long getClientSDUSize()

setServerSDUSize

public void setServerSDUSize(long serverSDUSize)

getServerSDUSize

public long getServerSDUSize()

setProtocolOption

public void setProtocolOption(short option,
                              boolean on_off)
set a protocoloption use constans in this class beginning with "OPTION_"

getProtocolOption

public boolean getProtocolOption(short option)
is the Option option set? use constants in this class beginnig with "OPTION_"

getProtocolOptions

public byte getProtocolOptions()

setMethodMOR

public void setMethodMOR(long methodMOR)

getMethodMOR

public long getMethodMOR()

setPushMOR

public void setPushMOR(long pushMOR)

getPushMOR

public long getPushMOR()

getExtendedMethods

public java.util.Hashtable getExtendedMethods()

addExtendedMethod

public boolean addExtendedMethod(long pduType,
                                 java.lang.String name)

removeExtendedMethod

public boolean removeExtendedMethod(long pduType)

getHeaderCodePages

public java.util.Hashtable getHeaderCodePages()

addHeaderCodePage

public boolean addHeaderCodePage(long pageCode,
                                 java.lang.String name)
add a header code page

removeHeaderCodePage

public boolean removeHeaderCodePage(long pageCode)
remove a header code page if it exists.

getAliases

public java.util.Vector getAliases()

addAlias

public boolean addAlias(boolean bearerTypeIncluded,
                        boolean portNumberIncluded,
                        short bearerType,
                        int portNumber,
                        java.lang.String bearerAddressToUse)
add a alias (alternate address of the sender)

removeAlias

public boolean removeAlias(boolean bearerTypeIncluded,
                           boolean portNumberIncluded,
                           short bearerType,
                           int portNumber,
                           java.lang.String bearerAddressToUse)
remove a alias using the values as given

getClientMessageSize

public long getClientMessageSize()

setClientMessageSize

public void setClientMessageSize(long size)

getServerMessageSize

public long getServerMessageSize()

setServerMessageSize

public void setServerMessageSize(long size)

getBytes

public byte[] getBytes()
encode all capabilities in a byte array according to WAP-230-WSP-20010705-a section 8.3 "capability encoding"
Returns:
The encoded bytes

main

public static void main(java.lang.String[] args)
Test method
Parameters:
args - ignored