|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.psepr.jClient.LeaseManager
public abstract class LeaseManager
The template for a lease manager. The canonical example of a lease manager is the SimpleLeaseManager but this structure lets a user implement complex lease strategies if necessary.
Lease managers have to be loaded with information about the channel they are operating on and then they are started. This process is because creating the lease manager doesn't happen at the same time as the creation of the connection structures for the lease. So, from the lease managers point of view, the steps are:
| Constructor Summary | |
|---|---|
LeaseManager()
|
|
LeaseManager(PsEPRConnection pConn,
java.lang.String chan,
java.lang.String type)
|
|
| Method Summary | |
|---|---|
abstract void |
forceRenegotiation()
|
PsEPRConnection |
getConnection()
|
abstract boolean |
getLeaseActive()
|
abstract java.lang.String |
getLeaseID()
Return the unique identifier for the lease |
java.lang.String |
getNamespace()
|
java.lang.String |
getType()
|
Payload |
parsePayload(java.lang.String ns,
org.xmlpull.v1.XmlPullParser parser)
Called with a payload to parse. |
boolean |
receiveEvent(PsEPREvent pE)
Called to see if I want to process this event. |
abstract void |
release()
Release the lease. |
void |
setConnection(PsEPRConnection conn)
|
abstract void |
setLeaseWindow(long xx)
Set the duration of the lease. |
void |
setNamespace(java.lang.String ns)
|
void |
setType(java.lang.String tp)
|
abstract void |
start()
Start the lease. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LeaseManager()
public LeaseManager(PsEPRConnection pConn,
java.lang.String chan,
java.lang.String type)
| Method Detail |
|---|
public PsEPRConnection getConnection()
public void setConnection(PsEPRConnection conn)
public java.lang.String getType()
public void setType(java.lang.String tp)
public java.lang.String getNamespace()
getNamespace in interface PayloadParserpublic void setNamespace(java.lang.String ns)
setNamespace in interface PayloadParserpublic abstract boolean getLeaseActive()
public abstract void setLeaseWindow(long xx)
xx - public abstract java.lang.String getLeaseID()
public abstract void forceRenegotiation()
public abstract void start()
public abstract void release()
public Payload parsePayload(java.lang.String ns,
org.xmlpull.v1.XmlPullParser parser)
parsePayload in interface PayloadParserns - the namespace specified in the payload elementparser - the parser positioned at the payload element
public boolean receiveEvent(PsEPREvent pE)
receiveEvent in interface EventReceiverpE - the event structure
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||