@Component public class ComponentA { @Reference private ComponentB componentB; // ... } @Component public class ComponentB { // ... } <topology> <component id="componentA" class="com.example.ComponentA"> <dependency ref="componentB" /> </component> <component id="componentB" class="com.example.ComponentB" /> </topology> properties # communication model promiscuous.comm.model = point-to-point # communication port promiscuous.comm.port = 8080 public class Application { public static void main(String[] args) { // Initialize Amdatu Promiscuous framework Promiscuous promiscuous = new Promiscuous("topology.xml"); promiscuous.start(); // ... } }


上一篇:
下一篇:
切换中文