|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.tmote.DispatcherAction
public abstract class DispatcherAction
Provides the Action
implementations for Sender
and Receiver
.
This abstract class should only be extended by Sender and Receiver.
Action
,
Sender
,
Receiver
,
Dispatcher
Field Summary | |
---|---|
protected byte |
actionState
|
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Constructor Summary | |
---|---|
DispatcherAction()
|
Method Summary | |
---|---|
Action |
block()
Blocks until an interrupt is received. |
Action |
block(int timeoutMilli)
Block for "timeoutMilli" milliseconds. |
Action |
cancel()
Cancels the current action (unsupported). |
byte |
getActionState()
Returns the current action state. |
boolean |
isDone()
Checks if the current action state is Action.DONE . |
protected boolean |
subcancel()
Called during cancel() . |
Action |
submit()
Submits this for processing, returns true if succeeded. |
protected abstract boolean |
subsubmit()
Called during submit() . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte actionState
Constructor Detail |
---|
public DispatcherAction()
Method Detail |
---|
public Action submit()
this
for processing, returns true if succeeded.
Used by the Sender and Receiver
to implement the system Action
interface. Classes deriving from
DispatcherAction must implement the subsubmit()
method.
submit
in interface Action
Action
public Action block()
block
in interface Action
Action
public Action block(int timeoutMilli)
Thread.wait(int)
, causes the action to wait
until either "timeoutMilli" milliseconds has elapsed, or an interrupt
is received.
block
in interface Action
timeoutMilli
- number of milliseconds to block
Action
public Action cancel()
Action
interface.
cancel
in interface Action
Action
public byte getActionState()
getActionState
in interface Action
Action
public boolean isDone()
Action.DONE
.
Returns true if the action is done.
isDone
in interface Action
Action
protected abstract boolean subsubmit()
submit()
.
Action performed during submit.
protected boolean subcancel()
cancel()
.
Action performed during cancel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |