More on Attach !

Ahoy !

We recently were excited to add Java 8 default methods to interfaces for our services ... 
Sadly, this borked Jython :(

But my last checkin should have fixed all that.  There are now no more "default" methods in any Java org.myrobotlab.service interface.

In the process I tried to do some refactoring.  I created a new interface ... "Attachable" !  And moved interfaces which were common to ALL services to org.myrobotlab.framework.interfaces

Welcome "Attachable" ! - its a fun interface which does the "right thing" when attaching and detaching services from one another.  

A Service (through ServiceInterface) "is" an Attachable.  So all services now can potentially attach, detach, getAttached, and check to see isAttached.

The purpose of this is to make it clear and easy for the "user" of the Service ...  Typical Jython usabe would be :

serviceB.setPin(x)
serviceA.attach(serviceB)

serviceA will determine what types of services wants to attach to, and does the necessary things.

This is what I call the "routing attach" because its job is to route the request to attach to the necessary methods, to provide the necessary parameters.

You can see it  here overriden and implemented with the Ssc32UsbServoController implementation.