java.lang.Object
org.apache.jena.fuseki.servlets.ActionExecLib
Functions relating to
HttpAction objects, including the standard execute with logging process (execAction(org.apache.jena.fuseki.servlets.HttpAction, org.apache.jena.fuseki.servlets.ActionProcessor))-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddRequestId(jakarta.servlet.http.HttpServletResponse response, long id) Helper method for attaching a request ID to a response as a headerstatic HttpActionallocHttpAction(DataAccessPoint dap, org.slf4j.Logger log, ActionCategory category, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Returns a fresh HTTP Action for this request.static longallocRequestId(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Helper method which gets a unique request ID and appends it as a header to the responsestatic voiddecCounter(CounterSet counters, CounterName name) static voiddecCounter(Counters counters, CounterName name) Decrement counterstatic booleanexecAction(HttpAction action, Supplier<ActionProcessor> processor) execAction, allowing for a choice ofActionProcessorwithin the logging and error handling.static voidexecAction(HttpAction action, ActionProcessor processor) Standard execution lifecycle for a SPARQL Request.static voidincCounter(CounterSet counters, CounterName name) static voidincCounter(Counters counters, CounterName name) Increment counterstatic voidinitResponse(HttpAction action) Set headers for the response.static voidlogNoResponse(HttpAction action) Log when we don't handle this request.static voidlogRequest(HttpAction action) Log anHttpActionrequest.static voidlogResponse(HttpAction action) Log anHttpActionresponse.
-
Constructor Details
-
ActionExecLib
public ActionExecLib()
-
-
Method Details
-
allocHttpAction
public static HttpAction allocHttpAction(DataAccessPoint dap, org.slf4j.Logger log, ActionCategory category, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Returns a fresh HTTP Action for this request.- Parameters:
dap- DataAccessPointrequest- HTTP requestresponse- HTTP response- Returns:
- a new HTTP Action
-
execAction
Standard execution lifecycle for a SPARQL Request.startRequest(HttpAction)- initial statistics,
ActionLifecycle.validate(HttpAction)request,ActionLifecycle.execute(HttpAction)request,- completion/error statistics,
finishRequest(HttpAction)
ServletActionfor special case likeSPARQL_QueryGeneralwhich directly holds theActionProcessorandServletProcessorfor administration actions.Return false if the ActionProcessor is null.
-
execAction
execAction, allowing for a choice ofActionProcessorwithin the logging and error handling. Return false if there was no ActionProcessor to handle the action. -
allocRequestId
public static long allocRequestId(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Helper method which gets a unique request ID and appends it as a header to the response- Parameters:
request- HTTP Requestresponse- HTTP Response- Returns:
- Request ID
-
addRequestId
public static void addRequestId(jakarta.servlet.http.HttpServletResponse response, long id) Helper method for attaching a request ID to a response as a header- Parameters:
response- Responseid- Request ID
-
logRequest
Log anHttpActionrequest. -
logResponse
Log anHttpActionresponse. This includes a message to the action log and also on to the standard format Combined NCSA log. -
logNoResponse
Log when we don't handle this request. -
initResponse
Set headers for the response. -
incCounter
Increment counter -
decCounter
Decrement counter -
incCounter
-
decCounter
-