Пример #1
0
 /**
  * Disconnect, not a method one would normally see in an implementation of.
  *
  * @throws Exception the exception {@link StampyMessageListener}
  */
 public void disconnect() throws Exception {
   synchronized (waiter) {
     waiter.wait();
   }
   gateway.broadcastMessage(new DisconnectMessage());
   end = System.nanoTime();
 }
Пример #2
0
  private void sendAck(int i) throws InterceptException {
    String id = Integer.toString(i);
    AckMessage ack = new AckMessage(id);
    ack.getHeader().setReceipt(id);
    ack.getHeader().setTransaction(id);

    gateway.broadcastMessage(ack);
  }