org.psepr.jClient
Interface PayloadParser
- All Known Implementing Classes:
- LeaseManager, PayloadAttribute, PayloadGeneric, PayloadLease, SimpleLeaseManager
public interface PayloadParser
When a PsEPR event is received, there must be an instance of this
interface registered for the payload namespace that will parse the
payload and create a payload object.
In most cases, users will create a class that extends Payload and
implements the PayloadParser interface.
- Author:
- Robert.Adams@intel.com
getNamespace
java.lang.String getNamespace()
setNamespace
void setNamespace(java.lang.String ns)
parsePayload
Payload parsePayload(java.lang.String ns,
org.xmlpull.v1.XmlPullParser parser)
- Parser the payload. The parser should check to make sure that the
passed namespace is the one this parser parses.
- Parameters:
ns - the namespace specified in the payload elementparser - positioned at the payload element. returned after
- Returns:
- the parsed payload object or 'null' if nothing parsed