Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.portunif.finders

public Class HttpProtocolFinder

extends Object
implements ProtocolFinder
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.portunif.ProtocolFinder
Imports
org.glassfish.grizzly.Buffer, .Connection, .Grizzly, org.glassfish.grizzly.attributes.Attribute, org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.portunif.PUContext, .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.
Authors
Jeanfrancois Arcand, Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final int
private static final char[]
private final Attribute<HttpProtocolFinder.ParsingState>

Constructor Summary

AccessConstructor and Description
public
public
HttpProtocolFinder(int maxRequestLineSize)

Method Summary

Modifier and TypeMethod and Description
public ProtocolFinder.Result
find(final PUContext puContext, final FilterChainContext ctx)

Implements org.glassfish.grizzly.portunif.ProtocolFinder.find.

Method is called from PUFilter to check whether the incoming bytes belong to the specific protocol.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

maxRequestLineSizeback to summary
private final int maxRequestLineSize
METHOD_FIRST_LETTERSback to summary
private static final char[] METHOD_FIRST_LETTERS
parsingStateAttributeback to summary
private final Attribute<HttpProtocolFinder.ParsingState> parsingStateAttribute

Constructor Detail

HttpProtocolFinderback to summary
public HttpProtocolFinder()
HttpProtocolFinderback to summary
public HttpProtocolFinder(int maxRequestLineSize)

Method Detail

findback to summary
public ProtocolFinder.Result find(final PUContext puContext, final FilterChainContext ctx)

Implements org.glassfish.grizzly.portunif.ProtocolFinder.find.

Doc from org.glassfish.grizzly.portunif.ProtocolFinder.find.

Method is called from PUFilter to check whether the incoming bytes belong to the specific protocol.

Annotations
@Override
org.glassfish.grizzly.portunif.finders back to summary

private final Class HttpProtocolFinder.ParsingState

extends Object
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.portunif.finders.HttpProtocolFinder.ParsingState

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
ParsingState(int position, int state)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

positionback to summary
pack-priv int position
stateback to summary
pack-priv int state

Constructor Detail

ParsingStateback to summary
public ParsingState(int position, int state)