com.sun.grizzly.standalone
Class StaticHandler
java.lang.Object
com.sun.grizzly.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. |
Method Summary |
void |
attachChannel(SocketChannel socketChannel)
Attach a SocketChannel to this object. |
protected int |
findBytes(ByteChunk bc,
byte[] b)
Specialized utility method: find a sequence of lower case bytes inside
a ByteChunk. |
int |
handle(Request req,
int handlerCode)
Intercept the request and decide if we cache the static resource. |
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()
attachChannel
public void attachChannel(SocketChannel socketChannel)
- Attach a
SocketChannel
to this object.
- Specified by:
attachChannel
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 © 2010 SUN Microsystems. All Rights Reserved.