org.glassfish.jersey.process.internal
Interface InvocationContext

All Superinterfaces:
ExecutionContext

public interface InvocationContext
extends ExecutionContext

Injectable invocation context that can be used to control various aspects of the invocation, e.g. the threading model.

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

Nested Class Summary
static class InvocationContext.State
          Invocation context state.
 
Method Summary
 java.util.concurrent.Future<Response> getInflectedResponse()
          Return the response future that provides a response returned by an inflector.
 InvocationContext.State state()
          Get the current state of the invocation context.
 boolean trySuspend()
          Try to suspend the request invocation.
 
Methods inherited from interface javax.ws.rs.core.ExecutionContext
cancel, getResponse, isCancelled, isDone, isSuspended, resume, resume, setResponse, setSuspendTimeout, suspend, suspend, suspend
 

Method Detail

state

InvocationContext.State state()
Get the current state of the invocation context.

Returns:
current state of the invocation context

trySuspend

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

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

getInflectedResponse

java.util.concurrent.Future<Response> getInflectedResponse()
Return the response future that provides a response returned by an inflector. This method is used by the ResponseProcessor to retrieve the application-layer response information before the response processing is executed.

Returns:
inflected response future.


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