org.psepr.jClient
Class PsEPRLease
java.lang.Object
org.psepr.jClient.PsEPRLease
public class PsEPRLease
- extends java.lang.Object
Manage a lease on a channel.
This deals with the "internal" part of the lease -- the parsing, reception
and management of the lease. One of these is created for each of the user's
leases and this holds the objects that are parsing, receiving and managing
the lease.
* @author Robert.Adams@intel.com
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PsEPRLease
public PsEPRLease()
PsEPRLease
public PsEPRLease(java.lang.String chan,
PayloadParser xpp,
EventReceiver xpr,
LeaseManager lm)
- Create a new lease.
- Parameters:
chan - xpp - xpr - lm -
getNamespace
public java.lang.String getNamespace()
setNamespace
public void setNamespace(java.lang.String ns)
getChannel
public java.lang.String getChannel()
setChannel
public void setChannel(java.lang.String ch)
getPayloadParser
public PayloadParser getPayloadParser()
setPayloadParser
public void setPayloadParser(PayloadParser xpp)
getEventReceiver
public EventReceiver getEventReceiver()
setEventReceiver
public void setEventReceiver(EventReceiver xpp)
getLeaseManager
public LeaseManager getLeaseManager()
setLeaseManager
public void setLeaseManager(LeaseManager xlm)
parsePayload
public Payload parsePayload(java.lang.String ns,
org.xmlpull.v1.XmlPullParser parser)
- Called by the connection for every message that comes in.
We see if it's for us and return the parsed payload if so.
- Parameters:
ns - the namespace found in the payload elementparser - pointed into the payload element. Returned after.
- Returns:
- a Payload object or 'null' if we didn't parse it
receiveEvent
public boolean receiveEvent(PsEPREvent ev)