exactly, I want to pass my BidiFlow as Flow to some component that knows 
how to connect it. so it doesn't really matter if the flow is simple 
mapping/codec or some composite structure - which is exactly what you are 
describing and I am just passing something more sophisticated.

I just cannot find a simple way (apart from my prev comment - where I 
simply close BidiFlow from one end and I get a flow as result) to expose 
BidiFlow's ends as Flow which would make life more simple.

On Friday, 18 September 2015 12:09:39 UTC+2, drewhk wrote:
>
> Hi Pawel,
>
> The alternative is that it is not the BidiFlow that is provided to the 
> part which has the Flow, but the Flow is provided to the part that has the 
> BidiFlow. That way the part that has the Flow does not need to know how it 
> will be connected in a potentially larger thing.
>
> -Endre
>
> On Fri, Sep 18, 2015 at 12:00 PM, paweł kamiński <[email protected] 
> <javascript:>> wrote:
>
>> I guess the answer can be found on the same page I referred.
>>
>>
>>    1. final Flow<Message, Message, BoxedUnit> flow = stack.atop(stack.
>>    reversed()).join(pingpong);
>>
>> I need to close BidiFlow from one end to get Flow of the other end
>>
>> On Wednesday, 16 September 2015 23:09:46 UTC+2, paweł kamiński wrote:
>>>
>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
>>>>>>>>>>      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.

Reply via email to