|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplay.mvc.WebSocket<A>
public abstract class WebSocket<A>
A WebSocket result.
| Nested Class Summary | |
|---|---|
static class |
WebSocket.In<A>
A WebSocket in. |
static interface |
WebSocket.Out<A>
A WebSocket out. |
| Constructor Summary | |
|---|---|
WebSocket()
|
|
| Method Summary | ||
|---|---|---|
akka.actor.Props |
actorProps(akka.actor.ActorRef out)
The props to create the actor to handle this WebSocket. |
|
boolean |
isActor()
If this method returns true, then the WebSocket should be handled by an actor. |
|
abstract void |
onReady(WebSocket.In<A> in,
WebSocket.Out<A> out)
Called when the WebSocket is ready |
|
static
|
reject(Result result)
Rejects a WebSocket. |
|
Result |
rejectWith()
If this method returns a result, the WebSocket will be rejected with that result. |
|
static
|
whenReady(F.Callback2<WebSocket.In<A>,WebSocket.Out<A>> callback)
Creates a WebSocket. |
|
static
|
withActor(F.Function<akka.actor.ActorRef,akka.actor.Props> props)
Handles a WebSocket with an actor. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocket()
| Method Detail |
|---|
public abstract void onReady(WebSocket.In<A> in,
WebSocket.Out<A> out)
in - The Socket in.out - The Socket out.public Result rejectWith()
public boolean isActor()
public akka.actor.Props actorProps(akka.actor.ActorRef out)
out - The actor to send upstream messages to.
public static <A> WebSocket<A> whenReady(F.Callback2<WebSocket.In<A>,WebSocket.Out<A>> callback)
onReady method is
implemented using the specified Callback2<In<A>, Out<A>>
callback - the callback used to implement onReady
java.lang.NullPointerException - if the specified callback is nullpublic static <A> WebSocket<A> reject(Result result)
result - The result that will be returned.
public static <A> WebSocket<A> withActor(F.Function<akka.actor.ActorRef,akka.actor.Props> props)
props - The function used to create the props for the actor. The passed in argument is the upstream actor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||