コード例 #1
0
ファイル: Server.java プロジェクト: AlexisRuchaud/TrialADL
 public void sendRequest(Object o) {
   if (pass) {
     System.out.println("Passage par : " + this.getName() + ". Message : " + o.toString());
     this.pass = false;
     serviceServerOut.sendRequest(o);
   } else {
     System.out.println("Passage par: " + this.getName() + ". Message : " + o.toString());
     this.pass = true;
     portSendBinding.sendRequest(o);
   }
 }
コード例 #2
0
ファイル: Server.java プロジェクト: AlexisRuchaud/TrialADL
 public Server(String name) {
   super(name);
   portServerIn = new ServerReceiveRequestPort("portServerIn", this);
   portServerOut = new ServerSendRequestPort("portServerOut", this);
   portSendBinding = new ServerSendBinding("portSendBinding", this);
   serviceServerIn = new ServerReceiveRequestService("serviceServerIn", this);
   serviceServerOut = new ServerSendRequestService("serviceServerOut", this);
   portServerOut.addService(serviceServerOut);
   portServerIn.addService(serviceServerIn);
   serviceServerOut.addPort(portServerOut);
   serviceServerIn.addPort(portServerIn);
   this.pass = false;
   // TODO Auto-generated constructor stub
 }