hi,
I
folowed
http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java/stream-graphs.html#Bidirectional_Flows
and its section describing BidiFlow but my brain has just fried when I
tried to figure out how to expose left side of such BidiFlow as Flow.
in other words how to hide the fact that we are connecting to BidiFlow.
lets stick with example from the page above
1. BidiFlow<Message, ByteString, ByteString, Message, BoxedUnit>
codecVerbose = BidiFlow.factory().create(b -> {
2. final FlowShape<Message, ByteString> top = b.graph(Flow.<Message>
empty().map(BidiFlowDocTest::toBytes));
3. final FlowShape<ByteString, Message> bottom = b.graph(Flow.<ByteString
> empty().map(BidiFlowDocTest::fromBytes));
4. return new BidiShape<>(top, bottom);
5. });
6. +------+
7. Message ~>| |~> ByteString
8. | bidi |
9. Message <~| |<~ ByteString
10. +------+
And I would like to expose to the world a flow like
1. Flow<Message, Message, BoxedUnit> codecVerboseAsFlow = Flow.factory().
create(b -> {
2. b.graph(...);
3. return new Pair<>(??.inlet(), ??.out());
4. });
again thanks for help
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.