|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
alt.jiapi.event.JiapiEvent
public class JiapiEvent
Base class for Jiapi events. This method is safe, in terms of event loop protection. That is, calling methods of JiapiEvent is guaranteed not to produce any further events from occuring.
Field Summary | |
---|---|
protected int |
id
|
protected java.lang.Object |
sourceObject
|
protected java.lang.Object |
target
|
protected java.lang.String |
targetName
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
JiapiEvent(EventProducer ep,
java.lang.Object sourceObject,
java.lang.String targetName,
int id)
Constructor for JiapiEvent. |
|
JiapiEvent(EventProducer ep,
java.lang.Object sourceObject,
java.lang.String targetName,
java.lang.Object target,
int id)
Constructor for JiapiEvent. |
Method Summary | |
---|---|
void |
finalize()
Finalization releases possible locks made on EventProducer . |
java.lang.Object |
getSourceObject()
Get the source Object. |
java.lang.Object |
getTarget()
Gets target Object. |
java.lang.String |
getTargetName()
Gets the name associated with this event. |
void |
protect()
This method protects application from entering into recursive event loop. |
void |
release()
This method releases EventProducer so, that
it is able to produce more events for the sourceObject. |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int id
protected java.lang.Object sourceObject
protected java.lang.Object target
protected java.lang.String targetName
Constructor Detail |
---|
public JiapiEvent(EventProducer ep, java.lang.Object sourceObject, java.lang.String targetName, int id)
ep
- EventProducersourceObject
- Source Object.targetName
- name of the target Objectid
- Id of the eventpublic JiapiEvent(EventProducer ep, java.lang.Object sourceObject, java.lang.String targetName, java.lang.Object target, int id)
ep
- EventProducer. This is passed to parent class with
super(ep);
sourceObject
- Source Object.targetName
- name of the target Objecttarget
- target Objectid
- Id of the eventMethod Detail |
---|
public void finalize()
EventProducer
.
finalize
in class java.lang.Object
public java.lang.Object getSourceObject()
public java.lang.Object getTarget()
public java.lang.String getTargetName()
public void protect()
Calling this method prevents EventProducer
from producing further events for the same sourceObject.
This protection mechanism allows applications to call
methods of sourceObject and targetObject without worrying
about event loops.
To enable events again, one will have to release
EventProducer
with method release
.
EventProducer.protect(JiapiEvent)
,
release()
public void release()
EventProducer
so, that
it is able to produce more events for the sourceObject.
EventProducer.release(JiapiEvent)
,
protect()
public java.lang.String toString()
toString
in class java.util.EventObject
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |