API reference for 0.6.x is missing
It seems there are breaking changes from 0.5.x to 0.6.x
For instance, there is no method withActor.
@Override public SockJS sockjs() { SockJS.withActor(MySockJSActor::props); }
It would be nice to have a documentation.
Thanks,
Okay... As simple as that :
@Singleton
public final class AuthorizationSockJSRouter extends SockJSRouter {
private final ActorSystem system;
private final Materializer materializer;
@Inject
AuthorizationSockJSRouter(ActorSystem system, Materializer materializer) {
this.system = system;
this.materializer = materializer;
}
@Override
public SockJS sockjs() {
return SockJS.Text.accept(request ->
ActorFlow.actorRef(MyActor::props, system, materializer));
}
}
Hi, sorry for the delay.
I removed all API that were deprecated in 0.5. SockJS.withActor was returning
a SockJS implementation based on callback, both have been replaced by an API that expose directly the streaming interface.
I'll update the documentation for the 0.6 release as soon as it will be stable. Do not expect any big change besides those regarding on how to inject the Materializer, DefaultActionBuilder and PlayBodyParsers into the SockJSRouter to integrate better the new Play 2.6 architecture.
Thanks for your answer!
Actually, you are using the same way than Play 2.6 : HandlingWebSockets with actors
Yes, one goal of this project is to have a set of api that mirror the one provided by Play. In this way it is straightforward to switch from Play WebSocket to play2-sockjs (or viceversa).
Thanks.
You can close the issue or let it open until you add the documentation :)