|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.esri.gpt.framework.context.BaseServlet
public abstract class BaseServlet
Super-class for HttpServlet end-points.
Constructor Summary | |
---|---|
BaseServlet()
|
Method Summary | |
---|---|
protected void |
authenticate(RequestContext context,
Credentials credentials)
Authenticate credentials found within and HTTP request. |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Handles a GET request. |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Handles a POST request. |
protected abstract void |
execute(HttpServletRequest request,
HttpServletResponse response,
RequestContext context)
Processes the HTTP request. |
protected UsernamePasswordCredentials |
getCredentials(HttpServletRequest request)
Looks for username:password credentials within the Authorization header parameter of the HTTP request. |
protected Logger |
getLogger()
Gets the logger. |
protected String |
getParameterValue(HttpServletRequest request,
String name)
Gets a request parameter value. |
protected String |
getRealm(RequestContext context)
Gets the identity store realm (used as an identifier during HTTP 401 credential challenge/response). |
protected String |
readInputCharacters(HttpServletRequest request)
Fully reads the characters from the request input stream. |
protected void |
writeCharacterResponse(HttpServletResponse response,
String content,
String charset,
String contentType)
Writes characters to the response stream. |
protected void |
writeHtmlResponse(HttpServletResponse response,
String content)
Convience method for writeCharacterResponse. |
protected void |
writeXmlResponse(HttpServletResponse response,
String content)
Convience method for writeCharacterResponse. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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 BaseServlet()
Method Detail |
---|
protected void authenticate(RequestContext context, Credentials credentials) throws CredentialsDeniedException, IdentityException, SQLException
context
- the active request contextcredentials
- the credentials to authenticate
CredentialsDeniedException
- if credentials are denied
IdentityException
- if a system error occurs preventing authentication
SQLException
- if a database communication exception occursprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
request
- the servlet requestresponse
- the servlet response
ServletException
IOException
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
request
- the servlet requestresponse
- the servlet response
ServletException
IOException
protected abstract void execute(HttpServletRequest request, HttpServletResponse response, RequestContext context) throws Exception
request
- the HTTP requestresponse
- HTTP responsecontext
- request context
Exception
- if an exception occursprotected UsernamePasswordCredentials getCredentials(HttpServletRequest request) throws IOException, CredentialsDeniedException
request
- the servlet request
IOException
- if an IO exception occurs
CredentialsDeniedException
- if empty or non-basic credentials were locatedprotected Logger getLogger()
protected String getParameterValue(HttpServletRequest request, String name)
request
- the HTTP requestname
- the parameter name
protected String getRealm(RequestContext context)
context
- the active request context
protected String readInputCharacters(HttpServletRequest request) throws IOException
request
- the HTTP servlet request
IOException
- if an exception occursprotected void writeCharacterResponse(HttpServletResponse response, String content, String charset, String contentType) throws IOException
response
- the servlet responsecontent
- the content to writecharset
- the response character encodingcontentType
- the response content type
IOException
- if an IO exception occursprotected void writeHtmlResponse(HttpServletResponse response, String content) throws IOException
response
- the servlet responsecontent
- the content to write
IOException
- if an IO exception occursprotected void writeXmlResponse(HttpServletResponse response, String content) throws IOException
response
- the servlet responsecontent
- the content to write
IOException
- if an IO exception occurs
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |