javax.enterprise.inject.spi.ProcessObserverMethod Java Examples
The following examples show how to use
javax.enterprise.inject.spi.ProcessObserverMethod.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SecurityExtension.java From component-runtime with Apache License 2.0 | 5 votes |
void findOnConnectionMethod(@Observes final ProcessObserverMethod<OnConnection, ?> processObserverMethod) { if (ProcessSyntheticObserverMethod.class.isInstance(processObserverMethod)) { return; } onConnectionObservers.put(getName(processObserverMethod), processObserverMethod.getObserverMethod()); processObserverMethod.veto(); }
Example #2
Source File: SecurityExtension.java From component-runtime with Apache License 2.0 | 5 votes |
void findOnCommandMethod(@Observes final ProcessObserverMethod<OnCommand, ?> processObserverMethod) { if (ProcessSyntheticObserverMethod.class.isInstance(processObserverMethod)) { return; } onCommandObservers.put(getName(processObserverMethod), processObserverMethod.getObserverMethod()); processObserverMethod.veto(); }
Example #3
Source File: VertxExtension.java From weld-vertx with Apache License 2.0 | 5 votes |
public void processVertxEventObserver(@Observes ProcessObserverMethod<VertxEvent, ?> event) { String vertxAddress = getVertxAddress(event.getObserverMethod()); if (vertxAddress == null) { LOGGER.warn("VertxEvent observer found but no @VertxConsumer declared: {0}", event.getObserverMethod()); return; } LOGGER.debug("Vertx message consumer found: {0}", event.getObserverMethod()); consumerAddresses.add(vertxAddress); }
Example #4
Source File: SecurityExtension.java From component-runtime with Apache License 2.0 | 4 votes |
private String getName(final ProcessObserverMethod<?, ?> processObserverMethod) { return ofNullable(processObserverMethod.getAnnotatedMethod().getDeclaringType().getAnnotation(Named.class)) .map(Named::value) .orElseGet(() -> processObserverMethod.getAnnotatedMethod().getJavaMember().getName()); }
Example #5
Source File: SpyExtension.java From openwebbeans-meecrowave with Apache License 2.0 | 4 votes |
void onBeforeObserver(@Observes final ProcessObserverMethod<BeforeRequest, ?> processObserverMethod) { hasBeforeEvent = true; }
Example #6
Source File: SpyExtension.java From openwebbeans-meecrowave with Apache License 2.0 | 4 votes |
void onAfterObserver(@Observes final ProcessObserverMethod<AfterResponse, ?> processObserverMethod) { hasAfterEvent = true; }
Example #7
Source File: SpyExtension.java From openwebbeans-meecrowave with Apache License 2.0 | 4 votes |
void onRequestObserver(@Observes final ProcessObserverMethod<OnRequest, ?> processObserverMethod) { hasOnRequestEvent = true; }
Example #8
Source File: SpyExtension.java From openwebbeans-meecrowave with Apache License 2.0 | 4 votes |
void onResponseObserver(@Observes final ProcessObserverMethod<OnResponse, ?> processObserverMethod) { hasOnResponseEvent = true; }