public abstract class AbstractGraphQLHttpServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet, GraphQLMBean
Modifier and Type | Class and Description |
---|---|
protected static interface |
AbstractGraphQLHttpServlet.HttpRequestHandler |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_GRAPHQL |
static java.lang.String |
APPLICATION_JSON_UTF8 |
static org.slf4j.Logger |
log |
static int |
STATUS_BAD_REQUEST |
static int |
STATUS_OK |
Constructor and Description |
---|
AbstractGraphQLHttpServlet() |
AbstractGraphQLHttpServlet(java.util.List<GraphQLServletListener> listeners,
boolean asyncServletMode) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(GraphQLServletListener servletListener) |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
java.lang.String |
executeQuery(java.lang.String query) |
protected abstract GraphQLObjectMapper |
getGraphQLObjectMapper() |
protected abstract GraphQLInvocationInputFactory |
getInvocationInputFactory() |
java.lang.String[] |
getMutations() |
java.lang.String[] |
getQueries() |
protected abstract GraphQLQueryInvoker |
getQueryInvoker() |
void |
removeListener(GraphQLServletListener servletListener) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
public static final org.slf4j.Logger log
public static final java.lang.String APPLICATION_JSON_UTF8
public static final java.lang.String APPLICATION_GRAPHQL
public static final int STATUS_OK
public static final int STATUS_BAD_REQUEST
public AbstractGraphQLHttpServlet()
public AbstractGraphQLHttpServlet(java.util.List<GraphQLServletListener> listeners, boolean asyncServletMode)
protected abstract GraphQLQueryInvoker getQueryInvoker()
protected abstract GraphQLInvocationInputFactory getInvocationInputFactory()
protected abstract GraphQLObjectMapper getGraphQLObjectMapper()
public void addListener(GraphQLServletListener servletListener)
public void removeListener(GraphQLServletListener servletListener)
public java.lang.String[] getQueries()
getQueries
in interface GraphQLMBean
public java.lang.String[] getMutations()
getMutations
in interface GraphQLMBean
public java.lang.String executeQuery(java.lang.String query)
executeQuery
in interface GraphQLMBean
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException