org.glassfish.grizzly.http
Interface HttpProbe

All Known Implementing Classes:
HttpProbe.Adapter

public interface HttpProbe

Monitoring probe providing callbacks that may be invoked by Grizzly Http filters.

Since:
2.0
Author:
Alexey Stashok

Nested Class Summary
static class HttpProbe.Adapter
          HttpProbe adapter that provides no-op implementations for all interface methods allowing easy extension by the developer.
 
Method Summary
 void onContentChunkParseEvent(Connection connection, HttpContent content)
          Method will be called, when HTTP message content chunk gets parsed (either request or response).
 void onContentChunkSerializeEvent(Connection connection, HttpContent content)
          Method will be called, when HTTP message content chunk is prepared to be serialized (either request or response).
 void onContentEncodingParseEvent(Connection connection, HttpHeader header, Buffer buffer, ContentEncoding contentEncoding)
          Method will be called, when ContentEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.
 void onContentEncodingSerializeEvent(Connection connection, HttpHeader header, Buffer buffer, ContentEncoding contentEncoding)
          Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.
 void onDataReceivedEvent(Connection connection, Buffer buffer)
          Method will be called, when Buffer will come for processing to the HttpCodecFilter (either request or response).
 void onDataSentEvent(Connection connection, Buffer buffer)
          Method will be called, when Buffer, produced by the HttpCodecFilter will be ready to go to the next Filter in the chain and finally written on wire.
 void onErrorEvent(Connection connection, HttpPacket httpPacket, Throwable error)
          Method will be called, when error occurs during the HttpCodecFilter processing.
 void onHeaderParseEvent(Connection connection, HttpHeader header, int size)
          Method will be called, when HTTP message header gets parsed (either request or response).
 void onHeaderSerializeEvent(Connection connection, HttpHeader header, Buffer buffer)
          Method will be called, when HTTP message header gets serialized (either request or response).
 void onTransferEncodingParseEvent(Connection connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)
          Method will be called, when TransferEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.
 void onTransferEncodingSerializeEvent(Connection connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)
          Method will be called, when TransferEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.
 

Method Detail

onDataReceivedEvent

void onDataReceivedEvent(Connection connection,
                         Buffer buffer)
Method will be called, when Buffer will come for processing to the HttpCodecFilter (either request or response).

Parameters:
connection - Connection, the event belongs to.
buffer - Buffer to be parsed.

onDataSentEvent

void onDataSentEvent(Connection connection,
                     Buffer buffer)
Method will be called, when Buffer, produced by the HttpCodecFilter will be ready to go to the next Filter in the chain and finally written on wire.

Parameters:
connection - Connection, the event belongs to.
buffer - serialized Buffer.

onHeaderParseEvent

void onHeaderParseEvent(Connection connection,
                        HttpHeader header,
                        int size)
Method will be called, when HTTP message header gets parsed (either request or response).

Parameters:
connection - Connection, the event belongs to.
header - parsed HttpHeader.
size - the size of the parsed header buffer.

onHeaderSerializeEvent

void onHeaderSerializeEvent(Connection connection,
                            HttpHeader header,
                            Buffer buffer)
Method will be called, when HTTP message header gets serialized (either request or response).

Parameters:
connection - Connection, the event belongs to.
header - serialized HttpHeader.
buffer - the serialized header Buffer.

onContentChunkParseEvent

void onContentChunkParseEvent(Connection connection,
                              HttpContent content)
Method will be called, when HTTP message content chunk gets parsed (either request or response).

Parameters:
connection - Connection, the event belongs to.
content - parsed HttpContent.

onContentChunkSerializeEvent

void onContentChunkSerializeEvent(Connection connection,
                                  HttpContent content)
Method will be called, when HTTP message content chunk is prepared to be serialized (either request or response).

Parameters:
connection - Connection, the event belongs to.
content - HttpContent to be serialized.

onContentEncodingParseEvent

void onContentEncodingParseEvent(Connection connection,
                                 HttpHeader header,
                                 Buffer buffer,
                                 ContentEncoding contentEncoding)
Method will be called, when ContentEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

Parameters:
connection - Connection, the event belongs to.
header - HTTP HttpHeader, the event belongs to.
buffer - Buffer to be parsed/decoded.
contentEncoding - ContentEncoding to be applied.

onContentEncodingSerializeEvent

void onContentEncodingSerializeEvent(Connection connection,
                                     HttpHeader header,
                                     Buffer buffer,
                                     ContentEncoding contentEncoding)
Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Parameters:
connection - Connection, the event belongs to.
header - HTTP HttpHeader, the event belongs to.
buffer - Buffer to be serialized/encoded.
contentEncoding - ContentEncoding to be applied.

onTransferEncodingParseEvent

void onTransferEncodingParseEvent(Connection connection,
                                  HttpHeader header,
                                  Buffer buffer,
                                  TransferEncoding transferEncoding)
Method will be called, when TransferEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

Parameters:
connection - Connection, the event belongs to.
header - HTTP HttpHeader, the event belongs to.
buffer - Buffer to be parsed/decoded.
transferEncoding - TransferEncoding to be applied.

onTransferEncodingSerializeEvent

void onTransferEncodingSerializeEvent(Connection connection,
                                      HttpHeader header,
                                      Buffer buffer,
                                      TransferEncoding transferEncoding)
Method will be called, when TransferEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Parameters:
connection - Connection, the event belongs to.
header - HTTP HttpHeader, the event belongs to.
buffer - Buffer to be serialized/encoded.
transferEncoding - TransferEncoding to be applied.

onErrorEvent

void onErrorEvent(Connection connection,
                  HttpPacket httpPacket,
                  Throwable error)
Method will be called, when error occurs during the HttpCodecFilter processing.

Parameters:
connection - Connection, the event belongs to.
connection - HttpPacket, the event belongs to.
error - error


Copyright © 2013 Oracle Corporation. All Rights Reserved.