akka.http.javadsl

Http

class Http extends Extension

Source
Http.scala
Linear Supertypes
Extension, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Http
  2. Extension
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Http(system: ExtendedActorSystem)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Http to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Http, B)

    Implicit information
    This member is added by an implicit conversion from Http to ArrowAssoc[Http] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def bind(interface: String, port: Int, backlog: Int, options: Iterable[SocketOption], settings: ServerSettings, log: LoggingAdapter, materializer: FlowMaterializer): Source[IncomingConnection, Future[ServerBinding]]

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

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

  10. def bind(interface: String, port: Int, materializer: FlowMaterializer): Source[IncomingConnection, Future[ServerBinding]]

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

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

  11. def bindAndHandle(handler: Flow[HttpRequest, HttpResponse, _], interface: String, port: Int, backlog: Int, options: Iterable[SocketOption], settings: ServerSettings, log: LoggingAdapter, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  12. def bindAndHandle(handler: Flow[HttpRequest, HttpResponse, _], interface: String, port: Int, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  13. def bindAndHandleAsync(handler: Function[HttpRequest, Future[HttpResponse]], interface: String, port: Int, backlog: Int, options: Iterable[SocketOption], settings: ServerSettings, log: LoggingAdapter, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  14. def bindAndHandleAsync(handler: Function[HttpRequest, Future[HttpResponse]], interface: String, port: Int, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  15. def bindAndHandleSync(handler: Function[HttpRequest, HttpResponse], interface: String, port: Int, backlog: Int, options: Iterable[SocketOption], settings: ServerSettings, log: LoggingAdapter, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  16. def bindAndHandleSync(handler: Function[HttpRequest, HttpResponse], interface: String, port: Int, materializer: FlowMaterializer): Future[ServerBinding]

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

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

    Note that there is no backpressure being applied to the connections Source, i.e. all connections are being accepted at maximum rate, which, depending on the applications, might present a DoS risk!

  17. def cachedHostConnectionPool[T](setup: HostConnectionPoolSetup, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

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

    Returns a 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 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.

  18. def cachedHostConnectionPool[T](host: String, port: Int, options: Iterable[SocketOption], settings: ConnectionPoolSettings, log: LoggingAdapter, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

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

    Returns a 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 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.

  19. def cachedHostConnectionPool[T](host: String, port: Int, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

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

    Returns a 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 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.

  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def ensuring(cond: (Http) ⇒ Boolean, msg: ⇒ Any): Http

    Implicit information
    This member is added by an implicit conversion from Http to Ensuring[Http] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: (Http) ⇒ Boolean): Http

    Implicit information
    This member is added by an implicit conversion from Http to Ensuring[Http] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean, msg: ⇒ Any): Http

    Implicit information
    This member is added by an implicit conversion from Http to Ensuring[Http] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. def ensuring(cond: Boolean): Http

    Implicit information
    This member is added by an implicit conversion from Http to Ensuring[Http] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  27. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Http to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  29. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. def newHostConnectionPool[T](setup: HostConnectionPoolSetup, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

    Starts a new connection pool to the given host and configuration and returns a 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 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.

  34. def newHostConnectionPool[T](host: String, port: Int, options: Iterable[SocketOption], settings: ConnectionPoolSettings, log: LoggingAdapter, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

    Starts a new connection pool to the given host and configuration and returns a 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 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.

  35. def newHostConnectionPool[T](host: String, port: Int, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool]

    Starts a new connection pool to the given host and configuration and returns a 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 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.

  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def outgoingConnection(host: String, port: Int, localAddress: Option[InetSocketAddress], options: Iterable[SocketOption], settings: ClientConnectionSettings, log: LoggingAdapter): Flow[HttpRequest, HttpResponse, Future[OutgoingConnection]]

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

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

  39. def outgoingConnection(host: String, port: Int): Flow[HttpRequest, HttpResponse, Future[OutgoingConnection]]

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

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

  40. def shutdownAllConnectionPools(): Future[Unit]

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

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

  41. def singleRequest(request: HttpRequest, options: Iterable[SocketOption], settings: ConnectionPoolSettings, log: LoggingAdapter, materializer: FlowMaterializer): Future[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.

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

  42. def singleRequest(request: HttpRequest, materializer: FlowMaterializer): Future[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.

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

  43. def superPool[T](options: Iterable[SocketOption], settings: ConnectionPoolSettings, log: LoggingAdapter, materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), Unit]

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

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URI. 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.

  44. def superPool[T](materializer: FlowMaterializer): Flow[(HttpRequest, T), (Try[HttpResponse], T), Unit]

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

    Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URI. 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.

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def [B](y: B): (Http, B)

    Implicit information
    This member is added by an implicit conversion from Http to ArrowAssoc[Http] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Http to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (http: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Http to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (http: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Http

    Implicit information
    This member is added by an implicit conversion from Http to ArrowAssoc[Http] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (http: ArrowAssoc[Http]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Http

    Implicit information
    This member is added by an implicit conversion from Http to Ensuring[Http] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (http: Ensuring[Http]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Http to StringAdd

Inherited by implicit conversion any2stringfmt from Http to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Http to ArrowAssoc[Http]

Inherited by implicit conversion any2Ensuring from Http to Ensuring[Http]

Ungrouped