|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
pivot.web.server.QueryServlet
public abstract class QueryServlet
Abstract base class for web query servlets. It is the server counterpart to
pivot.web.Query
.
Nested Class Summary | |
---|---|
class |
QueryServlet.ArgumentsDictionary
Arguments dictionary implementation. |
static class |
QueryServlet.Credentials
User credentials, which will be made availale if the servlet's authenticationRequired flag is set to true. |
protected static class |
QueryServlet.Method
The supported HTTP methods. |
class |
QueryServlet.RequestPropertiesDictionary
Request properties dictionary implementation. |
class |
QueryServlet.ResponsePropertiesDictionary
Response properties dictionary implementation. |
Constructor Summary | |
---|---|
QueryServlet()
|
Method Summary | |
---|---|
protected void |
authorize()
Authorizes the current request, and throws a LoginException if the request is not authorized. |
protected void |
doDelete()
|
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.Object |
doGet()
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doHead(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 java.net.URL |
doPost(java.lang.Object value)
|
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPut(java.lang.Object value)
|
protected void |
doTrace(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
QueryServlet.ArgumentsDictionary |
getArguments()
Returns the servlet's arguments dictionary, which holds the values passed in the HTTP request query string. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request. |
QueryServlet.Credentials |
getCredentials()
Gets the authentication credentials that were extracted from the request. |
java.lang.String |
getHostname()
Gets the host name that was requested. |
QueryServlet.Method |
getMethod()
Gets the HTTP method with which the current request was made. |
int |
getPort()
Returns the Internet Protocol (IP) port number of the interface on which the request was received. |
java.lang.String |
getProtocol()
Returns the name of the HTTP protocol that the request is using. |
java.lang.String |
getQueryPath()
Returns the portion of the request URI that occurs after the context path but preceding the query string. |
QueryServlet.RequestPropertiesDictionary |
getRequestProperties()
Returns the servlet's request property dictionary, which holds the HTTP request headers. |
QueryServlet.ResponsePropertiesDictionary |
getResponseProperties()
Returns the servlet's response property dictionary, which holds the HTTP response headers that will be sent back to the client. |
Serializer<?> |
getSerializer()
Returns the serializer used to stream the value passed to or from the web query. |
boolean |
isAuthenticationRequired()
Tells whether or not this servlet will require authentication data. |
boolean |
isDetermineContentLength()
Tells whether this servlet is configured to always determine the content length of outgoing responses and set the Content-Length HTTP response header accordingly. |
boolean |
isSecure()
Tells whether the request has been ecrypted over HTTPS. |
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setAuthenticationRequired(boolean authenticationRequired)
Sets whether or not this servlet will require authentication data. |
void |
setDetermineContentLength(boolean determineContentLength)
Sets the value of the determineContentLength flag. |
void |
setSerializer(Serializer<?> serializer)
Sets the serializer used to stream the value passed to or from the web query. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryServlet()
Method Detail |
---|
public java.lang.String getHostname()
public java.lang.String getContextPath()
public java.lang.String getQueryPath()
public int getPort()
public boolean isSecure()
public java.lang.String getProtocol()
public QueryServlet.Method getMethod()
public boolean isDetermineContentLength()
public void setDetermineContentLength(boolean determineContentLength)
isDetermineContentLength()
public boolean isAuthenticationRequired()
public void setAuthenticationRequired(boolean authenticationRequired)
public QueryServlet.Credentials getCredentials()
public QueryServlet.ArgumentsDictionary getArguments()
public QueryServlet.RequestPropertiesDictionary getRequestProperties()
public QueryServlet.ResponsePropertiesDictionary getResponseProperties()
public Serializer<?> getSerializer()
JSONSerializer
is used.
public void setSerializer(Serializer<?> serializer)
serializer
- The serializer (must be non-null).protected java.lang.Object doGet() throws javax.servlet.ServletException
javax.servlet.ServletException
protected java.net.URL doPost(java.lang.Object value) throws javax.servlet.ServletException
javax.servlet.ServletException
protected void doPut(java.lang.Object value) throws javax.servlet.ServletException
javax.servlet.ServletException
protected void doDelete() throws javax.servlet.ServletException
javax.servlet.ServletException
protected void authorize() throws javax.servlet.ServletException, javax.security.auth.login.LoginException
This method is guaranteed to be called after the arguments and request properties have been made available.
javax.security.auth.login.LoginException
- Thrown if the request is not authorized
javax.servlet.ServletException
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
service
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doPut
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doDelete
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doHead(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doHead
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doOptions
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
protected final void doTrace(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doTrace
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |