public abstract class ChannelRunnable
extends java.lang.Object
implements java.lang.Runnable
send()
.IChannel
,
ThreadChannel
,
ChannelSwitchException
Modifier and Type | Field and Description |
---|---|
protected boolean |
complete |
protected java.lang.Object |
returnValue |
protected java.lang.Throwable |
throwable |
Constructor and Description |
---|
ChannelRunnable() |
ChannelRunnable(long timeout) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getReturnValue()
Gets the return value from
send() . |
boolean |
isComplete()
Did the channel operation complete?
|
boolean |
isRevoked() |
boolean |
isStarted()
has the runnable actually started to execute on the destination channel.
|
boolean |
isStopJob() |
void |
run()
Called by the underlying
IChannel implementation to run
the ChannelRunnable object. |
abstract java.lang.Object |
send()
Implementors override this method with code that
must be run on this channel.
|
void |
setComplete(boolean done)
Set the completion status of the channel operation.
|
void |
setCrossChannel() |
void |
setStopJob(java.lang.Boolean stopJob) |
ChannelRunnable |
setTimeout(int milliseconds)
Set the time when this message will expire.
|
void |
throwException()
Throws any pending throwable that occurs while executing
on the channel.
|
protected java.lang.Object returnValue
protected boolean complete
protected java.lang.Throwable throwable
public ChannelRunnable()
public ChannelRunnable(long timeout)
public abstract java.lang.Object send()
getReturnValue()
.public boolean isStopJob()
public void setStopJob(java.lang.Boolean stopJob)
public void setCrossChannel()
public ChannelRunnable setTimeout(int milliseconds)
public boolean isRevoked()
public void run()
IChannel
implementation to run
the ChannelRunnable
object. Invokes send()
and saves
the return value.run
in interface java.lang.Runnable
public void throwException()
send()
implementation has code that
must run on the original thread, this method catches the ChannelSwitchException
and invokes run()
.public java.lang.Object getReturnValue()
send()
. This return value
is marshalled back to the originating thread that invoked the channel
request.public boolean isComplete()
public void setComplete(boolean done)
done
- - true if send completed, false otherwise.public boolean isStarted()