All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.weld.context.ManagedConversation Maven / Gradle / Ivy

There is a newer version: 3.0.0.Alpha1
Show newest version
package org.jboss.weld.context;

import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.Conversation;

/**
 * 

* Provides management operations for conversations, including locking, and expiration management. *

* * @author Pete Muir * @see ConversationContext * */ public interface ManagedConversation extends Conversation { /** * Attempts to unlock the conversation * * @throws ContextNotActiveException if the conversation context is not active * @return true if the unlock was successful, false otherwise */ boolean unlock(); /** * Attempts to lock the conversation for exclusive usage * * @param timeout The time in milliseconds to wait on the lock * @return True if lock was successful, false otherwise * @throws ContextNotActiveException if the conversation context is not active */ boolean lock(long timeout); /** * Gets the last time the conversation was used (for data access) * * @return time (in ms) since the conversation was last used * @throws ContextNotActiveException if the conversation context is not active */ long getLastUsed(); /** * Touches the managed conversation, updating the "last used" timestamp * * @throws ContextNotActiveException if the conversation context is not active */ void touch(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy