org.psepr.jClient
Class Payload

java.lang.Object
  extended by org.psepr.jClient.Payload
Direct Known Subclasses:
PayloadAttribute, PayloadGeneric, PayloadLease

public class Payload
extends java.lang.Object


Constructor Summary
Payload()
          Base constructor.
Payload(java.lang.String ns)
          Create a payload with the namspace specified.
 
Method Summary
 java.lang.String getNamespace()
           
 void setNamespace(java.lang.String ns)
           
 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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Payload

public Payload()
Base constructor. One should be sure to set the namespace after this.


Payload

public Payload(java.lang.String ns)
Create a payload with the namspace specified.

Parameters:
ns -
Method Detail

getNamespace

public java.lang.String getNamespace()

setNamespace

public void setNamespace(java.lang.String ns)

toXML

public java.lang.String toXML()
return the XML that represents the payload. This is the complete payload element beginning and ending with ....

Returns:
XML of the complete payload

toXML

public void toXML(java.io.Writer wtr)
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.

Parameters:
wtr -