com.sun.grizzly.http.portunif
Class HttpProtocolFinder

java.lang.Object
  extended by com.sun.grizzly.http.portunif.HttpProtocolFinder
All Implemented Interfaces:
ProtocolFinder

public class HttpProtocolFinder
extends Object
implements ProtocolFinder

A ProtocolFinder implementation that parse the available SocketChannel bytes looking for the 'http' bytes. An http request will always has the form of: METHOD URI PROTOCOL/VERSION example: GET / HTTP/1.1 The algorithm will try to find the protocol token.

Author:
Jeanfrancois Arcand, Alexey Stashok

Field Summary
static String HTTP_REQUEST_URL
           
 
Constructor Summary
HttpProtocolFinder()
           
 
Method Summary
 String find(Context context, PUProtocolRequest protocolRequest)
          Try to determine the TCP protocol used (http, soap, etc.).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_REQUEST_URL

public static final String HTTP_REQUEST_URL
See Also:
Constant Field Values
Constructor Detail

HttpProtocolFinder

public HttpProtocolFinder()
Method Detail

find

public String find(Context context,
                   PUProtocolRequest protocolRequest)
            throws IOException
Description copied from interface: ProtocolFinder
Try to determine the TCP protocol used (http, soap, etc.).

Specified by:
find in interface ProtocolFinder
Returns:
ProtocolInfo An instance that store information about the protocol, if found.
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.