public abstract class DispatchServlet
extends HttpServlet
ServiceProxyWeb
,
ServiceProxyLocal
,
ServiceRequest
,
ServiceResponse
,
Serialized FormConstructor and Description |
---|
DispatchServlet() |
Modifier and Type | Method and Description |
---|---|
ServiceResponse |
callService(ServiceRequest serviceRequest)
Calls service method using ServiceProxyLocal.
|
void |
doGet(HttpServletRequest request,
HttpServletResponse response) |
void |
doPost(HttpServletRequest request,
HttpServletResponse response) |
Class<? extends Service> |
getServiceClass(Class<? extends Service> service)
Gets the service class.
|
ServiceRequest |
getServiceRequest(HttpServletRequest request)
Gets the service request from the given HttpServletRequest.
|
void |
writeServiceResponse(HttpServletResponse response,
ServiceResponse serviceResponse)
Writes service response.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public ServiceResponse callService(ServiceRequest serviceRequest)
serviceRequest
- the service requestpublic void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
public Class<? extends Service> getServiceClass(Class<? extends Service> service)
public ServiceRequest getServiceRequest(HttpServletRequest request) throws Exception
request
- the requestException
- in case of any errorpublic void writeServiceResponse(HttpServletResponse response, ServiceResponse serviceResponse) throws ServletException, IOException
response
- the responseserviceResponse
- the service responseServletException
- the servlet exceptionIOException
- Signals that an I/O exception has occurred.Copyright © 2010-2020 Toolsverse. All Rights Reserved.