So, rightly or wrongly, I did this, which seems to work:
val flow = builder.add(wsl.mapMaterializedValue(f => {
f map {
u => if (u.response.status == StatusCodes.SwitchingProtocols) {
log.info("Switched protocols")
}
else
throw new IllegalStateException("Did not switch")
}
})
The key bit is the mapMaterializedValue inside the builder.add.
Whether this is how one is *intended* to do it is another matter, but so
far the result has proven satisfactory.
On Wednesday, October 19, 2016 at 1:08:37 AM UTC-4, Evgeny Shepelyuk wrote:
>
> Hi, could you please spare final code ?
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.