Expose more reflection hints (#3951)
* Expose more reflection hints * Bring back `@Reflective` on `Pausable` - for possible end-user usage * Add `ReactiveMessageHandler` hint since its method is used reflectively in the `IntegrationRSocketMessageHandler` * Add `@Reflective` on the `ServerRSocketMessageHandler.handleConnectionSetup()` since it is used reflectively for a `registerHandlerMethod()` * Add `KafkaRuntimeHints` to expose `Pausable` contract on Kafka inbound endpoints for SpEL invocation via Control Bus * Document native images support * Fix language in docs Co-authored-by: Gary Russell <grussell@vmware.com> Co-authored-by: Gary Russell <grussell@vmware.com>
This commit is contained in:
@@ -63,6 +63,7 @@ import org.springframework.integration.support.MutableMessageHeaders;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.PollableChannel;
|
||||
import org.springframework.messaging.ReactiveMessageHandler;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
@@ -83,6 +84,7 @@ class CoreRuntimeHints implements RuntimeHintsRegistrar {
|
||||
GenericSelector.class,
|
||||
GenericTransformer.class,
|
||||
GenericHandler.class,
|
||||
ReactiveMessageHandler.class,
|
||||
Function.class,
|
||||
Supplier.class,
|
||||
BeanExpressionContext.class,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.integration.core;
|
||||
|
||||
import org.springframework.aot.hint.annotation.Reflective;
|
||||
import org.springframework.integration.support.management.ManageableLifecycle;
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.jmx.export.annotation.ManagedOperation;
|
||||
@@ -37,12 +38,14 @@ public interface Pausable extends ManageableLifecycle {
|
||||
* Pause the endpoint.
|
||||
*/
|
||||
@ManagedOperation(description = "Pause the component")
|
||||
@Reflective
|
||||
void pause();
|
||||
|
||||
/**
|
||||
* Resume the endpoint if paused.
|
||||
*/
|
||||
@ManagedOperation(description = "Resume the component")
|
||||
@Reflective
|
||||
void resume();
|
||||
|
||||
/**
|
||||
@@ -51,6 +54,7 @@ public interface Pausable extends ManageableLifecycle {
|
||||
* @since 5.4
|
||||
*/
|
||||
@ManagedAttribute(description = "Is the component paused?")
|
||||
@Reflective
|
||||
default boolean isPaused() {
|
||||
throw new UnsupportedOperationException("This component does not implement this method");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user