Hi Sergey,

Just add your custom stage using builder.add() and then write the ports of the 
resulting Shape using the normal GraphDSL methods. There is no need to make the 
wiring aware of your special shape.

Regards, Roland 

Sent from my iPhone

> On 19 Sep 2016, at 22:35, Sergey Sopin <sopin1...@gmail.com> wrote:
> 
> Hi,
> 
> Due to performance reasons I decided to create my new custom Shape with 
> several inlets and several outlets (5 in and 3 out in my case). Then I 
> decided to create Graph with the new element and realized that it is not 
> possible without rewriting Graph object. In order to create my own shape I 
> had to create new class which extends Shape one. Then I created custom logic 
> by creating new class which extends GraphStage<MyNewShape<...>>. And 
> everything was good. 
> Then while creating graph I realized that my class contains more than one 
> input and one output, so neither UniformFanOutShape nor UniformFanInShape can 
> be used in graph. Due to that fact I created my own BiDirFanShape which 
> contains more than one inlet and one outlet. It allowed me to add my new 
> shape in a graph. But, then I realized that I am not able to connect my shape 
> with others because there are no functions "via" or "to" in a Builder which 
> take such arguments. So now, I have to rewrite object GraphDSL in order to 
> add there such functions. 
> It seems a bit painful. Probably I missed something, but I think that in case 
> you allow to create custom shapes you should have some generic mechanism that 
> allows to work with the newly created elements. I cannot even override 
> ForwardOps and ReverseOps classes because it are final... Could you please 
> let me know if I missed something and there is a better solution?
> 
> Thank you in advance!
> 
> Best regards,
> Sergey
> -- 
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to