Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.http.jmx

public Class HttpCodecFilter

extends JmxObject
Class Inheritance
Annotations
@ManagedObject
@Description:This Filter is responsible for the parsing incoming HTTP packets and serializing high level objects back into the HTTP protocol format.
Imports
org.glassfish.grizzly.Buffer, .Connection, org.glassfish.grizzly.http.ContentEncoding, .GZipContentEncoding, .HttpContent, .HttpHeader, .HttpProbe, .LZMAContentEncoding, .TransferEncoding, .HttpPacket, org.glassfish.grizzly.monitoring.jmx.JmxObject, org.glassfish.gmbal.Description, .GmbalMBean, .ManagedAttribute, .ManagedObject, java.util.concurrent.atomic.AtomicLong, org.glassfish.grizzly.jmxbase.GrizzlyJmxManager

JMX management object for the HttpCodecFilter.
Since
2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AtomicLong
private final AtomicLong
private final AtomicLong
private final AtomicLong
private final AtomicLong
private final HttpCodecFilter
private final AtomicLong
private final AtomicLong
private final HttpProbe

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
calculateAvgCompressionPercent(double original, double result)

public String
getGzipCompressionRatio()

Returns: the gzip compression ratio.

public long
getHttpCodecErrorCount()

Returns: total number of HTTP codec errors.

public String
public String
getLzmaAvgCompressionPercent()

Returns: the lzma compression ratio.

public long
getTotalBytesAfterGzipEncoding()

Returns: total number of bytes after gzip compression.

public long
getTotalBytesAfterLzmaEncoding()

Returns: total number of bytes after lzma compression.

public long
getTotalBytesBeforeGzipEncoding()

Returns: total number of bytes sent to gzip to be compressed.

public long
getTotalBytesBeforeLzmaEncoding()

Returns: total number of bytes sent to lzma be compressed.

public long
getTotalContentReceived()

Returns: total number of bytes received by this org.glassfish.grizzly.http.HttpCodecFilter.

public long
getTotalContentWritten()

Returns: total number of bytes written by this org.glassfish.grizzly.http.HttpCodecFilter.

protected void
onDeregister(GrizzlyJmxManager mom)

Implements abstract org.glassfish.grizzly.monitoring.jmx.JmxObject.onDeregister.

Method will be called right after this JmxObject is unregistered by the JMX manager.

protected void
onRegister(GrizzlyJmxManager mom, GmbalMBean bean)

Implements abstract org.glassfish.grizzly.monitoring.jmx.JmxObject.onRegister.

Method will be called right after this JmxObject is registered by the JMX manager.

Field Detail

contentBeforeCompressionTotalGzipback to summary
private final AtomicLong contentBeforeCompressionTotalGzip
contentBeforeCompressionTotalLzmaback to summary
private final AtomicLong contentBeforeCompressionTotalLzma
contentCompressionTotalGzipback to summary
private final AtomicLong contentCompressionTotalGzip
contentCompressionTotalLzmaback to summary
private final AtomicLong contentCompressionTotalLzma
httpCodecErrorCountback to summary
private final AtomicLong httpCodecErrorCount
httpCodecFilterback to summary
private final HttpCodecFilter httpCodecFilter
httpContentReceivedback to summary
private final AtomicLong httpContentReceived
httpContentWrittenback to summary
private final AtomicLong httpContentWritten
probeback to summary
private final HttpProbe probe

Constructor Detail

HttpCodecFilterback to summary
public HttpCodecFilter(HttpCodecFilter httpCodecFilter)

Method Detail

calculateAvgCompressionPercentback to summary
private String calculateAvgCompressionPercent(double original, double result)
getGzipCompressionRatioback to summary
public String getGzipCompressionRatio()
Returns:String

the gzip compression ratio.

Annotations
@ManagedAttribute
id:http-codec-gzip-avg-compression-percent
@Description:The average gzip compression result.
getHttpCodecErrorCountback to summary
public long getHttpCodecErrorCount()
Returns:long

total number of HTTP codec errors.

Annotations
@ManagedAttribute
id:http-codec-error-count
@Description:The total number of protocol errors that have occurred during either the parsing or serialization process.
getJmxNameback to summary
public String getJmxName()

Implements abstract org.glassfish.grizzly.monitoring.jmx.JmxObject.getJmxName.

Annotations
@Override
getLzmaAvgCompressionPercentback to summary
public String getLzmaAvgCompressionPercent()
Returns:String

the lzma compression ratio.

Annotations
@ManagedAttribute
id:http-codec-lzma-avg-compression-percent
@Description:The average lzma compression result.
getTotalBytesAfterGzipEncodingback to summary
public long getTotalBytesAfterGzipEncoding()
Returns:long

total number of bytes after gzip compression.

Annotations
@ManagedAttribute
id:http-codec-after-gzip-compression-total
@Description:The total number of bytes after gzip compression has been applied.
getTotalBytesAfterLzmaEncodingback to summary
public long getTotalBytesAfterLzmaEncoding()
Returns:long

total number of bytes after lzma compression.

Annotations
@ManagedAttribute
id:http-codec-after-lzma-compression-total
@Description:The total number of bytes after lzma compression has been applied.
getTotalBytesBeforeGzipEncodingback to summary
public long getTotalBytesBeforeGzipEncoding()
Returns:long

total number of bytes sent to gzip to be compressed.

Annotations
@ManagedAttribute
id:http-codec-before-gzip-compression-total
@Description:The total number of bytes before gzip compression has been applied.
getTotalBytesBeforeLzmaEncodingback to summary
public long getTotalBytesBeforeLzmaEncoding()
Returns:long

total number of bytes sent to lzma be compressed.

Annotations
@ManagedAttribute
id:http-codec-before-lzma-compression-total
@Description:The total number of bytes before lzma compression has been applied.
getTotalContentReceivedback to summary
public long getTotalContentReceived()
Returns:long

total number of bytes received by this org.glassfish.grizzly.http.HttpCodecFilter.

Annotations
@ManagedAttribute
id:total-bytes-received
@Description:The total number of bytes this filter has processed as part of the HTTP protocol parsing process.
getTotalContentWrittenback to summary
public long getTotalContentWritten()
Returns:long

total number of bytes written by this org.glassfish.grizzly.http.HttpCodecFilter.

Annotations
@ManagedAttribute
id:total-bytes-written
@Description:The total number of bytes that have been written as part of the serialization process to the HTTP protocol.
onDeregisterback to summary
protected void onDeregister(GrizzlyJmxManager mom)

Implements abstract org.glassfish.grizzly.monitoring.jmx.JmxObject.onDeregister.

Doc from org.glassfish.grizzly.monitoring.jmx.JmxObject.onDeregister.

Method will be called right after this JmxObject is unregistered by the JMX manager.

Annotations
@Override
onRegisterback to summary
protected void onRegister(GrizzlyJmxManager mom, GmbalMBean bean)

Implements abstract org.glassfish.grizzly.monitoring.jmx.JmxObject.onRegister.

Doc from org.glassfish.grizzly.monitoring.jmx.JmxObject.onRegister.

Method will be called right after this JmxObject is registered by the JMX manager.

Annotations
@Override
org.glassfish.grizzly.http.jmx back to summary

private final Class HttpCodecFilter.JmxHttpProbe

extends Object
implements HttpProbe
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.http.HttpProbe

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
onContentChunkParseEvent(Connection<L> connection, HttpContent content)

Implements org.glassfish.grizzly.http.HttpProbe.onContentChunkParseEvent.

Method will be called, when HTTP message content chunk gets parsed (either request or response).

public void
onContentChunkSerializeEvent(Connection<L> connection, HttpContent content)

Implements org.glassfish.grizzly.http.HttpProbe.onContentChunkSerializeEvent.

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

public void
onContentEncodingParseEvent(Connection<L> connection, HttpHeader header, Buffer buffer, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseEvent.

Method will be called, when ContentEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

public void
onContentEncodingParseResultEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseResultEvent.

This method will be called after the ContentEncoding has been applied.

public void
onContentEncodingSerializeEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeEvent.

/** Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

public void
onContentEncodingSerializeResultEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeResultEvent.

Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

public void
onDataReceivedEvent(Connection<L> connection, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onDataReceivedEvent.

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

public void
onDataSentEvent(Connection<L> connection, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onDataSentEvent.

Method will be called, when Buffer, produced by the HttpCodecFilter will be ready to go to the next org.glassfish.grizzly.filterchain.Filter in the chain and finally written on wire.

public void
onErrorEvent(Connection<L> connection, HttpPacket httpPacket, Throwable error)

Implements org.glassfish.grizzly.http.HttpProbe.onErrorEvent.

Method will be called, when error occurs during the HttpCodecFilter processing.

public void
onHeaderParseEvent(Connection<L> connection, HttpHeader header, int size)

Implements org.glassfish.grizzly.http.HttpProbe.onHeaderParseEvent.

Method will be called, when HTTP message header gets parsed (either request or response).

public void
onHeaderSerializeEvent(Connection<L> connection, HttpHeader header, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onHeaderSerializeEvent.

Method will be called, when HTTP message header gets serialized (either request or response).

public void
onTransferEncodingParseEvent(Connection<L> connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onTransferEncodingParseEvent.

Method will be called, when TransferEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

public void
onTransferEncodingSerializeEvent(Connection<L> connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onTransferEncodingSerializeEvent.

Method will be called, when TransferEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JmxHttpProbeback to summary
private JmxHttpProbe()

Method Detail

onContentChunkParseEventback to summary
public void onContentChunkParseEvent(Connection<L> connection, HttpContent content)

Implements org.glassfish.grizzly.http.HttpProbe.onContentChunkParseEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentChunkParseEvent.

Method will be called, when HTTP message content chunk gets parsed (either request or response).

Annotations
@Override
onContentChunkSerializeEventback to summary
public void onContentChunkSerializeEvent(Connection<L> connection, HttpContent content)

Implements org.glassfish.grizzly.http.HttpProbe.onContentChunkSerializeEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentChunkSerializeEvent.

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

Annotations
@Override
onContentEncodingParseEventback to summary
public void onContentEncodingParseEvent(Connection<L> connection, HttpHeader header, Buffer buffer, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseEvent.

Method will be called, when ContentEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

Annotations
@Override
onContentEncodingParseResultEventback to summary
public void onContentEncodingParseResultEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseResultEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentEncodingParseResultEvent.

This method will be called after the ContentEncoding has been applied.

Annotations
@Override
onContentEncodingSerializeEventback to summary
public void onContentEncodingSerializeEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeEvent.

/** Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Annotations
@Override
onContentEncodingSerializeResultEventback to summary
public void onContentEncodingSerializeResultEvent(Connection<L> connection, HttpHeader header, Buffer result, ContentEncoding contentEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeResultEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onContentEncodingSerializeResultEvent.

Method will be called, when ContentEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Annotations
@Override
onDataReceivedEventback to summary
public void onDataReceivedEvent(Connection<L> connection, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onDataReceivedEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onDataReceivedEvent.

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

Annotations
@Override
onDataSentEventback to summary
public void onDataSentEvent(Connection<L> connection, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onDataSentEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onDataSentEvent.

Method will be called, when Buffer, produced by the HttpCodecFilter will be ready to go to the next org.glassfish.grizzly.filterchain.Filter in the chain and finally written on wire.

Annotations
@Override
onErrorEventback to summary
public void onErrorEvent(Connection<L> connection, HttpPacket httpPacket, Throwable error)

Implements org.glassfish.grizzly.http.HttpProbe.onErrorEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onErrorEvent.

Method will be called, when error occurs during the HttpCodecFilter processing.

Annotations
@Override
onHeaderParseEventback to summary
public void onHeaderParseEvent(Connection<L> connection, HttpHeader header, int size)

Implements org.glassfish.grizzly.http.HttpProbe.onHeaderParseEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onHeaderParseEvent.

Method will be called, when HTTP message header gets parsed (either request or response).

Annotations
@Override
onHeaderSerializeEventback to summary
public void onHeaderSerializeEvent(Connection<L> connection, HttpHeader header, Buffer buffer)

Implements org.glassfish.grizzly.http.HttpProbe.onHeaderSerializeEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onHeaderSerializeEvent.

Method will be called, when HTTP message header gets serialized (either request or response).

Annotations
@Override
onTransferEncodingParseEventback to summary
public void onTransferEncodingParseEvent(Connection<L> connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onTransferEncodingParseEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onTransferEncodingParseEvent.

Method will be called, when TransferEncoding will be applied during the parsing/decoding of the certain HTTP message content chunk.

Annotations
@Override
onTransferEncodingSerializeEventback to summary
public void onTransferEncodingSerializeEvent(Connection<L> connection, HttpHeader header, Buffer buffer, TransferEncoding transferEncoding)

Implements org.glassfish.grizzly.http.HttpProbe.onTransferEncodingSerializeEvent.

Doc from org.glassfish.grizzly.http.HttpProbe.onTransferEncodingSerializeEvent.

Method will be called, when TransferEncoding will be applied during the serialization/encoding of the certain HTTP message content chunk.

Annotations
@Override