|
org.codehaus.gpars | |||||||
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 extends WithSerialId
Represents a stream of messages and forms the base class for actors
Nested Class Summary | |
---|---|
static class |
MessageStream.RemoteMessageStream
|
private static class |
MessageStream.ResultWaiter
Represents a pending request for a reply from an actor. |
static class |
MessageStream.SendTo
|
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Fields inherited from class WithSerialId | |
---|---|
serialHandle, serialVersionUID |
Constructor Summary | |
MessageStream()
|
Method Summary | |
---|---|
MessageStream
|
call(T message)
Same as send |
java.lang.Class
|
getRemoteClass()
|
MessageStream
|
leftShift(T message)
Same as send |
static void
|
reInterrupt()
|
MessageStream
|
send(java.lang.Object message)
Send message to stream and return immediately |
MessageStream
|
send()
Convenience method for send(new Object()). |
MessageStream
|
send(T message, MessageStream replyTo)
Send message to stream and return immediately. |
V
|
sendAndWait(T message)
Sends a message and waits for a reply. |
java.lang.Object
|
sendAndWait(T message, long timeout, java.util.concurrent.TimeUnit units)
Sends a message and waits for a reply. |
java.lang.Object
|
sendAndWait(T message, groovy.time.Duration duration)
Sends a message and waits for a reply. |
Methods inherited from class WithSerialId | |
---|---|
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
MessageStream()
Method Detail |
---|
public final MessageStream call(T message)
message
- to send
@Override @SuppressWarnings("unchecked") public java.lang.Class getRemoteClass()
public final MessageStream leftShift(T message)
message
- to send
static void reInterrupt()
public MessageStream send(java.lang.Object message)
message
- message to send
public final MessageStream send()
public final MessageStream send(T message, MessageStream replyTo)
message
- message to sendreplyTo
- where to send reply
- type of message accepted by the stream
public final V sendAndWait(T message)
message
- message to send
public final java.lang.Object sendAndWait(T message, long timeout, java.util.concurrent.TimeUnit units)
message
- message to sendtimeout
- timeoutunits
- units
public final java.lang.Object sendAndWait(T message, groovy.time.Duration duration)
message
- message to sendduration
- timeout
Copyright © 2008–2010 Václav Pech. All Rights Reserved.