Interface DNSStatefulObject

    • Method Detail

      • getDns

        JmDNSImpl getDns()
        Returns the DNS associated with this object.
        Returns:
        DNS resolver
      • associateWithTask

        void associateWithTask​(DNSTask task,
                               DNSState state)
        Sets the task associated with this Object.
        Parameters:
        task - associated task
        state - state of the task
      • removeAssociationWithTask

        void removeAssociationWithTask​(DNSTask task)
        Remove the association of the task with this Object.
        Parameters:
        task - associated task
      • isAssociatedWithTask

        boolean isAssociatedWithTask​(DNSTask task,
                                     DNSState state)
        Checks if this object is associated with the task and in the same state.
        Parameters:
        task - associated task
        state - state of the task
        Returns:
        true is the task is associated with this object, false otherwise.
      • advanceState

        boolean advanceState​(DNSTask task)
        Sets the state and notifies all objects that wait on the ServiceInfo.
        Parameters:
        task - associated task
        Returns:
        truefalse otherwise.
        See Also:
        DNSState.advance()
      • revertState

        boolean revertState()
        Sets the state and notifies all objects that wait on the ServiceInfo.
        Returns:
        truefalse otherwise.
        See Also:
        DNSState.revert()
      • cancelState

        boolean cancelState()
        Sets the state and notifies all objects that wait on the ServiceInfo.
        Returns:
        truefalse otherwise.
      • closeState

        boolean closeState()
        Sets the state and notifies all objects that wait on the ServiceInfo.
        Returns:
        truefalse otherwise.
      • recoverState

        boolean recoverState()
        Sets the state and notifies all objects that wait on the ServiceInfo.
        Returns:
        truefalse otherwise.
      • isProbing

        boolean isProbing()
        Returns true, if this is a probing state.
        Returns:
        true if probing state, false otherwise
      • isAnnouncing

        boolean isAnnouncing()
        Returns true, if this is an announcing state.
        Returns:
        true if announcing state, false otherwise
      • isAnnounced

        boolean isAnnounced()
        Returns true, if this is an announced state.
        Returns:
        true if announced state, false otherwise
      • isCanceling

        boolean isCanceling()
        Returns true, if this is a canceling state.
        Returns:
        true if canceling state, false otherwise
      • isCanceled

        boolean isCanceled()
        Returns true, if this is a canceled state.
        Returns:
        true if canceled state, false otherwise
      • isClosing

        boolean isClosing()
        Returns true, if this is a closing state.
        Returns:
        true if closing state, false otherwise
      • isClosed

        boolean isClosed()
        Returns true, if this is a closed state.
        Returns:
        true if closed state, false otherwise
      • waitForAnnounced

        boolean waitForAnnounced​(long timeout)
        Waits for the object to be announced.
        Parameters:
        timeout - the maximum time to wait in milliseconds.
        Returns:
        true if the object is announced, false otherwise
      • waitForCanceled

        boolean waitForCanceled​(long timeout)
        Waits for the object to be canceled.
        Parameters:
        timeout - the maximum time to wait in milliseconds.
        Returns:
        true if the object is canceled, false otherwise