org.glassfish.grizzly.web.standalone
Class StaticHandler
java.lang.Object
org.glassfish.grizzly.web.standalone.StaticHandler
- All Implemented Interfaces:
- Interceptor<Request>
public class StaticHandler
- extends Object
- implements Interceptor<Request>
This Interceptor is invoked after the request line has been parsed.
- Author:
- Jeanfrancois Arcand
|
Field Summary |
protected FileCache |
fileCache
The FileCache mechanism used to cache static resources. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileCache
protected FileCache fileCache
- The FileCache mechanism used to cache static resources.
StaticHandler
public StaticHandler(WebFilter webFilter)
attach
public void attach(StreamReader reader,
StreamWriter writer)
- The
StreamReader and StreamWriter,
associated with this handler.
- Specified by:
attach in interface Interceptor<Request>
handle
public int handle(Request req,
int handlerCode)
throws IOException
- Intercept the request and decide if we cache the static resource. If the
static resource is already cached, return it.
- Specified by:
handle in interface Interceptor<Request>
- Returns:
-
- Throws:
IOException
findBytes
protected int findBytes(ByteChunk bc,
byte[] b)
- Specialized utility method: find a sequence of lower case bytes inside
a ByteChunk.
Copyright © 2009 SUN Microsystems. All Rights Reserved.