|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalt.jiapi.event.EventProducer
public class EventProducer
Base class for event producers.
Constructor Summary | |
---|---|
EventProducer()
Empty constructor. |
|
EventProducer(java.lang.String resolution)
This constructor will set up resolution to given value. |
|
EventProducer(java.lang.String[] resolutions)
This constructor will set up resolution to given values. |
Method Summary | |
---|---|
java.lang.String[] |
getResolutions()
Get the resolutions of this EventProducer. |
boolean |
isProtected(JiapiEvent je)
Checks whether a given JiapiEvent is in protected mode. |
boolean |
isProtected(java.lang.Object sourceObject)
Checks whether a given sourceObject is in protected mode. |
boolean |
match(java.lang.String s)
Matches a given String into resolution String this EventProducer has. |
void |
protect(JiapiEvent je)
This method protects application from entering into recursive event loop. |
void |
release(JiapiEvent je)
This method releases EventProducer so, that
it is able to produce more events for the sourceObject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventProducer()
public EventProducer(java.lang.String resolution)
resolution
- A resolution that is to be used.public EventProducer(java.lang.String[] resolutions)
resolution
- A resolutions that is to be used.Method Detail |
---|
public java.lang.String[] getResolutions()
public boolean isProtected(JiapiEvent je)
je
- JiapiEvent to checkpublic boolean isProtected(java.lang.Object sourceObject)
sourceObject
- sourceObject to checkpublic boolean match(java.lang.String s)
public void protect(JiapiEvent je)
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
.
release(JiapiEvent)
,
JiapiEvent.protect()
public void release(JiapiEvent je)
EventProducer
so, that
it is able to produce more events for the sourceObject.
protect(JiapiEvent)
,
JiapiEvent.release()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |