Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.context;
 

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

Author(s):
Pete Muir
See also:
ConversationContext
public interface ManagedConversation extends Conversation {

    
Attempts to unlock the conversation

Returns:
true if the unlock was successful, false otherwise
Throws:
javax.enterprise.context.ContextNotActiveException if the conversation context is not active
    boolean unlock();

    
Attempts to lock the conversation for exclusive usage

Parameters:
timeout The time in milliseconds to wait on the lock
Returns:
True if lock was successful, false otherwise
Throws:
javax.enterprise.context.ContextNotActiveException if the conversation context is not active
    boolean lock(long timeout);

    
Gets the last time the conversation was used (for data access)

Returns:
time (in ms) since the conversation was last used
Throws:
javax.enterprise.context.ContextNotActiveException if the conversation context is not active
    long getLastUsed();

    
Touches the managed conversation, updating the "last used" timestamp

Throws:
javax.enterprise.context.ContextNotActiveException if the conversation context is not active
    void touch();
New to GrepCode? Check out our FAQ X