org.psepr.jClient
Class PayloadAttribute

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

public class PayloadAttribute
extends Payload
implements PayloadParser

Author:
Robert.Adams@intel.com

Field Summary
static java.lang.String attributeNamespace
           
 
Constructor Summary
PayloadAttribute()
           
PayloadAttribute(java.lang.String ns)
           
PayloadAttribute(java.lang.String name, java.lang.String value)
           
 
Method Summary
 java.lang.String getAttributeExpire()
           
 java.lang.String getAttributeName()
           
 java.lang.String getAttributeSerial()
           
 java.lang.String getAttributeValue()
           
 Payload parsePayload(java.lang.String ns, org.xmlpull.v1.XmlPullParser parser)
          Parser the payload.
 void setAttributeExpire(java.lang.String xx)
           
 void setAttributeName(java.lang.String xx)
           
 void setAttributeSerial(java.lang.String xx)
           
 void setAttributeValue(java.lang.String xx)
           
 java.lang.String toXML()
          return the XML that represents the payload.
 void toXML(java.io.Writer wtr)
          Write the XML representation of this payload onto the passed writer.
 
Methods inherited from class org.psepr.jClient.Payload
getNamespace, setNamespace
 
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
 

Field Detail

attributeNamespace

public static final java.lang.String attributeNamespace
See Also:
Constant Field Values
Constructor Detail

PayloadAttribute

public PayloadAttribute()

PayloadAttribute

public PayloadAttribute(java.lang.String ns)
Parameters:
ns -

PayloadAttribute

public PayloadAttribute(java.lang.String name,
                        java.lang.String value)
Method Detail

getAttributeName

public java.lang.String getAttributeName()

setAttributeName

public void setAttributeName(java.lang.String xx)

getAttributeValue

public java.lang.String getAttributeValue()

setAttributeValue

public void setAttributeValue(java.lang.String xx)

getAttributeSerial

public java.lang.String getAttributeSerial()

setAttributeSerial

public void setAttributeSerial(java.lang.String xx)

getAttributeExpire

public java.lang.String getAttributeExpire()

setAttributeExpire

public void setAttributeExpire(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

toXML

public void toXML(java.io.Writer wtr)
Description copied from class: Payload
Write the XML representation of this payload onto the passed writer. Most things will override this so that writing to the Writer is fastest and returning a string is done via a StringWriter or similar. It is expected that the writing to the Writer will be the fastest and most used way of sending payloads out.

Overrides:
toXML in class Payload