org.psepr.jClient
Class PayloadGeneric

java.lang.Object
  extended by org.psepr.jClient.Payload
      extended by org.psepr.jClient.PayloadGeneric
All Implemented Interfaces:
PayloadParser

public class PayloadGeneric
extends Payload
implements PayloadParser

Parser that returns the payload as a string containing the XML. If a namespace is specified, payloads of that type are sucked up. If no namespace is given, this will pack all payloads that are not leases (these are captured before getting to the user's parser).

Author:
Robert.Adams@intel.com

Constructor Summary
PayloadGeneric()
           
PayloadGeneric(java.lang.String ns)
           
 
Method Summary
 java.lang.String getXML()
           
 Payload parsePayload(java.lang.String ns, org.xmlpull.v1.XmlPullParser parser)
          Parser the payload.
 void setXML(java.lang.String xx)
           
 java.lang.String toXML()
          return the XML that represents the payload.
 
Methods inherited from class org.psepr.jClient.Payload
getNamespace, setNamespace, toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.psepr.jClient.PayloadParser
getNamespace, setNamespace
 

Constructor Detail

PayloadGeneric

public PayloadGeneric()

PayloadGeneric

public PayloadGeneric(java.lang.String ns)
Parameters:
ns -
Method Detail

getXML

public java.lang.String getXML()

setXML

public void setXML(java.lang.String xx)

parsePayload

public Payload parsePayload(java.lang.String ns,
                            org.xmlpull.v1.XmlPullParser parser)
Description copied from interface: PayloadParser
Parser the payload. The parser should check to make sure that the passed namespace is the one this parser parses.

Specified by:
parsePayload in interface PayloadParser
Parameters:
ns - the namespace specified in the payload element
parser - positioned at the payload element. returned after
Returns:
the parsed payload object or 'null' if nothing parsed
See Also:
PayloadParser.parsePayload(java.lang.String, org.xmlpull.v1.XmlPullParser)

toXML

public java.lang.String toXML()
Description copied from class: Payload
return the XML that represents the payload. This is the complete payload element beginning and ending with ....

Overrides:
toXML in class Payload
Returns:
XML of the complete payload