Bug in akka.http.javadsl.server.directives.WebSocketDirectives?

21 views
Skip to first unread message

Qux

unread,
May 19, 2016, 9:12:54 AM5/19/16
to Akka User List
Hi,
 

I want to use the WebSocketDirectives in Java.

Is it intended that  handleWebSocketMessages needs an handler of typ Flow[Message, Message, T],
but handleWebSocketMessagesForProtocol an hander of typ Flow[Message, Message, Any]?

Because of that I can not use handleWebSocketMessagesForProtocol, because of an CompilerError: 

Error:(49, 71) java: incompatible types: akka.stream.javadsl.Flow<akka.http.javadsl.model.ws.Message,akka.http.javadsl.model.ws.Message,akka.NotUsed> cannot be converted to 
                                         akka.stream.javadsl.Flow<akka.http.javadsl.model.ws.Message,akka.http.javadsl.model.ws.Message,java.lang.Object>


Thanks for your help!

Akka Team

unread,
May 30, 2016, 9:13:23 AM5/30/16
to Akka User List
This seems to be an oversight in the API, please file a ticket (and if possible a PR) about it. The materialized type should be Any (Object seen from the Java side) as it is not really passed on anywhere or consumed by anything.

-- 
Johan

Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam
Reply all
Reply to author
Forward
0 new messages