com.tinkerpop.rexster.servlet
Class RexsterStaticHttpHandler

java.lang.Object
  extended by org.glassfish.grizzly.http.server.HttpHandler
      extended by org.glassfish.grizzly.http.server.StaticHttpHandler
          extended by com.tinkerpop.rexster.servlet.RexsterStaticHttpHandler

public class RexsterStaticHttpHandler
extends org.glassfish.grizzly.http.server.StaticHttpHandler

This class is a near replica of the StaticHttpHandler. The only difference is that it does not cache resources. Caching (at least in how it was implemented by Grizzly) caused problems in Dog House as mime-types for all resources were being returned as "text/html" even if they were clearly css/png/etc.

Will drop this class when problem with StaticHttpHandler is resolved.


Field Summary
 
Fields inherited from class org.glassfish.grizzly.http.server.StaticHttpHandler
docRoots
 
Constructor Summary
RexsterStaticHttpHandler(String path)
           
 
Method Summary
protected  boolean handle(String uri, org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)
           
static void sendAFile(org.glassfish.grizzly.http.server.Response response, File file)
           
 
Methods inherited from class org.glassfish.grizzly.http.server.StaticHttpHandler
addDocRoot, addDocRoot, addToFileCache, getDefaultDocRoot, getDocRoots, getRelativeURI, onMissingResource, removeDocRoot, sendFile, service
 
Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler
customizedErrorPage, destroy, doHandle, getName, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updateContextPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RexsterStaticHttpHandler

public RexsterStaticHttpHandler(String path)
Method Detail

handle

protected boolean handle(String uri,
                         org.glassfish.grizzly.http.server.Request req,
                         org.glassfish.grizzly.http.server.Response res)
                  throws Exception
Overrides:
handle in class org.glassfish.grizzly.http.server.StaticHttpHandler
Throws:
Exception

sendAFile

public static void sendAFile(org.glassfish.grizzly.http.server.Response response,
                             File file)
                      throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.