javax.enterprise.context

Interface Conversation


  • public interface Conversation

    Allows the application to manage the conversation context by marking the current conversation as transient or long-running, specifying a conversation identifier, or setting the conversation timeout.

    An instance may be injected:

     @Inject
     Conversation conversation;
     

    The conversation timeout is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds.

    Author:
    Pete Muir, Gavin King
    See Also:
    @ConversationScoped
    • Method Detail

      • begin

        void begin()

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

        Throws:
        IllegalStateException - if the current conversation is already marked long-running.
      • begin

        void begin(String id)

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

        Throws:
        IllegalStateException - if the current conversation is already marked long-running.
        IllegalArgumentException - if a conversation with the specified identifier already exists.
      • end

        void end()

        Marks the current long-running conversation transient.

        Throws:
        IllegalStateException - if the current conversation is already marked transient.
      • getId

        String getId()

        Get the identifier of the current long-running conversation.

        Returns:
        the identifier of the current long-running conversation, or a null value if the current conversation is transient.
      • getTimeout

        long getTimeout()

        Get the timeout of the current conversation.

        Returns:
        the current timeout in milliseconds.
      • setTimeout

        void setTimeout(long milliseconds)

        Set the timeout of the current conversation.

        Parameters:
        milliseconds - the new timeout in milliseconds.
      • isTransient

        boolean isTransient()

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

        Returns:
        true if the conversation is marked transient, or falseif it is marked long-running.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

07/10/2025 06:15:33 Cette version de la page est en cache (à la date du 07/10/2025 06:15:33) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/enterprise/context/conversation.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com/en/java/, Interface Conversation

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.