Class HttpConnection
java.lang.Object
org.glassfish.jersey.jdk.connector.internal.HttpConnection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class(package private) static enum(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectorConfigurationprivate Future<?> private final CookieManagerprivate Throwableprivate final Filter<HttpRequest, HttpResponse, HttpRequest, HttpResponse> private HttpRequestprivate HttpResponseprivate Future<?> private static final intInput buffer that is used byTransportFilterwhen SSL is not turned on.private static final Loggerprivate booleanprivate Future<?> private final ScheduledExecutorServiceprivate static final intInput buffer that is used byTransportFilterwhen SSL is turned on.(package private) HttpConnection.Stateprivate final HttpConnection.StateChangeListenerprivate final URI -
Constructor Summary
ConstructorsConstructorDescriptionHttpConnection(URI uri, CookieManager cookieManager, ConnectorConfiguration configuration, ScheduledExecutorService scheduler, HttpConnection.StateChangeListener stateListener) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidprivate voidprivate voidprivate voidprivate voidchangeState(HttpConnection.State newState) private void(package private) voidclose()(package private) voidconnect()protected Filter<HttpRequest, HttpResponse, HttpRequest, HttpResponse> createFilterChain(URI uri, ConnectorConfiguration configuration) (package private) ThrowablegetError()(package private) HttpResponseprivate voidprivate voidprivate voidprivate voidprocessResponseHeaders(HttpResponse response) private voidprivate voidprivate void(package private) voidsend(HttpRequest httpRequest)
-
Field Details
-
SSL_INPUT_BUFFER_SIZE
private static final int SSL_INPUT_BUFFER_SIZEInput buffer that is used byTransportFilterwhen SSL is turned on. The size cannot be smaller than a maximal size of a SSL packet, which is 16kB for payload + header, becauseSslFilterdoes not have its own buffer for buffering incoming data and therefore the entire SSL packet must fit intoSslFilterinput buffer.- See Also:
-
INPUT_BUFFER_SIZE
private static final int INPUT_BUFFER_SIZEInput buffer that is used byTransportFilterwhen SSL is not turned on.- See Also:
-
LOGGER
-
filterChain
-
cookieManager
-
uri
-
stateListener
-
scheduler
-
configuration
-
httpRequest
-
httResponse
-
error
-
state
-
persistentConnection
private boolean persistentConnection -
responseTimeout
-
idleTimeout
-
connectTimeout
-
-
Constructor Details
-
HttpConnection
HttpConnection(URI uri, CookieManager cookieManager, ConnectorConfiguration configuration, ScheduledExecutorService scheduler, HttpConnection.StateChangeListener stateListener)
-
-
Method Details
-
connect
void connect() -
send
-
close
void close() -
handleHeaderSent
private void handleHeaderSent() -
addRequestHeaders
private void addRequestHeaders() -
processResponseHeaders
- Throws:
IOException
-
createFilterChain
protected Filter<HttpRequest,HttpResponse, createFilterChainHttpRequest, HttpResponse> (URI uri, ConnectorConfiguration configuration) -
changeState
-
scheduleResponseTimeout
private void scheduleResponseTimeout() -
cancelResponseTimeout
private void cancelResponseTimeout() -
scheduleConnectTimeout
private void scheduleConnectTimeout() -
cancelConnectTimeout
private void cancelConnectTimeout() -
scheduleIdleTimeout
private void scheduleIdleTimeout() -
cancelIdleTimeout
private void cancelIdleTimeout() -
cancelAllTimeouts
private void cancelAllTimeouts() -
handleError
-
changeStateToIdle
private void changeStateToIdle() -
getError
Throwable getError() -
getHttResponse
HttpResponse getHttResponse() -
handleResponseRead
private void handleResponseRead()
-