Apache Tuscany > Home > SCA Overview > SCA Java > SCA Java Work-In-Progress > Java Implementation User List | Dev List | Issue Tracker  

Here is a really simple SCA component implemented in Java:

public interface 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
  • there are no properties or intents to deal with
website stats