de.sciss.common
Class ProcessingThread.Event
java.lang.Object
java.util.EventObject
de.sciss.app.BasicEvent
de.sciss.common.ProcessingThread.Event
- All Implemented Interfaces:
- java.io.Serializable
- Enclosing class:
- ProcessingThread
public static class ProcessingThread.Event
- extends BasicEvent
- See Also:
- Serialized Form
Field Summary |
static int |
STARTED
returned by getID() : the process started running |
static int |
STOPPED
returned by getID() : the server stopped running. |
Fields inherited from class java.util.EventObject |
source |
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 |
STARTED
public static final int STARTED
- returned by getID() : the process started running
- See Also:
- Constant Field Values
STOPPED
public static final int STOPPED
- returned by getID() : the server stopped running.
the return value of the client can be queried
by calling
getReturnCode
on the
ProcessingThread
.
- See Also:
ProcessingThread.getReturnCode()
,
Constant Field Values
ProcessingThread.Event
public ProcessingThread.Event(java.lang.Object source,
int ID,
long when,
ProcessingThread pt)
isDone
public boolean isDone()
isCancelled
public boolean isCancelled()
hasFailed
public boolean hasFailed()
getProcessingThread
public ProcessingThread getProcessingThread()
incorporate
public boolean incorporate(BasicEvent oldEvent)
- Description copied from class:
BasicEvent
- Asks the event to incorporate the action
described by another (older) event.
This method has been created to reduce overhead;
when many events are added to the event queue
of an ELM, this allows to fuse two adjectant
events. The idea is mainly based on the
replaceEdit()
method of the javax.swing.undo.UndoableEdit
interface; a pendant of a symmetric addEdit()
like method is not provided because it seems to
be unnecessary.
Implementation notes : the oldEvent
should
generally only be incorporated if it refers to
the same source object (getSource()
) and has
the same ID (getD()
). the
timestamp of the current event should not be modified.
- Specified by:
incorporate
in class BasicEvent
- Parameters:
oldEvent
- the most recent event in the queue
which might be incorporated by this
new event.
- Returns:
true
if this object was able to
incorporate the older event. in this
case the oldEvent
is removed from the
event queue. false
states
that the oldEvent
was incompatible and
should remain in the queue.- See Also:
UndoableEdit.replaceEdit( UndoableEdit )