Class AbstractDynamicService

    • Method Detail

      • diagnostics

        public rx.Observable<EndpointHealth> diagnostics()
        Description copied from interface: Service
        Returns endpoint health information for all endpoints this service is currently associated with.
        Specified by:
        diagnostics in interface Service
      • createEndpoint

        protected Endpoint createEndpoint()
        Helper method to create a new endpoint.
        the endpoint to create.
      • logIdent

        protected static String logIdent​(String hostname,
                                         Service service)
        Simple log helper to give logs a common prefix.
        hostname - the address.
        service - the service.
        a prefix string for logs.
      • endpoints

        protected List<Endpoint> endpoints()
        Returns the current list of endpoints.
        the list of endpoints.
      • endpointStates

        protected EndpointStateZipper endpointStates()
        Returns the underlying endpoint state zipper.
        the underlying state zipper.
      • whenState

        protected static void whenState​(Endpoint endpoint,
                                        LifecycleState wanted,
                                        rx.functions.Action1<LifecycleState> then)
        Waits until the endpoint goes into the given state, calls the action and then unsubscribes.
        endpoint - the endpoint to monitor.
        wanted - the wanted state.
        then - the action to execute when the state is reached.