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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.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 pekko.http.javadsl.settings.ClientConnectionSettings.

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

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

  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @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. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. 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.

  30. 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 pekko.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 pekko.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 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 pekko.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 pekko.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.

  32. 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.

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

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

    Creates a pekko.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.

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

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

    Creates a pekko.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.

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

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

    Creates a pekko.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.

  38. 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 pekko.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 pekko.http.server.remote-address-header configuration option is enabled.

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

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

    Constructs a server layer stage using the given pekko.http.javadsl.settings.ServerSettings. The returned pekko.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 pekko.http.server.remote-address-header configuration option is enabled.

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

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

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

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

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

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

  42. def setDefaultClientHttpsContext(context: HttpsConnectionContext): Unit

    Sets the default client-side ConnectionContext.

  43. def shutdownAllConnectionPools(): CompletionStage[Unit]

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

    Triggers an orderly shutdown of all host connections pools currently maintained by the pekko.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.

  44. 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.

  45. 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.

  46. 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.

  47. 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.

  48. 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.

  49. 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.

  50. 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.

  51. 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.

  52. 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.

  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  58. 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.

  59. 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.

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

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

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

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

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

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

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

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

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

    Constructs a WebSocket pekko.stream.javadsl.BidiFlow.

    Constructs a WebSocket pekko.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 pekko.stream.javadsl.Source of IncomingConnection instances which represents a prospective HTTP server binding on the given endpoint.

    Creates a pekko.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 Akka HTTP 10.2.0) Use newServerAt instead

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

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

    Creates a pekko.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 Akka HTTP 10.2.0) Use newServerAt instead

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

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

    Creates a pekko.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 Akka HTTP 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 pekko.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 pekko.stream.javadsl.Flow for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the pekko.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 Akka HTTP 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 pekko.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 pekko.stream.javadsl.Flow for processing all incoming connections.

    The number of concurrently accepted connections can be configured by overriding the pekko.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 Akka HTTP 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 pekko.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 Akka HTTP 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 pekko.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 Akka HTTP 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 pekko.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 Akka HTTP 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 pekko.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 Akka HTTP 10.2.0) Use newServerAt instead

  10. def createClientHttpsContext(sslConfig: PekkoSSLConfig): HttpsConnectionContext
    Annotations
    @deprecated
    Deprecated

    (Since version Akka HTTP 10.2.0) use ConnectionContext.httpsClient

  11. def createDefaultClientHttpsContext(): HttpsConnectionContext
    Annotations
    @deprecated
    Deprecated

    (Since version Akka HTTP 10.2.0) use ConnectionContext.httpsClient

  12. def createServerHttpsContext(sslConfig: PekkoSSLConfig): HttpsConnectionContext
    Annotations
    @deprecated
    Deprecated

    (Since version Akka HTTP 10.2.0) use ConnectionContext.httpsServer

  13. 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 Akka HTTP 10.2.0) Set context explicitly when binding

  14. 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.

  15. 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 Akka HTTP 10.2.0) Set context explicitly when binding

  16. 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