Class ConversationImpl

    • Method Detail

      • begin

        public void begin()
        Description copied from interface: Conversation

        Mark the current transient conversation long-running. A conversation identifier is generated by the container.

        Specified by:
        begin in interface Conversation
      • begin

        public void begin​(String id)
        Description copied from interface: Conversation

        Mark the current transient conversation long-running, with a specified identifier.

        Specified by:
        begin in interface Conversation
        Parameters:
        id - conversation id
      • end

        public void end()
        Description copied from interface: Conversation

        Marks the current long-running conversation transient.

        Specified by:
        end in interface Conversation
      • getId

        public String getId()
        Description copied from interface: Conversation

        Get the identifier of the current long-running conversation.

        Specified by:
        getId in interface Conversation
        Returns:
        the identifier of the current long-running conversation, or a null value if the current conversation is transient.
      • getTimeout

        public long getTimeout()
        Description copied from interface: Conversation

        Get the timeout of the current conversation.

        Specified by:
        getTimeout in interface Conversation
        Returns:
        the current timeout in milliseconds.
      • setTimeout

        public void setTimeout​(long timeout)
        Description copied from interface: Conversation

        Set the timeout of the current conversation.

        Specified by:
        setTimeout in interface Conversation
        Parameters:
        timeout - the new timeout in milliseconds.
      • isTransient

        public boolean isTransient()
        Description copied from interface: Conversation

        Determine if the conversation is marked transient or long-running.

        Specified by:
        isTransient in interface Conversation
        Returns:
        true if the conversation is marked transient, or falseif it is marked long-running.
      • getLastUsed

        public long getLastUsed()
        Description copied from interface: ManagedConversation
        Gets the last time the conversation was used (for data access)
        Specified by:
        getLastUsed in interface ManagedConversation
        Returns:
        time (in ms) since the conversation was last used
      • lock

        public boolean lock​(long timeout)
        Description copied from interface: ManagedConversation
        Attempts to lock the conversation for exclusive usage
        Specified by:
        lock in interface ManagedConversation
        Parameters:
        timeout - The time in milliseconds to wait on the lock
        Returns:
        True if lock was successful, false otherwise
      • unlock

        public boolean unlock()
        Description copied from interface: ManagedConversation
        Attempts to unlock the conversation
        Specified by:
        unlock in interface ManagedConversation
        Returns:
        true if the unlock was successful, false otherwise
      • isContextActive

        public boolean isContextActive()