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

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

Best Java code snippets using org.guvnor.ala.pipeline.events.PipelineEventListener (Showing top 20 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.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.services/kie-wb-common-services-backend

    times(1)).beforePipelineExecution(beforePipelineExecutionCaptor.capture());
assertEquals(pipe,
       beforePipelineExecutionCaptor.getValue().getPipeline());
    times(4)).beforeStageExecution(beforeStageExecutionCaptor.capture());
verify(pipelineEventListener,
    times(4)).afterStageExecution(afterStageExecutionCaptor.capture());
    times(1)).afterPipelineExecution(afterPipelineExecutionCaptor.capture());
assertEquals(pipe,
       afterPipelineExecutionCaptor.getValue().getPipeline());
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.kie.workbench/kie-wb-common-ala-spi

  private void propagateEvent(final AfterPipelineExecutionEvent afterPipelineExecutionEvent,
                final PipelineEventListener... eventListeners) {
    for (final PipelineEventListener eventListener : eventListeners) {
      eventListener.afterPipelineExecution(afterPipelineExecutionEvent);
    }
  }
}
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 AfterStageExecutionEvent afterStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.afterStageExecution(afterStageExecutionEvent);
  }
}
origin: org.guvnor/guvnor-ala-spi

private void propagateEvent(final OnErrorPipelineExecutionEvent onErrorPipelineExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.onPipelineError(onErrorPipelineExecutionEvent);
  }
}
origin: org.guvnor/guvnor-ala-spi

private void propagateEvent(final OnErrorStageExecutionEvent onErrorStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.onStageError(onErrorStageExecutionEvent);
  }
}
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 AfterPipelineExecutionEvent afterPipelineExecutionEvent,
                final PipelineEventListener... eventListeners) {
    for (final PipelineEventListener eventListener : eventListeners) {
      eventListener.afterPipelineExecution(afterPipelineExecutionEvent);
    }
  }
}
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.kie.workbench/kie-wb-common-ala-spi

private void propagateEvent(final AfterStageExecutionEvent afterStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.afterStageExecution(afterStageExecutionEvent);
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void propagateEvent(final OnErrorPipelineExecutionEvent onErrorPipelineExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.onPipelineError(onErrorPipelineExecutionEvent);
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void propagateEvent(final OnErrorStageExecutionEvent onErrorStageExecutionEvent,
              final PipelineEventListener... eventListeners) {
  for (final PipelineEventListener eventListener : eventListeners) {
    eventListener.onStageError(onErrorStageExecutionEvent);
  }
}
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.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 testAfterPipelineExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  AfterPipelineExecutionEvent event = new AfterPipelineExecutionEvent(TASK_ID,
                                    pipeline);
  taskManager.localListener.afterPipelineExecution(event);
  verify(task,
      times(1)).setPipelineStatus(PipelineExecutorTask.Status.FINISHED);
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(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.guvnor/guvnor-ala-spi

private void testAfterStageExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  AfterStageExecutionEvent event = new AfterStageExecutionEvent(TASK_ID,
                                 pipeline,
                                 stage);
  taskManager.localListener.afterStageExecution(event);
  verify(task,
      times(1)).setStageStatus(stage.getName(),
                  PipelineExecutorTask.Status.FINISHED);
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(event);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void testOnPipelineErrorExecutionEvent(boolean async) {
  when(taskEntry.isAsync()).thenReturn(async);
  OnErrorPipelineExecutionEvent event = new OnErrorPipelineExecutionEvent(TASK_ID,
                                      pipeline,
                                      stage,
                                      error);
  taskManager.localListener.onPipelineError(event);
  verify(task,
      times(1)).setPipelineStatus(PipelineExecutorTask.Status.ERROR);
  verify(task,
      times(1)).setPipelineError(pipelineExecutorErrorCaptor.capture());
  assertEquals(new PipelineExecutorError(ERROR_MESSAGE,
                      error),
         pipelineExecutorErrorCaptor.getValue());
  verifyExecutorRegistryUpdated(async);
  verifyExternalListenersNotified(event);
}
org.guvnor.ala.pipeline.eventsPipelineEventListener

Most used methods

  • afterPipelineExecution
  • afterStageExecution
  • beforePipelineExecution
  • beforeStageExecution
  • onPipelineError
  • onStageError

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
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