org.jboss.resteasy.core
Class SynchronousDispatcher
java.lang.Object
org.jboss.resteasy.core.SynchronousDispatcher
- All Implemented Interfaces:
- Dispatcher
- Direct Known Subclasses:
- AsynchronousDispatcher
public class SynchronousDispatcher
- extends java.lang.Object
- implements Dispatcher
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
Method Summary |
void |
asynchronousDelivery(HttpRequest request,
HttpResponse response,
Response jaxrsResponse)
|
void |
clearContextData()
|
boolean |
executeExceptionMapper(HttpResponse response,
java.lang.Throwable exception)
Execute an ExceptionMapper if one exists for the given exception |
ResourceInvoker |
getInvoker(HttpRequest request,
HttpResponse response)
|
java.util.Map<java.lang.String,java.lang.String> |
getLanguageMappings()
|
java.util.Map<java.lang.String,MediaType> |
getMediaTypeMappings()
|
ResteasyProviderFactory |
getProviderFactory()
|
Registry |
getRegistry()
|
protected Response |
getResponse(HttpRequest request,
HttpResponse response,
ResourceInvoker invoker)
|
protected void |
handleApplicationException(HttpResponse response,
ApplicationException e)
|
void |
handleException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
|
protected void |
handleFailure(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
|
void |
handleInvokerException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
Called if method invoke was unsuccessful |
protected void |
handleWebApplicationException(HttpResponse response,
WebApplicationException wae)
|
void |
handleWriteResponseException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
Called if method invoke was successful, but writing the Response after was not. |
Response |
internalInvocation(HttpRequest request,
HttpResponse response,
java.lang.Object entity)
|
void |
invoke(HttpRequest request,
HttpResponse response)
|
void |
invoke(HttpRequest request,
HttpResponse response,
ResourceInvoker invoker)
|
protected void |
preprocess(HttpRequest in)
|
protected void |
preprocessExtensions(HttpRequest in)
|
void |
pushContextObjects(HttpRequest request,
HttpResponse response)
|
void |
setLanguageMappings(java.util.Map<java.lang.String,java.lang.String> languageMappings)
|
void |
setMediaTypeMappings(java.util.Map<java.lang.String,MediaType> mediaTypeMappings)
|
protected void |
writeFailure(HttpResponse response,
Response jaxrsResponse)
|
protected void |
writeJaxrsResponse(HttpResponse response,
Response jaxrsResponse)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
providerFactory
protected ResteasyProviderFactory providerFactory
registry
protected Registry registry
requestPreprocessors
protected java.util.List<HttpRequestPreprocessor> requestPreprocessors
extentionHttpPreprocessor
protected ExtensionHttpPreprocessor extentionHttpPreprocessor
SynchronousDispatcher
public SynchronousDispatcher(ResteasyProviderFactory providerFactory)
getProviderFactory
public ResteasyProviderFactory getProviderFactory()
- Specified by:
getProviderFactory
in interface Dispatcher
getRegistry
public Registry getRegistry()
- Specified by:
getRegistry
in interface Dispatcher
setMediaTypeMappings
public void setMediaTypeMappings(java.util.Map<java.lang.String,MediaType> mediaTypeMappings)
- Specified by:
setMediaTypeMappings
in interface Dispatcher
setLanguageMappings
public void setLanguageMappings(java.util.Map<java.lang.String,java.lang.String> languageMappings)
- Specified by:
setLanguageMappings
in interface Dispatcher
getMediaTypeMappings
public java.util.Map<java.lang.String,MediaType> getMediaTypeMappings()
- Specified by:
getMediaTypeMappings
in interface Dispatcher
getLanguageMappings
public java.util.Map<java.lang.String,java.lang.String> getLanguageMappings()
- Specified by:
getLanguageMappings
in interface Dispatcher
preprocess
protected void preprocess(HttpRequest in)
preprocessExtensions
protected void preprocessExtensions(HttpRequest in)
invoke
public void invoke(HttpRequest request,
HttpResponse response)
- Specified by:
invoke
in interface Dispatcher
getInvoker
public ResourceInvoker getInvoker(HttpRequest request,
HttpResponse response)
throws Failure
- Throws:
Failure
handleInvokerException
public void handleInvokerException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
- Called if method invoke was unsuccessful
- Parameters:
request
- response
- e
-
handleWriteResponseException
public void handleWriteResponseException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
- Called if method invoke was successful, but writing the Response after was not.
- Parameters:
request
- response
- e
-
handleException
public void handleException(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
handleFailure
protected void handleFailure(HttpRequest request,
HttpResponse response,
java.lang.Exception e)
executeExceptionMapper
public boolean executeExceptionMapper(HttpResponse response,
java.lang.Throwable exception)
- Execute an ExceptionMapper if one exists for the given exception
- Parameters:
response
- exception
-
- Returns:
- true if an ExceptionMapper was found and executed
handleApplicationException
protected void handleApplicationException(HttpResponse response,
ApplicationException e)
writeFailure
protected void writeFailure(HttpResponse response,
Response jaxrsResponse)
handleWebApplicationException
protected void handleWebApplicationException(HttpResponse response,
WebApplicationException wae)
pushContextObjects
public void pushContextObjects(HttpRequest request,
HttpResponse response)
internalInvocation
public Response internalInvocation(HttpRequest request,
HttpResponse response,
java.lang.Object entity)
- Specified by:
internalInvocation
in interface Dispatcher
clearContextData
public void clearContextData()
invoke
public void invoke(HttpRequest request,
HttpResponse response,
ResourceInvoker invoker)
getResponse
protected Response getResponse(HttpRequest request,
HttpResponse response,
ResourceInvoker invoker)
asynchronousDelivery
public void asynchronousDelivery(HttpRequest request,
HttpResponse response,
Response jaxrsResponse)
writeJaxrsResponse
protected void writeJaxrsResponse(HttpResponse response,
Response jaxrsResponse)
throws java.io.IOException,
WebApplicationException
- Throws:
java.io.IOException
WebApplicationException
Copyright © 2009. All Rights Reserved.