Ejemplo n.º 1
0
 @Override
 public void receive(AbstractPacket abstractPacket, String senderIdentifier) {
   if (abstractPacket instanceof PingPacket) {
     received = true;
     testBridgeObserver.serverReceived(abstractPacket, senderIdentifier);
     try {
       PongPacket pongPacket = new PongPacket();
       serviceProxyBase.sendPacket(pongPacket, senderIdentifier);
       sendCallbackCnt++;
       sent = true;
       testBridgeObserver.serverSent(pongPacket, senderIdentifier);
     } catch (Exception e) {
     }
   }
 }
Ejemplo n.º 2
0
 /**
  * Initialize test service on given port.
  *
  * @param port
  * @throws BridgeException
  */
 public void initialize(int port) throws BridgeException {
   serviceProxyBase.initialize(port, this);
 }