|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.cosylab.gui.displayers.UpdateRequest
public class UpdateRequest
This update request is sent to NumericAsynchonousConsumer
to
inform it that the source value has changed. The consumer take appropriate
action, which in the case of Abeans adapter includes notifying the
modeling layer about the change in target value.
Field Summary | |
---|---|
protected java.lang.Object |
newTargetValue
|
protected static long |
requestCount
|
protected long |
requestID
|
protected java.lang.Object |
targetValue
|
protected long |
timestamp
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
UpdateRequest(UpdateRequestListener source)
Constructs a new instance of this event. |
|
UpdateRequest(UpdateRequestListener source,
java.lang.Object targetValue)
Constructs a new instance of this event. |
Method Summary | |
---|---|
java.lang.Object |
getNewTargetValue()
Returns the value that was actually set as confirmed by the data consumer. |
long |
getRequestID()
Returns the request ID associated with this request. |
java.lang.Object |
getTargetValue()
Returns the target value. |
long |
getTimestamp()
Returns the timestamp (as in System.currentTimeMillis when
the event was created. |
void |
reply(java.lang.Object newTargetValue,
boolean success,
java.lang.Exception exception)
Signals the source UpdateRequestListener that the request
has been processed. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object targetValue
protected java.lang.Object newTargetValue
protected long timestamp
protected long requestID
protected static long requestCount
Constructor Detail |
---|
public UpdateRequest(UpdateRequestListener source)
source
- the listener which will receive replay for update requestpublic UpdateRequest(UpdateRequestListener source, java.lang.Object targetValue)
source
- setter dispatching the eventtargetValue
- Object rendering of the target value
java.lang.NullPointerException
- if target value is null
Method Detail |
---|
public long getTimestamp()
System.currentTimeMillis
when
the event was created. Will return 0 if the event was created with
single-paramter constructor.
public long getRequestID()
public void reply(java.lang.Object newTargetValue, boolean success, java.lang.Exception exception)
UpdateRequestListener
that the request
has been processed. This method may be invoked only by the
asynchronous data consumer. This is a callback and needs to be
called for each asynchronous update request. The event will delegate
the call to the source UpdateRequestListener
.
newTargetValue
- the new value of the dynamic value after the set
operation. If success indicates true
, this value
should be the same as the requested value for setting.
Otherwise, this value may be something else (for instance, if
setter wants to set above maximum, the actual value set may be
maximum allowed limit).success
- true
if update process proceeded without
problems, as defined by the asynchonous data consumerexception
- the exception thrown during unsuccesful updatepublic java.lang.Object getNewTargetValue()
targetValue
requested by the update requestor because of the possible exceptional
conditions in the modeling layer. This method will return
null
if the event was created with the single-parameter
constructor. Note: it is the responsibility of the adapter to
synchronize the target value of the setter with the confirmed value
after the set by calling setTargetValue
on the setter.
null
if single parameter constructor was used.public java.lang.Object getTargetValue()
null
if the event was
instantiated with the single parameter constructor.
null
if single parameter constructor was used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |