|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.pap.unmarshal.PapMessageUnmarshaller
public abstract class PapMessageUnmarshaller
Abstract class for unmarshalling PAP XML messages into Java objects.
All unmarshallers must extend this class.
| Nested Class Summary | |
|---|---|
protected class |
PapMessageUnmarshaller.PushSDKErrorHandler
The handler for dealing with errors during unmarshalling. |
| Field Summary | |
|---|---|
protected static String |
ADDRESS_TAG
The address PAP XML tag. |
protected static String |
ADDRESS_VALUE_ATTR
The address value PAP XML attribute. |
protected static String |
BAD_FORMAT_ERROR_MSG
The error message for PAP XML found to be in a bad format. |
protected static String |
BEARER_ATTR
The bearer PAP XML attribute. |
protected static String |
BEARER_REQ_ATTR
The bearer required PAP XML attribute. |
protected static String |
CODE_ATTR
The status code PAP XML attribute. |
protected static String |
DELIVERY_METHOD_ATTR
The delivery method PAP XML attribute. |
protected static String |
DESC_ATTR
The status description PAP XML attribute. |
protected static String |
EVENT_TIME_ATTR
The event time PAP XML attribute. |
static String |
MESSAGE_STATE_ATTR
The message state PAP XML attribute. |
static String |
MISSING_MANDATORY_ERROR_MSG
The error message when PAP XML tags or attributes are found to be missing. |
static String |
PUSH_ID_ATTR
The push ID PAP XML attribute. |
protected static String |
QUALITY_OF_SERVICE_TAG
The quality of service PAP XML attribute. |
protected SAXParser |
saxParser
The SAX parser to be used in the unmarshalling. |
protected static String |
SENDER_ADDRESS_ATTR
The sender address PAP XML attribute. |
protected static String |
SENDER_NAME_ATTR
The sender name PAP XML attribute. |
protected static String |
VALUE_MSG
Used in error messages to indicate the value of an attribute or tag. |
| Constructor Summary | |
|---|---|
PapMessageUnmarshaller()
Default PAP message unmarshaller constructor. |
|
| Method Summary | |
|---|---|
protected abstract PapMessage |
unmarshal(String xml)
Unmarshals a PAP XML message. |
PapMessage |
unmarshal(String xml,
String contentType)
Unmarshals a PAP XML message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PUSH_ID_ATTR
public static final String MESSAGE_STATE_ATTR
public static final String MISSING_MANDATORY_ERROR_MSG
protected static final String SENDER_ADDRESS_ATTR
protected static final String SENDER_NAME_ATTR
protected static final String CODE_ATTR
protected static final String DESC_ATTR
protected static final String ADDRESS_TAG
protected static final String ADDRESS_VALUE_ATTR
protected static final String QUALITY_OF_SERVICE_TAG
protected static final String EVENT_TIME_ATTR
protected static final String DELIVERY_METHOD_ATTR
protected static final String BEARER_ATTR
protected static final String BEARER_REQ_ATTR
protected static final String BAD_FORMAT_ERROR_MSG
protected static final String VALUE_MSG
protected SAXParser saxParser
| Constructor Detail |
|---|
public PapMessageUnmarshaller()
throws PushSDKException
PushSDKException - if any errors occur initializing the XML parser| Method Detail |
|---|
public PapMessage unmarshal(String xml,
String contentType)
throws PushSDKException,
BadMessageException
xml - the PAP XML to unmarshalcontentType - the content type for validation purposes
PushSDKException - if the XML passed in is null or empty or if the content type is not application/xml
BadMessageException - if the unmarshalled message corresponds to a bad message
protected abstract PapMessage unmarshal(String xml)
throws SAXException,
IOException
xml - the PAP XML to unmarshal
SAXException - if any SAX errors occur during processing
IOException - if any IO errors occur
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||