Ejemplo n.º 1
0
  @Override
  public void answer(final Map<String, String> headers) throws SignalException {

    if (!_accepted) {
      accept(headers);
    }

    final Joint joint = this.join();
    while (!joint.isDone()) {
      try {
        joint.get();
      } catch (final InterruptedException e) {
        // ignore
      } catch (final ExecutionException e) {
        Throwable cause = e.getCause();
        if (cause instanceof SignalException) {
          throw (SignalException) cause;
        }
        throw new SignalException(cause);
      }
    }

    return;
  }
Ejemplo n.º 2
0
 @Override
 public void accept(Observer... observer) throws SignalException {
   addObserver(observer);
   accept();
 }
Ejemplo n.º 3
0
 @Override
 public void accept() throws SignalException {
   accept((Map<String, String>) null);
 }