java.lang.Object
io.fusionauth.http.server.CountingInstrumenter
- All Implemented Interfaces:
Instrumenter
A simple counting instrumenter for the HTTPServer. This is not thread safe, so if you need accurate data, you'll want to use the
ThreadSafeCountingInstrumenter.- Author:
- Brian Pontarelli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when a new client connection is accepted by the HTTP server.voidCalled when a new request is accepted by an HTTP worker.voidCalled when a client sends in a bad HTTP request.voidCalled when a client sends in chunked request data.voidCalled when a client sends in chunked request data.voidCalled when a connection is closed due to an issue or a timeout.longlonglonglonglonglonglonglonglonglongvoidreadFromClient(long bytes) Called when bytes are read from a client.voidCalled when the server listener is started.voidSignals that an HTTP worker has been started.voidSignals that an HTTP worker has been stopped.voidwroteToClient(long bytes) Called when bytes are written to a client.
-
Constructor Details
-
CountingInstrumenter
public CountingInstrumenter()
-
-
Method Details
-
acceptedConnection
public void acceptedConnection()Description copied from interface:InstrumenterCalled when a new client connection is accepted by the HTTP server.- Specified by:
acceptedConnectionin interfaceInstrumenter
-
acceptedRequest
public void acceptedRequest()Description copied from interface:InstrumenterCalled when a new request is accepted by an HTTP worker.- Specified by:
acceptedRequestin interfaceInstrumenter
-
badRequest
public void badRequest()Description copied from interface:InstrumenterCalled when a client sends in a bad HTTP request. A bad request is one that cannot be handled by the HTTP server.- Specified by:
badRequestin interfaceInstrumenter
-
chunkedRequest
public void chunkedRequest()Description copied from interface:InstrumenterCalled when a client sends in chunked request data.- Specified by:
chunkedRequestin interfaceInstrumenter
-
chunkedResponse
public void chunkedResponse()Description copied from interface:InstrumenterCalled when a client sends in chunked request data.- Specified by:
chunkedResponsein interfaceInstrumenter
-
connectionClosed
public void connectionClosed()Description copied from interface:InstrumenterCalled when a connection is closed due to an issue or a timeout. This should not count connections closed in expected conditions such as a keep-alive timeout.- Specified by:
connectionClosedin interfaceInstrumenter
-
getAcceptedRequests
public long getAcceptedRequests() -
getBadRequests
public long getBadRequests() -
getBytesRead
public long getBytesRead() -
getBytesWritten
public long getBytesWritten() -
getChunkedRequests
public long getChunkedRequests() -
getChunkedResponses
public long getChunkedResponses() -
getClosedConnections
public long getClosedConnections() -
getConnections
public long getConnections() -
getServers
public long getServers() -
getWorkers
public long getWorkers() -
readFromClient
public void readFromClient(long bytes) Description copied from interface:InstrumenterCalled when bytes are read from a client.- Specified by:
readFromClientin interfaceInstrumenter- Parameters:
bytes- The number of bytes read.
-
serverStarted
public void serverStarted()Description copied from interface:InstrumenterCalled when the server listener is started. If you have a single listener, you will have one server started. If you have two listeners, one for HTTP and one for HTTPS, you will have two servers started.- Specified by:
serverStartedin interfaceInstrumenter
-
workerStarted
public void workerStarted()Description copied from interface:InstrumenterSignals that an HTTP worker has been started.- Specified by:
workerStartedin interfaceInstrumenter
-
workerStopped
public void workerStopped()Description copied from interface:InstrumenterSignals that an HTTP worker has been stopped.- Specified by:
workerStoppedin interfaceInstrumenter
-
wroteToClient
public void wroteToClient(long bytes) Description copied from interface:InstrumenterCalled when bytes are written to a client.- Specified by:
wroteToClientin interfaceInstrumenter- Parameters:
bytes- The number of bytes written.
-