public class EventProducer
extends java.lang.Object
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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. |
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.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()
Copyright © 2001. Documenation generated January 20 2015.