public class ProxyHTTPSPDYConnection extends HttpConnection implements HttpParser.RequestHandler<ByteBuffer>
HttpConnection.HttpChannelOverHttp
AbstractConnection.FillingInterestedCallback, AbstractConnection.NestedState, AbstractConnection.State
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
UPGRADE_CONNECTION_ATTRIBUTE
EXECUTE_ONFILLABLE, FILL_INTERESTED, FILLING, FILLING_FILL_INTERESTED, IDLE, REFILLING
Constructor and Description |
---|
ProxyHTTPSPDYConnection(Connector connector,
HttpConfiguration config,
EndPoint endPoint,
short version,
ProxyEngineSelector proxyEngineSelector) |
Modifier and Type | Method and Description |
---|---|
void |
badMessage(int status,
String reason)
Called to signal that a bad HTTP message has been received.
|
void |
completed() |
boolean |
content(ByteBuffer item) |
void |
earlyEOF()
Called to signal that an EOF was received unexpectedly
during the parsing of a HTTP message
|
int |
getHeaderCacheSize() |
boolean |
headerComplete() |
boolean |
messageComplete() |
protected HttpParser.RequestHandler<ByteBuffer> |
newRequestHandler() |
boolean |
parsedHeader(HttpField field)
This is the method called by parser when a HTTP Header name and value is found
|
boolean |
parsedHostHeader(String host,
int port)
This is the method called by the parser after it has parsed the host header (and checked it's format).
|
boolean |
startRequest(HttpMethod method,
String methodString,
ByteBuffer uri,
HttpVersion httpVersion)
This is the method called by parser when the HTTP request line is parsed
|
abort, getConnector, getCurrentConnection, getHttpChannel, getHttpConfiguration, getMessagesIn, getMessagesOut, getParser, getRequestBuffer, getServer, newHttpChannel, newHttpGenerator, newHttpInput, newHttpParser, onClose, onFillable, onFillInterestedFailed, onOpen, onUpgradeFrom, parseContent, run, send, send, setCurrentConnection
addListener, close, failedCallback, fillInterested, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, next, onReadTimeout, setInputBufferSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, close, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint
public ProxyHTTPSPDYConnection(Connector connector, HttpConfiguration config, EndPoint endPoint, short version, ProxyEngineSelector proxyEngineSelector)
protected HttpParser.RequestHandler<ByteBuffer> newRequestHandler()
newRequestHandler
in class HttpConnection
public boolean startRequest(HttpMethod method, String methodString, ByteBuffer uri, HttpVersion httpVersion)
HttpParser.RequestHandler
startRequest
in interface HttpParser.RequestHandler<ByteBuffer>
method
- The method as enum if of a known typemethodString
- The method as a stringuri
- The raw bytes of the URI. These are copied into a ByteBuffer that will not be changed until this parser is reset and reused.public boolean parsedHeader(HttpField field)
HttpParser.HttpHandler
parsedHeader
in interface HttpParser.HttpHandler<ByteBuffer>
field
- The field parsedpublic boolean parsedHostHeader(String host, int port)
HttpParser.RequestHandler
HttpParser.HttpHandler.parsedHeader(HttpField)
methods and before
HttpHandler#headerComplete();parsedHostHeader
in interface HttpParser.RequestHandler<ByteBuffer>
public boolean headerComplete()
headerComplete
in interface HttpParser.HttpHandler<ByteBuffer>
public boolean content(ByteBuffer item)
content
in interface HttpParser.HttpHandler<ByteBuffer>
public boolean messageComplete()
messageComplete
in interface HttpParser.HttpHandler<ByteBuffer>
public void completed()
completed
in interface HttpTransport
completed
in class HttpConnection
public int getHeaderCacheSize()
getHeaderCacheSize
in interface HttpParser.HttpHandler<ByteBuffer>
public void earlyEOF()
HttpParser.HttpHandler
earlyEOF
in interface HttpParser.HttpHandler<ByteBuffer>
public void badMessage(int status, String reason)
HttpParser.HttpHandler
badMessage
in interface HttpParser.HttpHandler<ByteBuffer>
status
- The bad status to sendreason
- The textual reason for badnessCopyright © 1995-2015 Webtide. All Rights Reserved.