1 23 24 import org.objectweb.fractal.api.control.BindingController; 25 26 public class ClientImpl implements Runnable , BindingController { 27 28 private Service service; 29 30 public ClientImpl () { 31 System.err.println("CLIENT created"); 32 } 33 34 public void run () { 35 service.print("hello world"); 36 } 37 38 public String [] listFc () { 39 return new String [] { "s" }; 40 } 41 42 public Object lookupFc (final String cItf) { 43 if (cItf.equals("s")) { 44 return service; 45 } 46 return null; 47 } 48 49 public void bindFc (final String cItf, final Object sItf) { 50 if (cItf.equals("s")) { 51 service = (Service)sItf; 52 } 53 } 54 55 public void unbindFc (final String cItf) { 56 if (cItf.equals("s")) { 57 service = null; 58 } 59 } 60 } 61 | Popular Tags |