public class SosService extends ConfiguratedHttpServlet
Modifier and Type | Field and Description |
---|---|
static String |
BINDING_DELETE_METHOD |
static String |
BINDING_GET_METHOD |
static String |
BINDING_POST_METHOD |
static String |
BINDING_PUT_METHOD |
private static AtomicLong |
counter |
private static org.slf4j.Logger |
LOGGER |
private static long |
serialVersionUID |
Constructor and Description |
---|
SosService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doDefaultOptions(Binding binding,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doOptions(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
private Binding |
getBinding(javax.servlet.http.HttpServletRequest request)
Get the implementation of
Binding that is registered for the
given request . |
private MediaType |
getContentType(javax.servlet.http.HttpServletRequest request) |
private Set<String> |
getDeclaredBindingMethods(Class<?> c) |
void |
init() |
protected javax.servlet.http.HttpServletRequest |
logRequest(javax.servlet.http.HttpServletRequest request,
long count) |
private void |
logResponse(javax.servlet.http.HttpServletResponse response,
long count,
long start) |
protected void |
onHttpException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
HTTPException exception) |
service
doHead, doTrace, getLastModified, service
private static final long serialVersionUID
private static final org.slf4j.Logger LOGGER
public static final String BINDING_DELETE_METHOD
public static final String BINDING_PUT_METHOD
public static final String BINDING_POST_METHOD
public static final String BINDING_GET_METHOD
private static final AtomicLong counter
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected javax.servlet.http.HttpServletRequest logRequest(javax.servlet.http.HttpServletRequest request, long count)
private void logResponse(javax.servlet.http.HttpServletResponse response, long count, long start)
protected void doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doDelete
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPut
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doOptions
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
private Binding getBinding(javax.servlet.http.HttpServletRequest request) throws HTTPException
Binding
that is registered for the
given request
.request
- URL pattern from request URLBinding
that is registered for the
given urlPattern
.HTTPException
- If the URL pattern or ContentType is not supported
by this SOS.private MediaType getContentType(javax.servlet.http.HttpServletRequest request) throws HTTPException
HTTPException
protected void onHttpException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, HTTPException exception) throws IOException
IOException
protected void doDefaultOptions(Binding binding, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2012-2015 52north.org. All Rights Reserved.