ATermAppl appl = (ATermAppl)term; EventQueue queue = (EventQueue)queueMap.get(appl.getName()); if (queue == null) { queue = new EventQueue(); queueMap.put(appl.getName(), queue); } if (queue.ackWaiting()) { queue.addEvent(appl); } else { try { sendTerm(factory.make("snd-event(<term>)", appl)); } catch (IOException e) { throw new RuntimeException("cannot post event: " + appl);
synchronized (getLockObject()) { ATermAppl appl = (ATermAppl)term; EventQueue queue = (EventQueue)queueMap.get(appl.getName()); if (queue == null) { queue = new EventQueue(); queueMap.put(appl.getName(), queue);
  public void postEvent(ATerm term)  {    ATermAppl appl = (ATermAppl)term;    EventQueue queue = (EventQueue)queueMap.get(appl.getName());    if (queue == null) {      queue = new EventQueue();      queueMap.put(appl.getName(), queue);    }    if (queue.ackWaiting()) {      queue.addEvent(appl);    }    else {      try {	sendTerm(factory.make("snd-event(<term>)", appl));      } catch (IOException e) {	throw new RuntimeException("cannot post event: " + appl);      }      queue.setAckWaiting();    }  }