public class TechnicalAsyncService extends Object
init(...)
method on the processor)register(...)
methodprepareFor()
method at the AsyncProcessorprocessAsync()
methods
TechnicalAsyncService asyncService = TechnicalAsyncService.getInstance();
TechnicalEntityProcessor processor = new TechnicalEntityProcessor(dataProvider, serviceMetadata);
processor.init(odata, serviceMetadata);
AsyncProcessor asyncProcessor = asyncService.register(processor, EntityProcessor.class);
asyncProcessor.prepareFor().readEntity(request, response, uriInfo, requestedFormat);
String location = asyncProcessor.processAsync();
Modifier and Type | Field and Description |
---|---|
static String |
STATUS_MONITOR_TOKEN |
static String |
TEC_ASYNC_SLEEP |
Constructor and Description |
---|
TechnicalAsyncService() |
Modifier and Type | Method and Description |
---|---|
static void |
acceptedResponse(ODataResponse response,
String location) |
static TechnicalAsyncService |
getInstance() |
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
boolean |
isStatusMonitorResource(javax.servlet.http.HttpServletRequest request) |
void |
listQueue(javax.servlet.http.HttpServletResponse response) |
<T extends Processor> |
register(T processor,
Class<T> processorInterface) |
void |
shutdownThreadPool() |
static void |
updateHeader(ODataResponse response,
HttpStatusCode status,
String location) |
public static final String TEC_ASYNC_SLEEP
public static final String STATUS_MONITOR_TOKEN
public <T extends Processor> AsyncProcessor<T> register(T processor, Class<T> processorInterface)
public static void updateHeader(ODataResponse response, HttpStatusCode status, String location)
public static void acceptedResponse(ODataResponse response, String location)
public static TechnicalAsyncService getInstance()
public void shutdownThreadPool()
public boolean isStatusMonitorResource(javax.servlet.http.HttpServletRequest request)
public void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SerializerException, IOException
SerializerException
IOException
public void listQueue(javax.servlet.http.HttpServletResponse response)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.