|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--edu.uiuc.cs.net.DPRPManager.DPRPLeaseEvent
Represents a "Lease Event", which can either be lease creation, updation (?), or deletion. Additionally, for each type of lease event, there is a certain sub-type -- wheather or not this event represents a success or a failure.
Field Summary | |
protected short |
errorcode
The details about the error; only set when isError is true. |
protected boolean |
isError
True if this event represents an error of some kind. |
protected boolean |
isNew
True if this lease is genuinely new, false otherwise. |
protected char |
leaseCommand
A letter-code giving a reason why this event was fired. |
protected DPRPLease |
sentLease
The DPRPLease object that we are sending. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
DPRPLeaseEvent(java.lang.Object so,
DPRPLease lea,
char reason)
Creates a new DPRPLeaseEvent object, for notifying the controller of a "lease change event". |
Method Summary | |
char |
getCommand()
Returns the reason that this event was fired. |
short |
getErrorcode()
Gets the errorcode contained in this event. |
DPRPLease |
getLease()
Returns the lease that is attached to this event. |
boolean |
isError()
Checks to see if this is an error event. |
boolean |
isNew()
Checks to see if this is an event for a newly-created lease. |
void |
markAsError()
Marks this event as an error event. |
void |
markAsOld()
Sets this lease to appear "not so new", as such. |
static java.lang.String |
resolveLeaseCommand(char cmd)
Stupid debugging method, used in-conjunction with this DPRPLeaseListener stuffs. |
void |
setCommand(char co)
Sets the reason for firing this event. |
void |
setErrorcode(short e)
Gives this event an errorcode to transmit. |
void |
setLease(DPRPLease l)
Attaches a lease to this event. |
void |
setSource(java.lang.Object sou)
Highly experimental and inflammatory. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected DPRPLease sentLease
DPRPLease
object that we are sending.protected char leaseCommand
protected boolean isError
protected boolean isNew
protected short errorcode
Constructor Detail |
public DPRPLeaseEvent(java.lang.Object so, DPRPLease lea, char reason)
so
- A reference to the source of this event.lea
- A reference to the lease to be sent in the event.reason
- A control code, designating the type of event.Method Detail |
public void setSource(java.lang.Object sou)
public DPRPLease getLease()
public void setLease(DPRPLease l)
public char getCommand()
public void setCommand(char co)
public void markAsError()
public boolean isError()
public short getErrorcode()
public void setErrorcode(short e)
public boolean isNew()
public void markAsOld()
public static java.lang.String resolveLeaseCommand(char cmd)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |