org.jboss.resteasy.core
Class SynchronousDispatcher

java.lang.Object
  extended by 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

Field Summary
protected  DispatcherUtilities dispatcherUtilities
           
protected  java.util.Map<java.lang.String,java.lang.String> languageMappings
           
protected  java.util.Map<java.lang.String,MediaType> mediaTypeMappings
           
protected  ResteasyProviderFactory providerFactory
           
protected  Registry registry
           
 
Constructor Summary
SynchronousDispatcher(ResteasyProviderFactory providerFactory)
           
 
Method Summary
 void asynchronousDelivery(HttpRequest request, HttpResponse response, Response jaxrsResponse)
           
 DispatcherUtilities getDispatcherUtilities()
           
 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()
           
 void handleApplicationException(HttpResponse response, ApplicationException e)
           
 void handleException(HttpRequest request, HttpResponse response, java.lang.Exception e)
           
 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
 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.
 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 setDispatcherUtilities(DispatcherUtilities dispatcherUtilities)
           
 void setLanguageMappings(java.util.Map<java.lang.String,java.lang.String> languageMappings)
           
 void setMediaTypeMappings(java.util.Map<java.lang.String,MediaType> mediaTypeMappings)
           
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
 

Field Detail

providerFactory

protected ResteasyProviderFactory providerFactory

registry

protected Registry registry

mediaTypeMappings

protected java.util.Map<java.lang.String,MediaType> mediaTypeMappings

languageMappings

protected java.util.Map<java.lang.String,java.lang.String> languageMappings

dispatcherUtilities

protected DispatcherUtilities dispatcherUtilities
Constructor Detail

SynchronousDispatcher

public SynchronousDispatcher(ResteasyProviderFactory providerFactory)
Method Detail

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

public void handleFailure(HttpRequest request,
                          HttpResponse response,
                          java.lang.Exception e)

handleApplicationException

public void handleApplicationException(HttpResponse response,
                                       ApplicationException e)

handleWebApplicationException

public void handleWebApplicationException(HttpResponse response,
                                          WebApplicationException wae)

invoke

public void invoke(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

getDispatcherUtilities

public DispatcherUtilities getDispatcherUtilities()

setDispatcherUtilities

public void setDispatcherUtilities(DispatcherUtilities dispatcherUtilities)


Copyright © 2009. All Rights Reserved.