Пример #1
0
 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
 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
 }