java.lang.Object
net.i2p.i2ptunnel.I2PTunnelHTTPClientBase.OnTimeout
- All Implemented Interfaces:
I2PTunnelRunner.FailCallback
- Enclosing class:
I2PTunnelHTTPClientBase
protected class I2PTunnelHTTPClientBase.OnTimeoutextends Object implements I2PTunnelRunner.FailCallback
Callback for timeout events.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanTrue if the request arrived over SSL.private final OutputStreamStream the response is written to.private final longId pairing the request with its logs.private final SocketThe browser socket being served.private final StringThe request target URL.private final StringThe host name being requested.private final booleanTrue when an outproxy serves the request.private final StringThe proxy chosen for the request, may be null.Constructor Summary
ConstructorsConstructorDescriptionOnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id) Create a timeout callback.OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id, String targetHost, boolean isSSL) Create a timeout callback with host tracking.Method Summary
Field Details
_socket
The browser socket being served._out
Stream the response is written to._target
The request target URL._usingProxy
private final boolean _usingProxyTrue when an outproxy serves the request._wwwProxy
The proxy chosen for the request, may be null._requestId
private final long _requestIdId pairing the request with its logs._targetHost
The host name being requested._isSSL
private final boolean _isSSLTrue if the request arrived over SSL.
Constructor Details
OnTimeout
public OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id) Create a timeout callback.- Parameters:
s- the client socketout- the output streamtarget- the URI for an HTTP request, or the host name for CONNECTusingProxy- whether a WWW outproxy is in usewwwProxy- the outproxy destinationid- the request identifier
OnTimeout
public OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id, String targetHost, boolean isSSL) Create a timeout callback with host tracking.- Parameters:
s- the client socketout- the output streamtarget- the URI for an HTTP request, or the host name for CONNECTusingProxy- whether a WWW outproxy is in usewwwProxy- the outproxy destinationid- the request identifiertargetHost- if non-null, callI2PTunnelHTTPClientBase.noteProxyResult(String, String, boolean, boolean)with this as hostisSSL- to pass to noteProxyResult(). FALSE for ConnectClient.
Method Details
onFail
Handle a failed proxy request.- Specified by:
onFailin interfaceI2PTunnelRunner.FailCallback- Parameters:
ex- may be null