Package net.targetr.wtm3.io
Interface HttpInterceptor
public interface HttpInterceptor
Intercepts request handling when HttpResponder implements Interception.
- Author:
- Dr Michael Gardiner
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Called when the connection to the client is closed.void
startRequest
(SuperSocket client) HttpHandler has received a new connectionabout about to start communications.void
startResponse
(HttpRequest request, HttpResponse response) The request has be read and response is ready to write.
-
Method Details
-
startRequest
HttpHandler has received a new connectionabout about to start communications.- Parameters:
client
- socket connected to the client.- Throws:
IOException
- an exception occurred starting the interception.
-
startResponse
The request has be read and response is ready to write.Used for aborting interception based on request.
- Parameters:
request
- completed requestresponse
- generated response to intercept- Throws:
IOException
- an exception occurred during the interception.
-
close
Called when the connection to the client is closed.- Throws:
IOException
- an exception occurred after the interception.
-