public interface

HttpRoutedConnection

implements HttpInetConnection
org.apache.http.conn.HttpRoutedConnection
Known Indirect Subclasses

Class Overview

Interface to access routing information of a client side connection.

Summary

Public Methods
abstract HttpRoute getRoute()
Obtains the current route of this connection.
abstract SSLSession getSSLSession()
Obtains the SSL session of the underlying connection, if any.
abstract boolean isSecure()
Indicates whether this connection is secure.
[Expand]
Inherited Methods
From interface org.apache.http.HttpConnection
From interface org.apache.http.HttpInetConnection

Public Methods

public abstract HttpRoute getRoute ()

Also: HttpClient

Obtains the current route of this connection.

Returns
  • the route established so far, or null if not connected

public abstract SSLSession getSSLSession ()

Also: HttpClient

Obtains the SSL session of the underlying connection, if any. If this connection is open, and the underlying socket is an javax.net.ssl.SSLSocket SSLSocket, the SSL session of that socket is obtained. This is a potentially blocking operation.
Note: Whether the underlying socket is an SSL socket can not necessarily be determined via isSecure(). Plain sockets may be considered secure, for example if they are connected to a known host in the same network segment. On the other hand, SSL sockets may be considered insecure, for example depending on the chosen cipher suite.

Returns
  • the underlying SSL session if available, null otherwise

public abstract boolean isSecure ()

Also: HttpClient

Indicates whether this connection is secure. The return value is well-defined only while the connection is open. It may change even while the connection is open.

Returns
  • true if this connection is secure, false otherwise