|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.serial.WithSerialId groovyx.gpars.actor.impl.MessageStream
public abstract class MessageStream
Represents a stream of messages and forms the base class for actors
Nested Class Summary | |
---|---|
static class |
MessageStream.RemoteMessageStream
|
private static class |
MessageStream.ResultWaiter<V>
Represents a pending request for a reply from an actor. |
static class |
MessageStream.SendTo
|
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Fields inherited from class groovyx.gpars.serial.WithSerialId |
---|
serialHandle |
Constructor Summary | |
---|---|
MessageStream()
|
Method Summary | ||
---|---|---|
|
call(T message)
Same as send |
|
java.lang.Class<MessageStream.RemoteMessageStream> |
getRemoteClass()
Class of remote object to be created |
|
|
leftShift(T message)
Same as send |
|
(package private) static void |
reInterrupt()
|
|
MessageStream |
send()
Convenience method for send(new Object()). |
|
abstract MessageStream |
send(java.lang.Object message)
Send message to stream and return immediately |
|
|
send(T message,
MessageStream replyTo)
Send message to stream and return immediately. |
|
|
sendAndWait(T message)
Sends a message and waits for a reply. |
|
|
sendAndWait(T message,
groovy.time.Duration duration)
Sends a message and waits for a reply. |
|
|
sendAndWait(T message,
long timeout,
java.util.concurrent.TimeUnit units)
Sends a message and waits for a reply. |
Methods inherited from class groovyx.gpars.serial.WithSerialId |
---|
createRemoteHandle, getOrCreateSerialHandle, writeReplace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public MessageStream()
Method Detail |
---|
public abstract MessageStream send(java.lang.Object message)
message
- message to send
public final MessageStream send()
public final <T> MessageStream send(T message, MessageStream replyTo)
T
- type of message accepted by the streammessage
- message to sendreplyTo
- where to send reply
public final <T> MessageStream leftShift(T message)
message
- to send
public final <T> MessageStream call(T message)
message
- to send
public final <T,V> V sendAndWait(T message) throws java.lang.InterruptedException
message
- message to send
java.lang.InterruptedException
- if interrupted while waitingpublic final <T> java.lang.Object sendAndWait(T message, long timeout, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException
message
- message to sendtimeout
- timeoutunits
- units
java.lang.InterruptedException
- if interrupted while waitingpublic final <T> java.lang.Object sendAndWait(T message, groovy.time.Duration duration) throws java.lang.InterruptedException
message
- message to sendduration
- timeout
java.lang.InterruptedException
- if interrupted while waitingpublic java.lang.Class<MessageStream.RemoteMessageStream> getRemoteClass()
WithSerialId
getRemoteClass
in class WithSerialId
static void reInterrupt() throws java.lang.InterruptedException
java.lang.InterruptedException
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |