Interface ComponentAware

All Known Subinterfaces:
ApiEndpoint, AsyncEndpoint, BrowsableEndpoint, DelegateEndpoint, Endpoint, InterceptSendToEndpoint

public interface ComponentAware
Implemented by objects, such as Endpoint, that are associated with and can expose their parent Component.
See Also:
  • Method Details

    • setComponent

      void setComponent(Component component)
      Injects the Component
      Parameters:
      component - the component
    • getComponent

      @Nullable Component getComponent()
      Get the Component
      Returns:
      the component
    • getComponent

      default <T extends Component> @Nullable T getComponent(Class<T> type)
      Get the Component as the specified type.
      Parameters:
      type - the proprietary class or interface of the underlying concrete Component.
      Returns:
      an instance of the underlying concrete Component as the required type.
      Throws:
      IllegalArgumentException - if the component class can't be cast to required type,