public class JiapiEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
protected int |
id |
protected java.lang.Object |
sourceObject |
protected java.lang.Object |
target |
protected java.lang.String |
targetName |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
protected int id
protected java.lang.Object sourceObject
protected java.lang.Object target
protected java.lang.String targetName
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 eventpublic 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
Copyright © 2001. Documenation generated January 20 2015.