@Override public void veto() { checkWithinObserverNotification(); vetoed = true; }
public static <T, X> ObserverMethod<T> fire(BeanManagerImpl beanManager, AnnotatedMethod<X> beanMethod, ObserverMethod<T> observerMethod) { return fire(new ProcessObserverMethodImpl<>(beanManager, beanMethod, observerMethod)); }
@Override public void setObserverMethod(ObserverMethod<T> observerMethod) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); checkWithinObserverNotification(); replaceObserverMethod(observerMethod); observerMethodSet = true; }
@Override public ObserverMethodConfigurator<T> configureObserverMethod() { if (observerMethodSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new ObserverMethodConfiguratorImpl<>(observerMethod, getReceiver()); } BootstrapLogger.LOG.configureObserverMethodCalled(getReceiver(), observerMethod); return configurator; }
protected static <T, X> ObserverMethod<T> fire(ProcessObserverMethodImpl<T, X> event) { event.fire(); if (event.vetoed) { return null; } return event.observerMethod; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceObserverMethod(configurator.complete()); configurator = null; } observerMethodSet = false; }
private void replaceObserverMethod(ObserverMethod<T> observerMethod) { validateObserverMethod(observerMethod, getBeanManager(), initialObserverMethod); this.observerMethod = observerMethod; }
@Override public void setObserverMethod(ObserverMethod<T> observerMethod) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); checkWithinObserverNotification(); replaceObserverMethod(observerMethod); observerMethodSet = true; }
@Override public ObserverMethodConfigurator<T> configureObserverMethod() { if (observerMethodSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new ObserverMethodConfiguratorImpl<>(observerMethod, getReceiver()); } BootstrapLogger.LOG.configureObserverMethodCalled(getReceiver(), observerMethod); return configurator; }
protected static <T, X> ObserverMethod<T> fire(ProcessObserverMethodImpl<T, X> event) { event.fire(); if (event.vetoed) { return null; } return event.observerMethod; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceObserverMethod(configurator.complete()); configurator = null; } observerMethodSet = false; }
private void replaceObserverMethod(ObserverMethod<T> observerMethod) { validateObserverMethod(observerMethod, getBeanManager(), initialObserverMethod); this.observerMethod = observerMethod; }
@Override public void setObserverMethod(ObserverMethod<T> observerMethod) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); checkWithinObserverNotification(); replaceObserverMethod(observerMethod); observerMethodSet = true; }
@Override public void veto() { checkWithinObserverNotification(); vetoed = true; }
@Override public ObserverMethodConfigurator<T> configureObserverMethod() { if (observerMethodSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new ObserverMethodConfiguratorImpl<>(observerMethod, getReceiver()); } BootstrapLogger.LOG.configureObserverMethodCalled(getReceiver(), observerMethod); return configurator; }
public static <T, X> ObserverMethod<T> fire(BeanManagerImpl beanManager, AnnotatedMethod<X> beanMethod, ObserverMethod<T> observerMethod) { return fire(new ProcessObserverMethodImpl<>(beanManager, beanMethod, observerMethod)); }
protected static <T, X> ObserverMethod<T> fire(ProcessObserverMethodImpl<T, X> event) { event.fire(); if (event.vetoed) { return null; } return event.observerMethod; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceObserverMethod(configurator.complete()); configurator = null; } observerMethodSet = false; }
private void replaceObserverMethod(ObserverMethod<T> observerMethod) { validateObserverMethod(observerMethod, getBeanManager(), initialObserverMethod); this.observerMethod = observerMethod; }
@Override public void setObserverMethod(ObserverMethod<T> observerMethod) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessObserverMethod.class.getSimpleName(), getReceiver()); } Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); checkWithinObserverNotification(); replaceObserverMethod(observerMethod); observerMethodSet = true; }