void registerArquillianConfig(ArquillianConfig arqConfig) {
   synchronized (deployedTests) {
     log.debugf("Register Arquillian config: %s", arqConfig.getServiceName());
     deployedTests.add(arqConfig);
     deployedTests.notifyAll();
   }
 }
Beispiel #2
0
 public void xxPostSignal() throws Exception {
   log.info(tid() + " XX_POST_SIGNAL (" + id + ")");
   synchronized (signals) {
     signals.add(id);
     signals.notifyAll();
   }
 }
Beispiel #3
0
 @Deactivate
 public void deactivate() {
   synchronized (connectionHold) {
     connectionHold.notify();
   }
   connectionHold = null;
   writer = null;
   synchronized (receivedConfirmations) {
     receivedConfirmations.notifyAll();
   }
 }
 private void lockOnReportDir(File reportDir) {
   synchronized (files) {
     while (files.contains(reportDir))
       try {
         files.wait();
       } catch (InterruptedException ex) {
         logger.log(SEVERE, Thread.currentThread().getName() + " INTERRUPTED", ex);
       }
     files.add(reportDir);
     files.notifyAll(); // must own the lock
   }
 }
Beispiel #5
0
  public void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
      throws ServletException, IOException {
    if (!authenticate(request, response)) {
      return;
    }

    final String msgId = StringUtils.removeStart(request.getRequestPathInfo().getSuffix(), "/");
    if (StringUtils.isBlank(msgId)) {
      throw new ServletException("No suffix found");
    }
    if (!sentMessages.contains(msgId)) {
      throw new ServletException("No one is waiting for confirmation for " + msgId);
    } else {
      receivedConfirmations.add(msgId);
      synchronized (receivedConfirmations) {
        receivedConfirmations.notifyAll();
      }
      response.getWriter().append("Message " + msgId + " confirmed");
      LOG.debug("Message " + msgId + " confirmed");
    }
  }
 private void unlockOnReportDir(File reportDir) {
   synchronized (files) {
     files.remove(reportDir);
     files.notifyAll();
   }
 }