com.sun.enterprise.web.connector.grizzly.handlers
Class NoParsingHandler

java.lang.Object
  extended by com.sun.enterprise.web.connector.grizzly.handlers.NoParsingHandler
All Implemented Interfaces:
Handler<Request>

public class NoParsingHandler
extends Object
implements Handler<Request>

This Handler 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.
protected  SocketChannel socketChannel
          The SocketChannel used to send a static resources.
 
Fields inherited from interface com.sun.enterprise.web.connector.grizzly.Handler
BREAK, CONTINUE, HEADERS_PARSED, REQUEST_BUFFERED, REQUEST_LINE_PARSED, RESPONSE_PROCEEDED
 
Constructor Summary
NoParsingHandler()
           
 
Method Summary
protected  void addToCache(Request request)
           
 void attachChannel(SocketChannel socketChannel)
          Attach a SocketChannel to this object.
protected  boolean canCache(Request request, int handlerCode)
           
protected  int findBytes(ByteChunk bc, byte[] b)
          Specialized utility method: find a sequence of lower case bytes inside a ByteChunk.
protected  String getDocRoot(Request request)
           
protected  byte[] getFullResourcePath(Request request)
           
protected  MimeHeaders getHeaders(Request request)
           
protected  String getServletName(Request request)
           
protected  String getUri(Request request)
           
 int handle(Request request, int handlerCode)
          Intercept the request and decide if we cache the static resource.
protected  boolean isXpoweredBy(Request request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socketChannel

protected SocketChannel socketChannel
The SocketChannel used to send a static resources.


fileCache

protected FileCache fileCache
The FileCache mechanism used to cache static resources.

Constructor Detail

NoParsingHandler

public NoParsingHandler()
Method Detail

attachChannel

public void attachChannel(SocketChannel socketChannel)
Attach a SocketChannel to this object.

Specified by:
attachChannel in interface Handler<Request>

handle

public int handle(Request request,
                  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 Handler<Request>
Throws:
IOException

getFullResourcePath

protected byte[] getFullResourcePath(Request request)

getUri

protected String getUri(Request request)

canCache

protected boolean canCache(Request request,
                           int handlerCode)

addToCache

protected void addToCache(Request request)

isXpoweredBy

protected boolean isXpoweredBy(Request request)

getHeaders

protected MimeHeaders getHeaders(Request request)

getServletName

protected String getServletName(Request request)

getDocRoot

protected String getDocRoot(Request request)

findBytes

protected int findBytes(ByteChunk bc,
                        byte[] b)
Specialized utility method: find a sequence of lower case bytes inside a ByteChunk.



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.