/** * Constructs a new WebSocketChannel, using the callback to handle any * incoming messages. * * @param callback a protocallback to be called when data arrives on this * channel */ public WebSocketChannel(ProtoCallback callback) { this.callback = callback; this.sessionContext = Timing.isEnabled() ? Timing.getScopeValue(SessionContext.class) : null; // The ProtoSerializer could really be singleton. // TODO: Figure out a way to inject a singleton instance using Guice this.serializer = new ProtoSerializer(); }