/** * Populate the {@code Control Bus} EI Pattern specific {@link MessageHandler} implementation * at the current {@link IntegrationFlow} chain position. * @param endpointConfigurer the {@link Consumer} to accept integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see ExpressionCommandMessageProcessor * @see GenericEndpointSpec */ public B controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) { return handle(new ServiceActivatingHandler(new ExpressionCommandMessageProcessor( new ControlBusMethodFilter())), endpointConfigurer); }
public List<Method> filter(List<Method> methods) { List<Method> supportedMethods = new ArrayList<Method>(); for (Method method : methods) { if (this.accept(method)) { supportedMethods.add(method); } } return supportedMethods; }
private boolean accept(Method method) { Class<?> declaringClass = method.getDeclaringClass(); if (Lifecycle.class.isAssignableFrom(declaringClass) && ReflectionUtils.findMethod(Lifecycle.class, method.getName(), method.getParameterTypes()) != null) { return true; } if (CustomizableThreadCreator.class.isAssignableFrom(declaringClass) && (method.getName().startsWith("get") || method.getName().startsWith("set") || method.getName().startsWith("shutdown"))) { return true; } if (this.hasAnnotation(method, ManagedAttribute.class) || this.hasAnnotation(method, ManagedOperation.class)) { return true; } return false; }
/** * Populate the {@code Control Bus} EI Pattern specific {@link MessageHandler} implementation * at the current {@link IntegrationFlow} chain position. * @param endpointConfigurer the {@link Consumer} to accept integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see ExpressionCommandMessageProcessor * @see GenericEndpointSpec */ public B controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) { return this.handle(new ServiceActivatingHandler(new ExpressionCommandMessageProcessor( new ControlBusMethodFilter())), endpointConfigurer); }
public List<Method> filter(List<Method> methods) { List<Method> supportedMethods = new ArrayList<Method>(); for (Method method : methods) { if (this.accept(method)) { supportedMethods.add(method); } } return supportedMethods; }
private boolean accept(Method method) { Class<?> declaringClass = method.getDeclaringClass(); if (Lifecycle.class.isAssignableFrom(declaringClass) && ReflectionUtils.findMethod(Lifecycle.class, method.getName(), method.getParameterTypes()) != null) { return true; } if (CustomizableThreadCreator.class.isAssignableFrom(declaringClass) && (method.getName().startsWith("get") || method.getName().startsWith("set") || method.getName().startsWith("shutdown"))) { return true; } if (this.hasAnnotation(method, ManagedAttribute.class) || this.hasAnnotation(method, ManagedOperation.class)) { return true; } return false; }
/** * Populate the {@code Control Bus} EI Pattern specific {@link MessageHandler} implementation * at the current {@link IntegrationFlow} chain position. * @param endpointConfigurer the {@link Consumer} to accept integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see ExpressionCommandMessageProcessor * @see GenericEndpointSpec */ public B controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) { return handle(new ServiceActivatingHandler(new ExpressionCommandMessageProcessor( new ControlBusMethodFilter())), endpointConfigurer); }
/** * Populate the {@code Control Bus} EI Pattern specific {@link MessageHandler} implementation * at the current {@link IntegrationFlow} chain position. * @param endpointConfigurer the {@link Consumer} to accept integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see ExpressionCommandMessageProcessor * @see GenericEndpointSpec */ public B controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) { return this.handle(new ServiceActivatingHandler(new ExpressionCommandMessageProcessor( new ControlBusMethodFilter())), endpointConfigurer); }