Class HttpInterceptorRdfLogging

java.lang.Object
org.aksw.jena_sparql_api.sparql.ext.http.HttpInterceptorRdfLogging
All Implemented Interfaces:
org.apache.http.HttpRequestInterceptor, org.apache.http.HttpResponseInterceptor

public class HttpInterceptorRdfLogging extends Object implements org.apache.http.HttpRequestInterceptor, org.apache.http.HttpResponseInterceptor
Interceptor for HTTP requests and responses that generates RDF and puts it into a sink
Author:
raven
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpInterceptorRdfLogging(org.apache.jena.atlas.lib.Sink<org.apache.jena.rdf.model.Model> modelSink)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    process(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)
     
    void
    process(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
     
    static org.apache.http.HttpRequest
    unwrap(org.apache.http.HttpRequest result)
     
    static void
    writeHttpLogMsg(org.apache.jena.rdf.model.Model target, org.apache.jena.rdf.model.Resource root)
    :logMsg123 a :LogMessage ; http:uri <http://localhost/foobar> ; dc:created "timestamp" ; sparql:query "query string" timeTaken: // we could use start and end time instead

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpInterceptorRdfLogging

      public HttpInterceptorRdfLogging(org.apache.jena.atlas.lib.Sink<org.apache.jena.rdf.model.Model> modelSink)
  • Method Details

    • unwrap

      public static org.apache.http.HttpRequest unwrap(org.apache.http.HttpRequest result)
    • writeHttpLogMsg

      public static void writeHttpLogMsg(org.apache.jena.rdf.model.Model target, org.apache.jena.rdf.model.Resource root)
      :logMsg123 a :LogMessage ; http:uri <http://localhost/foobar> ; dc:created "timestamp" ; sparql:query "query string" timeTaken: // we could use start and end time instead
    • process

      public void process(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException
      Specified by:
      process in interface org.apache.http.HttpRequestInterceptor
      Throws:
      org.apache.http.HttpException
      IOException
    • process

      public void process(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException
      Specified by:
      process in interface org.apache.http.HttpResponseInterceptor
      Throws:
      org.apache.http.HttpException
      IOException