public class EventProducer extends Object
| Constructor and Description |
|---|
EventProducer()
Empty constructor.
|
EventProducer(String resolution)
This constructor will set up resolution to given value.
|
EventProducer(String[] resolutions)
This constructor will set up resolution to given values.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getResolutions()
Get the resolutions of this EventProducer.
|
boolean |
isProtected(JiapiEvent je)
Checks whether a given JiapiEvent is in protected mode. if JiapiEvent is
in protected mode, that event should not be fired.
|
boolean |
isProtected(Object sourceObject)
Checks whether a given sourceObject is in protected mode. if sourceObject
is in protected mode, corresponding JiapiEvent should not be fired.
|
boolean |
match(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(String resolution)
resolution - A resolution that is to be used.public EventProducer(String[] resolutions)
resolutions - A resolutions that is to be used.public boolean match(String s)
s - String ot matchpublic String[] getResolutions()
public boolean isProtected(Object sourceObject)
sourceObject - sourceObject to checkpublic boolean isProtected(JiapiEvent je)
je - JiapiEvent to checkpublic 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.
je - JiapiEventrelease(JiapiEvent),
JiapiEvent.protect()public void release(JiapiEvent je)
EventProducer so, that it is able to
produce more events for the sourceObject.je - JiapiEventprotect(JiapiEvent),
JiapiEvent.release()Copyright © 2017. All rights reserved.