org.glassfish.jersey.process.internal
Interface ProcessingContext

All Superinterfaces:
ExecutionContext
All Known Implementing Classes:
AsyncInflectorAdapter

public interface ProcessingContext
extends ExecutionContext

Injectable processing context that can be used to control various aspects of a single request processing, e.g. the threading model.

Author:
Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class ProcessingContext.State
          Processing context state.
 
Method Summary
 ProcessingContext.State state()
          Get the current state of the processing context.
 boolean trySuspend()
          Try to suspend the current request processing.
 
Methods inherited from interface deprecated.javax.ws.rs.ExecutionContext
cancel, getResponse, isCancelled, isDone, isSuspended, resume, resume, setResponse, setSuspendTimeout, suspend, suspend, suspend
 

Method Detail

state

ProcessingContext.State state()
Get the current state of the processing context.

Returns:
current state of the processing context.

trySuspend

boolean trySuspend()
Try to suspend the current request processing. Unlike the suspend() method, this method does not throw an exception in case the suspend operation fails. Instead, the method returns true if the request processing has been suspended successfully, returns false otherwise.

Returns:
true if the request processing has been suspended successfully, returns false otherwise.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.