Packages

class Http extends Extension

Source
Http.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Http
  2. Extension
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Http(system: ExtendedActorSystem)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Http toany2stringadd[Http] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Http, B)
    Implicit
    This member is added by an implicit conversion from Http toArrowAssoc[Http] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cachedHostConnectionPool[T](to: ConnectHttp, settings: ConnectionPoolSettings, log: LoggingAdapter): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint.

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned akka.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

    The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

    To configure additional settings for the pool (and requests made using it), use the akka.http.host-connection-pool config section or pass in a ConnectionPoolSettings explicitly.

  8. def cachedHostConnectionPool[T](to: ConnectHttp): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint.

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned akka.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

    The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  9. def cachedHostConnectionPool[T](host: String): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint.

    Returns a akka.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned akka.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

    The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  10. def cachedHostConnectionPoolHttps[T](to: ConnectHttp): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Same as cachedHostConnectionPool but with HTTPS encryption.

    Same as cachedHostConnectionPool but with HTTPS encryption.

    When an HttpConnectionContext is defined in the given ConnectHttp it will be used, otherwise the default client-side context will be used.

  11. def cachedHostConnectionPoolHttps[T](to: ConnectHttp, settings: ConnectionPoolSettings, log: LoggingAdapter): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Same as cachedHostConnectionPool but with HTTPS encryption.

    Same as cachedHostConnectionPool but with HTTPS encryption.

    When an HttpConnectionContext is defined in the given ConnectHttp it will be used, otherwise the default client-side context will be used.

  12. def clientLayer(hostHeader: Host, settings: ClientConnectionSettings, log: LoggingAdapter): BidiFlow[HttpRequest, SslTlsOutbound, SslTlsInbound, HttpResponse, NotUsed]

    Constructs a client layer stage using the given ClientConnectionSettings.

  13. def clientLayer(hostHeader: Host, settings: ClientConnectionSettings): BidiFlow[HttpRequest, SslTlsOutbound, SslTlsInbound, HttpResponse, NotUsed]

    Constructs a client layer stage using the given akka.http.javadsl.settings.ClientConnectionSettings.

  14. def clientLayer(hostHeader: Host): BidiFlow[HttpRequest, SslTlsOutbound, SslTlsInbound, HttpResponse, NotUsed]

    Constructs a client layer stage using the configured default akka.http.javadsl.settings.ClientConnectionSettings.

  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  16. def connectionTo(host: String): OutgoingConnectionBuilder

    Creates a builder which will create a single connection to a host every time the built flow is materialized.

    Creates a builder which will create a single connection to a host every time the built flow is materialized. There is no pooling and you are yourself responsible for lifecycle management of the connection. For a more convenient Request level API see singleRequest()

    returns

    A builder to configure more specific setup for the connection and then build a Flow>Request, Response, CompletionStage>OutgoingConnection>>.

  17. def defaultClientHttpsContext: HttpsConnectionContext

    Gets the current default client-side ConnectionContext.

  18. def ensuring(cond: (Http) => Boolean, msg: => Any): Http
    Implicit
    This member is added by an implicit conversion from Http toEnsuring[Http] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (Http) => Boolean): Http
    Implicit
    This member is added by an implicit conversion from Http toEnsuring[Http] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: => Any): Http
    Implicit
    This member is added by an implicit conversion from Http toEnsuring[Http] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): Http
    Implicit
    This member is added by an implicit conversion from Http toEnsuring[Http] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def newHostConnectionPool[T](to: ConnectHttp, settings: ConnectionPoolSettings, log: LoggingAdapter, materializer: Materializer): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Same as newHostConnectionPool but with HTTPS encryption.

    Same as newHostConnectionPool but with HTTPS encryption.

    The given ConnectionContext will be used for encryption on the connection.

  29. def newHostConnectionPool[T](to: ConnectHttp, materializer: Materializer): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Starts a new connection pool to the given host and configuration and returns a akka.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool.

    Starts a new connection pool to the given host and configuration and returns a akka.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool. While the started host connection pool internally shuts itself down automatically after the configured idle timeout it will spin itself up again if more requests arrive from an existing or a new client flow materialization. The returned flow therefore remains usable for the full lifetime of the application.

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  30. def newHostConnectionPool[T](host: String, materializer: Materializer): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], HostConnectionPool]

    Starts a new connection pool to the given host and configuration and returns a akka.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool.

    Starts a new connection pool to the given host and configuration and returns a akka.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool. While the started host connection pool internally shuts itself down automatically after the configured idle timeout it will spin itself up again if more requests arrive from an existing or a new client flow materialization. The returned flow therefore remains usable for the full lifetime of the application.

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  31. def newServerAt(interface: String, port: Int): ServerBuilder

    Main entry point to create a server binding.

    Main entry point to create a server binding.

    interface

    The interface to bind to.

    port

    The port to bind to or 0 if the port should be automatically assigned.

  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  34. def outgoingConnection(to: ConnectHttp, localAddress: Optional[InetSocketAddress], settings: ClientConnectionSettings, log: LoggingAdapter): Flow[HttpRequest, HttpResponse, CompletionStage[OutgoingConnection]]

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint.

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

    Prefer connectionTo over this method.

  35. def outgoingConnection(to: ConnectHttp): Flow[HttpRequest, HttpResponse, CompletionStage[OutgoingConnection]]

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint.

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

    Use the ConnectHttp DSL to configure target host and whether HTTPS should be used.

    Prefer connectionTo over this method.

  36. def outgoingConnection(host: String): Flow[HttpRequest, HttpResponse, CompletionStage[OutgoingConnection]]

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint.

    Creates a akka.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

    If the hostname is given with an https:// prefix, the default HttpsConnectionContext will be used.

    Prefer connectionTo over this method.

  37. def serverLayer(settings: ServerSettings, remoteAddress: Optional[InetSocketAddress], log: LoggingAdapter): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed]

    Constructs a server layer stage using the given ServerSettings.

    Constructs a server layer stage using the given ServerSettings. The returned akka.stream.javadsl.BidiFlow isn't reusable and can only be materialized once. The remoteAddress, if provided, will be added as a header to each HttpRequest this layer produces if the akka.http.server.remote-address-header configuration option is enabled.

  38. def serverLayer(settings: ServerSettings, remoteAddress: Optional[InetSocketAddress]): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed]

    Constructs a server layer stage using the given akka.http.javadsl.settings.ServerSettings.

    Constructs a server layer stage using the given akka.http.javadsl.settings.ServerSettings. The returned akka.stream.javadsl.BidiFlow isn't reusable and can only be materialized once. The remoteAddress, if provided, will be added as a header to each HttpRequest this layer produces if the akka.http.server.remote-address-header configuration option is enabled.

  39. def serverLayer(settings: ServerSettings): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed]

    Constructs a server layer stage using the given akka.http.javadsl.settings.ServerSettings.

    Constructs a server layer stage using the given akka.http.javadsl.settings.ServerSettings. The returned akka.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.

  40. def serverLayer(): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed]

    Constructs a server layer stage using the configured default akka.http.javadsl.settings.ServerSettings.

    Constructs a server layer stage using the configured default akka.http.javadsl.settings.ServerSettings. The returned akka.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.

  41. def setDefaultClientHttpsContext(context: HttpsConnectionContext): Unit

    Sets the default client-side ConnectionContext.

  42. def shutdownAllConnectionPools(): CompletionStage[Unit]

    Triggers an orderly shutdown of all host connections pools currently maintained by the akka.actor.ActorSystem.

    Triggers an orderly shutdown of all host connections pools currently maintained by the akka.actor.ActorSystem. The returned future is completed when all pools that were live at the time of this method call have completed their shutdown process.

    If existing pool client flows are re-used or new ones materialized concurrently with or after this method call the respective connection pools will be restarted and not contribute to the returned future.

  43. def singleRequest(request: HttpRequest, connectionContext: HttpsConnectionContext, settings: ConnectionPoolSettings, log: LoggingAdapter): CompletionStage[HttpResponse]

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    The given HttpsConnectionContext will be used for encryption if the request is sent to an https endpoint.

    Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

  44. def singleRequest(request: HttpRequest, connectionContext: HttpsConnectionContext): CompletionStage[HttpResponse]

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    The defaultClientHttpsContext is used to configure TLS for the connection.

    Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

  45. def singleRequest(request: HttpRequest): CompletionStage[HttpResponse]

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

    The defaultClientHttpsContext is used to configure TLS for the connection.

    Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

  46. def singleWebSocketRequest[T](request: WebSocketRequest, clientFlow: Flow[Message, Message, T], connectionContext: ConnectionContext, localAddress: Optional[InetSocketAddress], settings: ClientConnectionSettings, log: LoggingAdapter, materializer: Materializer): Pair[CompletionStage[WebSocketUpgradeResponse], T]

    Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

  47. def singleWebSocketRequest[T](request: WebSocketRequest, clientFlow: Flow[Message, Message, T], connectionContext: ConnectionContext, materializer: Materializer): Pair[CompletionStage[WebSocketUpgradeResponse], T]

    Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

    Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

    The defaultClientHttpsContext is used to configure TLS for the connection.

  48. def singleWebSocketRequest[T](request: WebSocketRequest, clientFlow: Flow[Message, Message, T], materializer: Materializer): Pair[CompletionStage[WebSocketUpgradeResponse], T]

    Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

    Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

    The defaultClientHttpsContext is used to configure TLS for the connection.

  49. def superPool[T](settings: ConnectionPoolSettings, log: LoggingAdapter): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], NotUsed]

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs.

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

    The defaultClientHttpsContext is used to configure TLS for the connection.

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A.

    In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  50. def superPool[T](settings: ConnectionPoolSettings, connectionContext: HttpsConnectionContext, log: LoggingAdapter): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], NotUsed]

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs.

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

    The given HttpsConnectionContext is used to configure TLS for the connection.

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A.

    In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  51. def superPool[T](): Flow[Pair[HttpRequest, T], Pair[Try[HttpResponse], T], NotUsed]

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs.

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

    Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

  52. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  53. def toString(): String
    Definition Classes
    AnyRef → Any
  54. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. def webSocketClientFlow(request: WebSocketRequest, connectionContext: ConnectionContext, localAddress: Optional[InetSocketAddress], settings: ClientConnectionSettings, log: LoggingAdapter): Flow[Message, Message, CompletionStage[WebSocketUpgradeResponse]]

    Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

    Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

    The layer is not reusable and must only be materialized once.

  58. def webSocketClientFlow(request: WebSocketRequest): Flow[Message, Message, CompletionStage[WebSocketUpgradeResponse]]

    Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

    Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

    The layer is not reusable and must only be materialized once.

  59. def webSocketClientLayer(request: WebSocketRequest, settings: ClientConnectionSettings, log: LoggingAdapter): BidiFlow[Message, SslTlsOutbound, SslTlsInbound, Message, CompletionStage[WebSocketUpgradeResponse]]

    Constructs a WebSocket akka.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the akka.http.client config section.

    Constructs a WebSocket akka.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the akka.http.client config section.

    The layer is not reusable and must only be materialized once.

  60. def webSocketClientLayer(request: WebSocketRequest, settings: ClientConnectionSettings): BidiFlow[Message, SslTlsOutbound, SslTlsInbound, Message, CompletionStage[WebSocketUpgradeResponse]]

    Constructs a WebSocket akka.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the akka.http.client config section.

    Constructs a WebSocket akka.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the akka.http.client config section.

    The layer is not reusable and must only be materialized once.

  61. def webSocketClientLayer(request: WebSocketRequest): BidiFlow[Message, SslTlsOutbound, SslTlsInbound, Message, CompletionStage[WebSocketUpgradeResponse]]

    Constructs a WebSocket akka.stream.javadsl.BidiFlow.

    Constructs a WebSocket akka.stream.javadsl.BidiFlow.

    The layer is not reusable and must only be materialized once.

Deprecated Value Members

  1. def bind(connect: ConnectHttp, settings: ServerSettings, log: LoggingAdapter): Source[IncomingConnection, CompletionStage[ServerBinding]]

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    If the given port is 0 the resulting source can be materialized several times. Each materialization will then be assigned a new local port by the operating system, which can then be retrieved by the materialized ServerBinding.

    If the given port is non-zero subsequent materialization attempts of the produced source will immediately fail, unless the first materialization has already been unbound. Unbinding can be triggered via the materialized ServerBinding.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  2. def bind(connect: ConnectHttp, settings: ServerSettings): Source[IncomingConnection, CompletionStage[ServerBinding]]

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    If the given port is 0 the resulting source can be materialized several times. Each materialization will then be assigned a new local port by the operating system, which can then be retrieved by the materialized ServerBinding.

    If the given port is non-zero subsequent materialization attempts of the produced source will immediately fail, unless the first materialization has already been unbound. Unbinding can be triggered via the materialized ServerBinding.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  3. def bind(connect: ConnectHttp): Source[IncomingConnection, CompletionStage[ServerBinding]]

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    Creates a akka.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    If the given port is 0 the resulting source can be materialized several times. Each materialization will then be assigned a new local port by the operating system, which can then be retrieved by the materialized ServerBinding.

    If the given port is non-zero subsequent materialization attempts of the produced source will immediately fail, unless the first materialization has already been unbound. Unbinding can be triggered via the materialized ServerBinding.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  4. def bindAndHandle(handler: Flow[HttpRequest, HttpResponse, _], connect: ConnectHttp, settings: ServerSettings, log: LoggingAdapter, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler akka.stream.javadsl.Flow for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler akka.stream.javadsl.Flow for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  5. def bindAndHandle(handler: Flow[HttpRequest, HttpResponse, _], connect: ConnectHttp, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler akka.stream.javadsl.Flow for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler akka.stream.javadsl.Flow for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  6. def bindAndHandleAsync(handler: Function[HttpRequest, CompletionStage[HttpResponse]], connect: ConnectHttp, settings: ServerSettings, parallelism: Int, log: LoggingAdapter, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  7. def bindAndHandleAsync(handler: Function[HttpRequest, CompletionStage[HttpResponse]], connect: ConnectHttp, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  8. def bindAndHandleSync(handler: Function[HttpRequest, HttpResponse], connect: ConnectHttp, settings: ServerSettings, log: LoggingAdapter, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  9. def bindAndHandleSync(handler: Function[HttpRequest, HttpResponse], connect: ConnectHttp, materializer: Materializer): CompletionStage[ServerBinding]

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    Convenience method which starts a new HTTP server at the given endpoint and uses the given handler function for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the akka.http.server.max-connections setting. Please see the documentation in the reference.conf for more information about what kind of guarantees to expect.

    The server will be bound using HTTPS if the ConnectHttp object is configured with an HttpsConnectionContext, or the defaultServerHttpContext has been configured to be an HttpsConnectionContext.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Use newServerAt instead

  10. def defaultServerHttpContext: ConnectionContext

    Gets the current default server-side ConnectionContext – defaults to plain HTTP.

    Gets the current default server-side ConnectionContext – defaults to plain HTTP. Can be modified using setDefaultServerHttpContext, and will then apply for servers bound after that call has completed.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Set context explicitly when binding

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  12. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Http toStringFormat[Http] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  13. def setDefaultServerHttpContext(context: ConnectionContext): Unit

    Sets the default server-side ConnectionContext.

    Sets the default server-side ConnectionContext. If it is an instance of HttpsConnectionContext then the server will be bound using HTTPS.

    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version 10.2.0) Set context explicitly when binding

  14. def [B](y: B): (Http, B)
    Implicit
    This member is added by an implicit conversion from Http toArrowAssoc[Http] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromHttp to any2stringadd[Http]

Inherited by implicit conversion StringFormat fromHttp to StringFormat[Http]

Inherited by implicit conversion Ensuring fromHttp to Ensuring[Http]

Inherited by implicit conversion ArrowAssoc fromHttp to ArrowAssoc[Http]

Ungrouped