Class SelectAction<Message>
- java.lang.Object
-
- co.paralleluniverse.strands.channels.SelectAction<Message>
-
public abstract class SelectAction<Message> extends java.lang.Object
A channel operation that is selected by aSelector
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
index()
boolean
isDone()
Tests whether this operation is the one operation that has been selected and completed by the selector.Message
message()
Returns the message to send if this is a send operation, or the message that has been received if this is a receive operation and has been successfully completed by the selector.Port<Message>
port()
Returns the channel for this operation.
-
-
-
Method Detail
-
message
public Message message()
Returns the message to send if this is a send operation, or the message that has been received if this is a receive operation and has been successfully completed by the selector.- Returns:
- the message to send if this is a send operation, or the message that has been received if this is a receive operation and has been successfully completed by the selector.
-
index
public int index()
-
port
public Port<Message> port()
Returns the channel for this operation.- Returns:
- the channel for this operation.
-
isDone
public boolean isDone()
Tests whether this operation is the one operation that has been selected and completed by the selector.- Returns:
true
if this operation is the one operation that has been selected and completed by the selector;false
otherwise.
-
-