Package io.fusionauth.http.server
Class CountingInstrumenter
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.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.longlonglonglonglonglonglonglonglongvoidreadFromClient(long bytes) Called when bytes are read from a client.voidCalled when the server is started.voidSignals that a virtual thread has exited.voidSignals that a virtual thread has started.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.- Specified by:
acceptedConnectionin interfaceInstrumenter
-
badRequest
public void badRequest()Description copied from interface:InstrumenterCalled when a client sends in a bad HTTP request.- 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.- Specified by:
connectionClosedin interfaceInstrumenter
-
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() -
getStartedCount
public long getStartedCount() -
getThreadCount
public long getThreadCount() -
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 is started.- Specified by:
serverStartedin interfaceInstrumenter
-
threadExited
public void threadExited()Description copied from interface:InstrumenterSignals that a virtual thread has exited.- Specified by:
threadExitedin interfaceInstrumenter
-
threadStarted
public void threadStarted()Description copied from interface:InstrumenterSignals that a virtual thread has started.- Specified by:
threadStartedin 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.
-