Tabnine Logo
PipelineEventListener.beforePipelineExecution
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.kie.workbench/kie-wb-common-ala-spi

private void propagateEvent(final BeforePipelineExecutionEvent beforePipelineExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.beforePipelineExecution(beforePipelineExecutionEvent);
  }
}
origin: org.guvnor/guvnor-ala-spi

private void propagateEvent(final BeforePipelineExecutionEvent beforePipelineExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.beforePipelineExecution(beforePipelineExecutionEvent);
  }
}
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.guvnor/guvnor-ala-spi

private void testBeforePipelineExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  BeforePipelineExecutionEvent event = new BeforePipelineExecutionEvent(TASK_ID,
                                     pipeline);
  taskManager.localListener.beforePipelineExecution(event);
  verify(task,
      times(1)).setPipelineStatus(PipelineExecutorTask.Status.RUNNING);
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(event);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

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

    times(1)).beforePipelineExecution(beforePipelineExecutionCaptor.capture());
assertEquals(pipe,
       beforePipelineExecutionCaptor.getValue().getPipeline());
org.guvnor.ala.pipeline.eventsPipelineEventListenerbeforePipelineExecution

Popular methods of PipelineEventListener

  • afterPipelineExecution
  • afterStageExecution
  • beforeStageExecution
  • onPipelineError
  • onStageError

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JOptionPane (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now