Class RefreshEndpoint


  • @Endpoint("refresh")
    public class RefreshEndpoint
    extends java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] refresh​(java.lang.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 Detail

      • 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 Detail

      • refresh

        @Write
        public java.lang.String[] refresh​(@Nullable
                                          java.lang.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