Пример #1
0
 @Override
 public void removeExecutionListener(
     final GraphProcess process,
     final ExecutionListener listener,
     final ExecutionEventType... eventTypes) {
   process.getEventQueue().removeListener(this, listener, eventTypes);
 }
Пример #2
0
  @Override
  public void removeExecutionListener(
      GraphProcess process, ExecutionListener listener, ExecutionEventType... eventTypes) {
    process.getEventQueue().removeListener(this, listener, eventTypes);

    List<ExecutionEventType> types = eventTypes == null ? null : Arrays.asList(eventTypes);

    for (HibProcessListener hibListener : ((HibGraphProcess) process).getListeners()) {
      if (process.equals(hibListener.getProcess())
          && (eventTypes == null
              || eventTypes.length == 0
              || types.contains(hibListener.getEventType()))) {
        session.delete(hibListener);
      }
    }
  }
Пример #3
0
  @Override
  public void addExecutionListener(
      GraphProcess process, ExecutionListener listener, ExecutionEventType... eventTypes) {
    if (eventTypes == null || listener == null) {
      return;
    }

    for (ExecutionEventType eventType : eventTypes) {
      if (eventType != null) {
        HibProcessListener hibListener =
            new HibProcessListener(listener.getClass().getName(), eventType, process);
        session.save(hibListener);
      }
    }

    process.getEventQueue().addListener(this, listener, eventTypes);
    listenerCache.ensureContainsListenerType(listener);
  }