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

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

public class ContentLengthHandler
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.
 
Fields inherited from interface com.sun.enterprise.web.connector.grizzly.Handler
BREAK, CONTINUE, HEADERS_PARSED, REQUEST_BUFFERED, REQUEST_LINE_PARSED, RESPONSE_PROCEEDED
 
Constructor Summary
ContentLengthHandler(ContentLengthAlgorithm algorithm)
           
 
Method Summary
 void attachChannel(SocketChannel socketChannel)
          Attach a SocketChannel to this object.
 int handle(Request request, int handlerCode)
          Add a request URI to the FileCache or use the cache to send the static resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileCache

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

Constructor Detail

ContentLengthHandler

public ContentLengthHandler(ContentLengthAlgorithm algorithm)
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
Add a request URI to the FileCache or use the cache to send the static resources.

Specified by:
handle in interface Handler<Request>
Throws:
IOException


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