1 8 package examples.connectivity; 9 10 import org.codehaus.aspectwerkz.connectivity.RemoteProxy; 11 12 15 public class Client { 16 17 public static void main(String [] args) { 18 run(); 19 } 20 21 29 private static void run() { 30 RemoteProxy proxy1 = RemoteProxy.createClientProxy( 34 new String []{ 35 "examples.connectivity.Test1" 36 }, "examples.connectivity.Test1Impl", "localhost", 6663 37 ); 38 Test1 mixin1 = (Test1) proxy1.getInstance(); 40 41 RemoteProxy proxy2 = mixin1.getTest1(); 44 Test2 mixin2 = (Test2) proxy2.getInstance(); 46 47 System.out.println("Mixin1 says: " + mixin1.test1()); 50 System.out.println("Mixin2 says: " + mixin2.test2()); 51 52 proxy1.close(); 55 proxy2.close(); 56 } 57 } | Popular Tags |