Package akka.http.javadsl
Class ConnectHttp
- java.lang.Object
-
- akka.http.javadsl.ConnectHttp
-
- Direct Known Subclasses:
ConnectHttpImpl
,ConnectWithHttps
public abstract class ConnectHttp extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConnectHttp()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Optional<HttpsConnectionContext>
connectionContext()
ConnectionContext
effectiveConnectionContext(ConnectionContext fallbackContext)
HttpsConnectionContext
effectiveHttpsConnectionContext(HttpsConnectionContext fallbackContext)
abstract java.lang.String
host()
abstract boolean
isHttps()
abstract int
port()
static ConnectHttp
toHost(Uri uriHost)
Extracts HTTP or HTTPS connection data from given Uri.static ConnectHttp
toHost(java.lang.String host)
Extract HTTP or HTTPS connection data from given host.static ConnectHttp
toHost(java.lang.String host, int port)
Extracts HTTP or HTTPS connection data from given host and port.static ConnectWithHttps
toHostHttps(Uri uriHost)
Extracts HTTPS connection data from given host and port.static ConnectWithHttps
toHostHttps(java.lang.String host)
Extracts HTTPS connection data from given host and port.static ConnectWithHttps
toHostHttps(java.lang.String host, int port)
Extracts HTTPS connection data from given host and port, using the default HTTPS context.java.lang.String
toString()
-
-
-
Method Detail
-
toHost
public static ConnectHttp toHost(Uri uriHost)
Extracts HTTP or HTTPS connection data from given Uri.
-
toHost
public static ConnectHttp toHost(java.lang.String host)
Extract HTTP or HTTPS connection data from given host.The host string may contain a URI or a
: pair. - Parameters:
host
- (undocumented)- Returns:
- (undocumented)
-
toHost
public static ConnectHttp toHost(java.lang.String host, int port)
Extracts HTTP or HTTPS connection data from given host and port.The host string may contain a URI or a
: pair. In both cases the port is ignored. If the given port is 0, a new local port will be assigned by the operating system, which can then be retrieved by the materialized
akka.http.javadsl.Http.ServerBinding
.- Parameters:
host
- (undocumented)port
- (undocumented)- Returns:
- (undocumented)
-
toHostHttps
public static ConnectWithHttps toHostHttps(Uri uriHost) throws java.lang.IllegalArgumentException
Extracts HTTPS connection data from given host and port.Uses the default HTTPS context.
- Parameters:
uriHost
- (undocumented)- Returns:
- (undocumented)
- Throws:
java.lang.IllegalArgumentException
-
toHostHttps
public static ConnectWithHttps toHostHttps(java.lang.String host) throws java.lang.IllegalArgumentException
Extracts HTTPS connection data from given host and port.The host string may contain a URI or a
: pair. Uses the default HTTPS context.
- Parameters:
host
- (undocumented)- Returns:
- (undocumented)
- Throws:
java.lang.IllegalArgumentException
-
toHostHttps
public static ConnectWithHttps toHostHttps(java.lang.String host, int port) throws java.lang.IllegalArgumentException
Extracts HTTPS connection data from given host and port, using the default HTTPS context.The host string may contain a URI or a
: pair. In both cases the port is ignored. If the given port is 0, a new local port will be assigned by the operating system, which can then be retrieved by the materialized
akka.http.javadsl.Http.ServerBinding
.Uses the default HTTPS context.
- Parameters:
host
- (undocumented)port
- (undocumented)- Returns:
- (undocumented)
- Throws:
java.lang.IllegalArgumentException
-
host
public abstract java.lang.String host()
-
port
public abstract int port()
-
isHttps
public abstract boolean isHttps()
-
connectionContext
public abstract java.util.Optional<HttpsConnectionContext> connectionContext()
-
effectiveHttpsConnectionContext
public final HttpsConnectionContext effectiveHttpsConnectionContext(HttpsConnectionContext fallbackContext)
-
effectiveConnectionContext
public final ConnectionContext effectiveConnectionContext(ConnectionContext fallbackContext)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-