public abstract class AbstractServlet extends Object implements javax.servlet.Servlet
Modifier and Type | Field and Description |
---|---|
protected static String |
ACCEPT |
protected AppConfiguration |
appConfig |
protected static String |
APPLICATION_JAVASCRIPT
This response content type is always used for JSONP results.
|
protected static String |
APPLICATION_SPARQL_RESULTS_XML
This response content type is used for SPARQL Results XML results in non-browser user agents or other cases where
application/xml is not specifically requested.
|
protected static String |
APPLICATION_XML
This response content type is used in cases where application/xml is explicitly requested, or in cases where the
user agent is known to be a commonly available browser.
|
protected javax.servlet.ServletConfig |
config |
protected static String |
DEFAULT_JSONP_CALLBACK_PARAMETER
This query parameter is only used in cases where the configuration property is not setup explicitly.
|
protected static String |
JSONP_CALLBACK_PARAMETER |
protected static String |
JSONP_ENABLED
JSONP property for enabling/disabling jsonp functionality.
|
protected static Pattern |
JSONP_VALIDATOR |
protected org.slf4j.Logger |
log |
protected static String |
MOZILLA |
protected static String |
MSIE |
protected static String |
SERVER_PASSWORD
Deprecated.
|
protected static String |
SERVER_USER
Deprecated.
|
protected static String |
SERVER_USER_PASSWORD |
protected static String |
TEXT_HTML |
protected static String |
TEXT_PLAIN |
protected static String |
USER_AGENT |
Constructor and Description |
---|
AbstractServlet() |
Modifier and Type | Method and Description |
---|---|
protected QueryResultWriter |
checkJSONP(javax.servlet.http.HttpServletRequest req,
OutputStream outputStream) |
void |
destroy() |
protected QueryResultFormat |
getBooleanResultFormat(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletResponse resp) |
protected QueryResultFormat |
getJSONPResultFormat(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletResponse resp) |
protected QueryResultWriter |
getResultWriter(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletResponse resp,
OutputStream outputStream) |
javax.servlet.ServletConfig |
getServletConfig() |
String |
getServletInfo() |
protected TupleResultBuilder |
getTupleResultBuilder(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
OutputStream outputStream)
Gets a
TupleResultBuilder based on the Accept header, and sets the result content type to the best
available match for that, returning a builder that can be used to write out the results. |
protected QueryResultFormat |
getTupleResultFormat(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletResponse resp) |
void |
init(javax.servlet.ServletConfig config) |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp) |
protected final org.slf4j.Logger log
@Deprecated protected static final String SERVER_USER
@Deprecated protected static final String SERVER_PASSWORD
protected static final String SERVER_USER_PASSWORD
protected static final String ACCEPT
protected static final String APPLICATION_JAVASCRIPT
protected static final String APPLICATION_XML
protected static final String APPLICATION_SPARQL_RESULTS_XML
protected static final String TEXT_HTML
protected static final String TEXT_PLAIN
protected static final String USER_AGENT
protected static final String MSIE
protected static final String MOZILLA
protected static final String JSONP_ENABLED
protected static final String DEFAULT_JSONP_CALLBACK_PARAMETER
protected static final Pattern JSONP_VALIDATOR
protected static final String JSONP_CALLBACK_PARAMETER
protected javax.servlet.ServletConfig config
protected AppConfiguration appConfig
public javax.servlet.ServletConfig getServletConfig()
getServletConfig
in interface javax.servlet.Servlet
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
public final void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp) throws javax.servlet.ServletException, IOException
service
in interface javax.servlet.Servlet
javax.servlet.ServletException
IOException
public void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected QueryResultFormat getTupleResultFormat(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletResponse resp)
protected QueryResultFormat getBooleanResultFormat(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletResponse resp)
protected QueryResultFormat getJSONPResultFormat(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletResponse resp)
protected QueryResultWriter getResultWriter(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletResponse resp, OutputStream outputStream) throws UnsupportedQueryResultFormatException, IOException
protected TupleResultBuilder getTupleResultBuilder(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, OutputStream outputStream) throws UnsupportedQueryResultFormatException, IOException
TupleResultBuilder
based on the Accept header, and sets the result content type to the best
available match for that, returning a builder that can be used to write out the results.req
- the current HTTP requestresp
- the current HTTP responseoutputStream
- TODOIOException
UnsupportedQueryResultFormatException
protected QueryResultWriter checkJSONP(javax.servlet.http.HttpServletRequest req, OutputStream outputStream) throws IOException
IOException
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.