Class RefreshEndpoint

java.lang.Object
io.micronaut.management.endpoint.refresh.RefreshEndpoint

@Endpoint("refresh") public class RefreshEndpoint extends Object

Exposes an Endpoint to refresh application state via a RefreshEvent.

Since:
1.0
See Also:
  • RefreshScope
  • RefreshEvent
  • Refreshable
  • Constructor Summary

    Constructors
    Constructor
    Description
    RefreshEndpoint(io.micronaut.context.env.Environment environment, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.runtime.context.scope.refresh.RefreshEvent> eventPublisher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    refresh(@Nullable Boolean force)
    Refresh application state only if environment has changed (unless force is set to true).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RefreshEndpoint

      public RefreshEndpoint(io.micronaut.context.env.Environment environment, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.runtime.context.scope.refresh.RefreshEvent> eventPublisher)
      Parameters:
      environment - The Environment
      eventPublisher - The Application event publisher
  • Method Details

    • refresh

      @Write public String[] refresh(@Nullable @Nullable Boolean force)
      Refresh application state only if environment has changed (unless force is set to true).
      Parameters:
      force - Nullable body property to indicate whether to force all Refreshable beans to be refreshed
      Returns:
      array of change keys if applicable