Package io.fusionauth.http.server
Class HTTPS11Processor
java.lang.Object
io.fusionauth.http.server.HTTPS11Processor
- All Implemented Interfaces:
HTTPProcessor
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHTTPS11Processor(HTTP11Processor delegate, HTTPServerConfiguration configuration, HTTPListenerConfiguration listenerConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionclose(boolean endOfStream) Closes the processing.voidSignals to the processor that the request handling failed in some way.intTLS so we need to read and write during the handshake.longlastUsed()read(ByteBuffer buffer) Allows the HTTPProcessor to handle bytes that were read.longstate()voidupdateDelegate(HTTP11Processor delegate) Updates the delegate in order to reset the state of it (HTTP state machine).longwrote(long num) Called by the selector to tell the HTTPProcessor that bytes were written back to the client.
-
Constructor Details
-
HTTPS11Processor
public HTTPS11Processor(HTTP11Processor delegate, HTTPServerConfiguration configuration, HTTPListenerConfiguration listenerConfiguration) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-
-
Method Details
-
close
Description copied from interface:HTTPProcessorCloses the processing. In some cases, the process of closing a connection might require additional work, like shutting down TLS. Therefore, this method can interrupt a normal shutdown.- Specified by:
closein interfaceHTTPProcessor- Parameters:
endOfStream- True if the stream is being closed due to an unexpected end-of-stream.- Returns:
- The new state of the processor.
-
failure
Description copied from interface:HTTPProcessorSignals to the processor that the request handling failed in some way.- Specified by:
failurein interfaceHTTPProcessor- Parameters:
t- The exception that caused the failure, it there was one.
-
initialKeyOps
public int initialKeyOps()TLS so we need to read and write during the handshake.- Specified by:
initialKeyOpsin interfaceHTTPProcessor- Returns:
SelectionKey.OP_READ|SelectionKey.OP_WRITE- See Also:
-
lastUsed
public long lastUsed()- Specified by:
lastUsedin interfaceHTTPProcessor- Returns:
- The delegate's lastUsed().
-
read
Description copied from interface:HTTPProcessorAllows the HTTPProcessor to handle bytes that were read.- Specified by:
readin interfaceHTTPProcessor- Parameters:
buffer- The bytes read from the client.- Returns:
- The new state of the HTTPProcessor.
- Throws:
IOException- If any I/O operations failed.
-
readBuffer
- Specified by:
readBufferin interfaceHTTPProcessor- Returns:
- The current read buffer or null if the state has changed or there we aren't expecting to read.
-
readThroughput
public long readThroughput()- Specified by:
readThroughputin interfaceHTTPProcessor- Returns:
- The bytes per second throughput read by this processor.
-
state
- Specified by:
statein interfaceHTTPProcessor- Returns:
- The current state of the HTTPProcessor.
-
updateDelegate
Updates the delegate in order to reset the state of it (HTTP state machine). This also resets the TLS state back to a BodyRead- Parameters:
delegate- The new delegate.
-
writeBuffers
- Specified by:
writeBuffersin interfaceHTTPProcessor- Returns:
- The current write buffer(s) and never null.
- Throws:
IOException- If any I/O operations failed.
-
writeThroughput
public long writeThroughput()- Specified by:
writeThroughputin interfaceHTTPProcessor- Returns:
- The bytes per second throughput wrote by this processor.
-
wrote
Description copied from interface:HTTPProcessorCalled by the selector to tell the HTTPProcessor that bytes were written back to the client.- Specified by:
wrotein interfaceHTTPProcessor- Parameters:
num- The number of bytes written.- Returns:
- The new state of the HTTPProcessor.
- Throws:
IOException- If any I/O operations failed.
-