Interface Service

    • Method Detail

      • connect

        void connect()
        Instruct this Service to connect.

        This method is async and will return immediately. Use the other methods available to inspect the current state of the service, signaling potential successful connection attempts.

      • disconnect

        void disconnect()
        Instruct this Service to disconnect.

        This method is async and will return immediately. Use the other methods available to inspect the current state of the service, signaling potential successful disconnection attempts.

      • send

        <R extends Request<? extends Response>> void send​(R request)
        Sends the request into this Service.

        Note that there is no guarantee that the request will actually dispatched, based on the state this service is in.

        Parameters:
        request - the request to send.
      • context

        ServiceContext context()
        Returns the underlying contextual metadata for this service.
      • type

        ServiceType type()
        Represents the service type for this service.