Here is a really simple SCA component implemented in Java:
publicinterface Orange {
// methods
}
public class AppleImpl implements Apple {
private Orange orange;
public AppleImpl(Orange orange) {
this.orange = orange;
}
// other methods
}
Yes, this is the same as the simplest possible Pico component and it really is a fully functional SCA implementation. Tuscany uses the following conventions to figure out how to run this when you include it in an SCA assembly:
the class implements a single interface "Apple", so there is one service defined by that interface
there is a single constructor with a value that is not a simple type, we treat that as a reference to the "Orange" service