Package org.jboss.resteasy.core
Class AsynchronousDispatcher
java.lang.Object
org.jboss.resteasy.core.SynchronousDispatcher
org.jboss.resteasy.core.AsynchronousDispatcher
- All Implemented Interfaces:
 Dispatcher
- Version:
 - $Revision: 1 $
 - Author:
 - Bill Burke
 
- 
Field Summary
Fields inherited from class org.jboss.resteasy.core.SynchronousDispatcher
bufferExceptionEntity, bufferExceptionEntityRead, defaultContextObjects, providerFactory, registry, requestPreprocessors, unwrappedExceptions - 
Constructor Summary
ConstructorsConstructorDescriptionAsynchronousDispatcher(ResteasyProviderFactory providerFactory) AsynchronousDispatcher(ResteasyProviderFactory providerFactory, ResourceMethodRegistry registry)  - 
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Responsevoidinvoke(HttpRequest in, HttpResponse response, ResourceInvoker invoker) Invoke and write response.voidinvokeSuper(HttpRequest in, HttpResponse response, ResourceInvoker invoker) booleanvoidoneway(HttpRequest request, HttpResponse response, ResourceInvoker invoker) voidpostJob(HttpRequest request, HttpResponse response, ResourceInvoker invoker) protected jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsereadAndRemove(long wait, String jobId) voidvoidsetBasePath(String basePath) Set the base path to find jobs.voidsetExecutor(ExecutorService executor) Plug in your own executor to process requests.voidsetMaxCacheSize(int maxCacheSize) Max response cache size default is 100.voidsetMaxWaitMilliSeconds(long maxWaitMilliSeconds) Maximum wait time.voidsetThreadPoolSize(int threadPoolSize) Fixed thread pool size of asynchronous delivery.voidstart()voidstop()Methods inherited from class org.jboss.resteasy.core.SynchronousDispatcher
addHttpPreprocessor, asynchronousDelivery, asynchronousDelivery, asynchronousExceptionDelivery, asynchronousExceptionDelivery, clearContextData, execute, getDefaultContextObjects, getInvoker, getProviderFactory, getRegistry, getUnwrappedExceptions, internalInvocation, invoke, invokePropagateNotFound, preprocess, preprocess, pushContextObjects, rethrow, unhandledAsynchronousException, writeException, writeException, writeResponse 
- 
Constructor Details
- 
AsynchronousDispatcher
 - 
AsynchronousDispatcher
public AsynchronousDispatcher(ResteasyProviderFactory providerFactory, ResourceMethodRegistry registry)  
 - 
 - 
Method Details
- 
setMaxCacheSize
public void setMaxCacheSize(int maxCacheSize) Max response cache size default is 100.- Parameters:
 maxCacheSize- max cache size
 - 
setMaxWaitMilliSeconds
public void setMaxWaitMilliSeconds(long maxWaitMilliSeconds) Maximum wait time. This overrides any wait query parameter.- Parameters:
 maxWaitMilliSeconds- max wait time in millis
 - 
setBasePath
Set the base path to find jobs.- Parameters:
 basePath- base path
 - 
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize) Fixed thread pool size of asynchronous delivery.- Parameters:
 threadPoolSize- thread pool size
 - 
setExecutor
Plug in your own executor to process requests.- Parameters:
 executor- executor service
 - 
start
public void start() - 
stop
public void stop() - 
remove
 - 
readAndRemove
@Path("{job-id}") @POST public jakarta.ws.rs.core.Response readAndRemove(@QueryParam("wait") @DefaultValue("-1") long wait, @PathParam("job-id") String jobId)  - 
get
@Path("{job-id}") @GET public jakarta.ws.rs.core.Response get(@QueryParam("wait") @DefaultValue("-1") long wait, @PathParam("job-id") String jobId)  - 
process
 - 
isAsynchrnousRequest
 - 
invokeSuper
 - 
invoke
Description copied from class:SynchronousDispatcherInvoke and write response.- Overrides:
 invokein classSynchronousDispatcher- Parameters:
 in- http requestresponse- http responseinvoker- resource invoker
 - 
postJob
 - 
oneway
 
 -