Codota Logo
PipelineEventListener.beforeStageExecution
Code IndexAdd Codota to your IDE (free)

How to use
beforeStageExecution
method
in
org.guvnor.ala.pipeline.events.PipelineEventListener

Best Java code snippets using org.guvnor.ala.pipeline.events.PipelineEventListener.beforeStageExecution (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void propagateEvent(final BeforeStageExecutionEvent beforeStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.beforeStageExecution(beforeStageExecutionEvent);
  }
}
origin: org.guvnor/guvnor-ala-spi

private void propagateEvent(final BeforeStageExecutionEvent beforeStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.beforeStageExecution(beforeStageExecutionEvent);
  }
}
origin: org.guvnor/guvnor-ala-spi

public void notifyExternalListeners(final List<PipelineEventListener> externalListeners,
                  final PipelineEvent event) {
  externalListeners.forEach(listener -> {
    try {
      if (event instanceof BeforePipelineExecutionEvent) {
        listener.beforePipelineExecution((BeforePipelineExecutionEvent) event);
      } else if (event instanceof BeforeStageExecutionEvent) {
        listener.beforeStageExecution((BeforeStageExecutionEvent) event);
      } else if (event instanceof AfterStageExecutionEvent) {
        listener.afterStageExecution((AfterStageExecutionEvent) event);
      } else if (event instanceof AfterPipelineExecutionEvent) {
        listener.afterPipelineExecution((AfterPipelineExecutionEvent) event);
      } else if (event instanceof OnErrorPipelineExecutionEvent) {
        listener.onPipelineError((OnErrorPipelineExecutionEvent) event);
      } else if (event instanceof OnErrorStageExecutionEvent) {
        listener.onStageError((OnErrorStageExecutionEvent) event);
      }
    } catch (Exception e) {
      //if the notification of the event in a particular listener fails let the execution continue.
      logger.error("Pipeline event notification on listener: " + listener + " failed: " + e.getMessage(),
             e);
    }
  });
}
origin: org.kie.workbench/kie-wb-common-ala-spi

public void notifyExternalListeners(final List<PipelineEventListener> externalListeners,
                  final PipelineEvent event) {
  externalListeners.forEach(listener -> {
    try {
      if (event instanceof BeforePipelineExecutionEvent) {
        listener.beforePipelineExecution((BeforePipelineExecutionEvent) event);
      } else if (event instanceof BeforeStageExecutionEvent) {
        listener.beforeStageExecution((BeforeStageExecutionEvent) event);
      } else if (event instanceof AfterStageExecutionEvent) {
        listener.afterStageExecution((AfterStageExecutionEvent) event);
      } else if (event instanceof AfterPipelineExecutionEvent) {
        listener.afterPipelineExecution((AfterPipelineExecutionEvent) event);
      } else if (event instanceof OnErrorPipelineExecutionEvent) {
        listener.onPipelineError((OnErrorPipelineExecutionEvent) event);
      } else if (event instanceof OnErrorStageExecutionEvent) {
        listener.onStageError((OnErrorStageExecutionEvent) event);
      }
    } catch (Exception e) {
      //if the notification of the event in a particular listener fails let the execution continue.
      logger.error("Pipeline event notification on listener: " + listener + " failed: " + e.getMessage(),
             e);
    }
  });
}
origin: org.guvnor/guvnor-ala-spi

private void verifyExternalListenersNotified(PipelineEvent event) {
  if (event instanceof BeforePipelineExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).beforePipelineExecution((BeforePipelineExecutionEvent) event));
  } else if (event instanceof BeforeStageExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).beforeStageExecution((BeforeStageExecutionEvent) event));
  } else if (event instanceof AfterStageExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).afterStageExecution((AfterStageExecutionEvent) event));
  } else if (event instanceof AfterPipelineExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).afterPipelineExecution((AfterPipelineExecutionEvent) event));
  } else if (event instanceof OnErrorPipelineExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).onPipelineError((OnErrorPipelineExecutionEvent) event));
  } else if (event instanceof OnErrorStageExecutionEvent) {
    externalListeners.forEach(listener -> verify(listener,
                           times(1)).onStageError((OnErrorStageExecutionEvent) event));
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

  private void verifyExternalListenersNotified(PipelineEvent event) {
    if (event instanceof BeforePipelineExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).beforePipelineExecution((BeforePipelineExecutionEvent) event));
    } else if (event instanceof BeforeStageExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).beforeStageExecution((BeforeStageExecutionEvent) event));
    } else if (event instanceof AfterStageExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).afterStageExecution((AfterStageExecutionEvent) event));
    } else if (event instanceof AfterPipelineExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).afterPipelineExecution((AfterPipelineExecutionEvent) event));
    } else if (event instanceof OnErrorPipelineExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).onPipelineError((OnErrorPipelineExecutionEvent) event));
    } else if (event instanceof OnErrorStageExecutionEvent) {
      externalListeners.forEach(listener -> verify(listener,
                             times(1)).onStageError((OnErrorStageExecutionEvent) event));
    }
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void testBeforeStageExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  BeforeStageExecutionEvent event = new BeforeStageExecutionEvent(TASK_ID,
                                  pipeline,
                                  stage);
  taskManager.localListener.beforeStageExecution(event);
  verify(task,
      times(1)).setStageStatus(stage.getName(),
                  PipelineExecutorTask.Status.RUNNING);
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(event);
}
origin: org.guvnor/guvnor-ala-spi

private void testBeforeStageExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  BeforeStageExecutionEvent event = new BeforeStageExecutionEvent(TASK_ID,
                                  pipeline,
                                  stage);
  taskManager.localListener.beforeStageExecution(event);
  verify(task,
      times(1)).setStageStatus(stage.getName(),
                  PipelineExecutorTask.Status.RUNNING);
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(event);
}
origin: org.kie.workbench.services/kie-wb-common-services-backend

    times(4)).beforeStageExecution(beforeStageExecutionCaptor.capture());
verify(pipelineEventListener,
    times(4)).afterStageExecution(afterStageExecutionCaptor.capture());
org.guvnor.ala.pipeline.eventsPipelineEventListenerbeforeStageExecution

Popular methods of PipelineEventListener

  • afterPipelineExecution
  • afterStageExecution
  • beforePipelineExecution
  • onPipelineError
  • onStageError

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JPanel (javax.swing)
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now