net.sourceforge.jwap.wtp.pdu
Class CWTPAbort

java.lang.Object
  |
  +--net.sourceforge.jwap.wtp.pdu.CWTPPDU
        |
        +--net.sourceforge.jwap.wtp.pdu.CWTPAbort

public class CWTPAbort
extends CWTPPDU

This Class represents an Abort PDU. According to the WTP specification in section 8 this PDU can be encoded into a byte array.

4 bytes are used. You can not input payload of upper layers. To encode the PDU call toByteArray().

There are to ways of creation: Either you construct a Object manually by calling the constructor or you use CWTPFactory to decode a byte Array.


Field Summary
static short ABORT_REASON_CPTEMPEXCEEDED
           
static short ABORT_REASON_INVALIDTID
           
static short ABORT_REASON_MESSAGETOOLARGE
           
static short ABORT_REASON_NORESPONSE
           
static short ABORT_REASON_NOTIMPLEMENTEDCL2
           
static short ABORT_REASON_NOTIMPLEMENTEDESAR
           
static short ABORT_REASON_NOTIMPLEMENTEDSAR
           
static short ABORT_REASON_NOTIMPLEMENTEDUACK
           
static short ABORT_REASON_PROTOERR
           
static short ABORT_REASON_UNKNOWN
           
static short ABORT_REASON_WTPVERSIONONE
           
static short ABORT_TYPE_PROVIDER
           
static short ABORT_TYPE_USER
           
 
Fields inherited from class net.sourceforge.jwap.wtp.pdu.CWTPPDU
PDU_TYPE_ABORT, PDU_TYPE_ACK, PDU_TYPE_INVOKE, PDU_TYPE_NEG_ACK, PDU_TYPE_RESULT, PDU_TYPE_SEGM_INVOKE, PDU_TYPE_SEGM_RESULT, types
 
Constructor Summary
CWTPAbort(int TID)
          Defaults:
abortType = ABORT_TYPE_USER;
abortReason = ABORT_REASON_UNKNOWN;
 
Method Summary
 short getAbortReason()
           
 long getAbortType()
           
 void setAbortReason(short abortReason)
           
 void setAbortType(long abortType)
           
 byte[] toByteArray()
          encodes the PDU according to the WTP spec
 java.lang.String toString()
          constructs a string representation of the object including all fields.
 
Methods inherited from class net.sourceforge.jwap.wtp.pdu.CWTPPDU
decode, getCON, getGTR, getPayload, getPDUType, getRES1, getRES2, getRID, getSegments, getTID, getTTR, setCON, setGTR, setPayload, setPDUType, setRES1, setRES2, setRID, setSegments, setTTR
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ABORT_TYPE_PROVIDER

public static final short ABORT_TYPE_PROVIDER

ABORT_TYPE_USER

public static final short ABORT_TYPE_USER

ABORT_REASON_UNKNOWN

public static final short ABORT_REASON_UNKNOWN

ABORT_REASON_PROTOERR

public static final short ABORT_REASON_PROTOERR

ABORT_REASON_INVALIDTID

public static final short ABORT_REASON_INVALIDTID

ABORT_REASON_NOTIMPLEMENTEDCL2

public static final short ABORT_REASON_NOTIMPLEMENTEDCL2

ABORT_REASON_NOTIMPLEMENTEDSAR

public static final short ABORT_REASON_NOTIMPLEMENTEDSAR

ABORT_REASON_NOTIMPLEMENTEDUACK

public static final short ABORT_REASON_NOTIMPLEMENTEDUACK

ABORT_REASON_WTPVERSIONONE

public static final short ABORT_REASON_WTPVERSIONONE

ABORT_REASON_CPTEMPEXCEEDED

public static final short ABORT_REASON_CPTEMPEXCEEDED

ABORT_REASON_NORESPONSE

public static final short ABORT_REASON_NORESPONSE

ABORT_REASON_MESSAGETOOLARGE

public static final short ABORT_REASON_MESSAGETOOLARGE

ABORT_REASON_NOTIMPLEMENTEDESAR

public static final short ABORT_REASON_NOTIMPLEMENTEDESAR
Constructor Detail

CWTPAbort

public CWTPAbort(int TID)
Defaults:
abortType = ABORT_TYPE_USER;
abortReason = ABORT_REASON_UNKNOWN;
Parameters:
TID - the Transaction ID according to the spec.
Method Detail

toByteArray

public byte[] toByteArray()
encodes the PDU according to the WTP spec
Overrides:
toByteArray in class CWTPPDU
Returns:
encoded bytes

getAbortType

public long getAbortType()

setAbortType

public void setAbortType(long abortType)

getAbortReason

public short getAbortReason()

setAbortReason

public void setAbortReason(short abortReason)

toString

public java.lang.String toString()
constructs a string representation of the object including all fields.
Overrides:
toString in class java.lang.Object
Returns:
The constructed String with debug information