cc.spray.can

ServerConfig

case class ServerConfig (host: String, port: Int, serverActorId: String, serviceActorId: String, timeoutActorId: String, timeoutTimeout: Long, serverHeader: String, streamActorCreator: Option[(ChunkedRequestContext) ⇒ Actor], readBufferSize: Int, idleTimeout: Long, reapingCycle: Long, requestTimeout: Long, timeoutCycle: Long, parserConfig: MessageParserConfig) extends PeerConfig with Product with Serializable

The ServerConfig configures an instance of the HttpServer actor.

host

the interface to bind to, default is localhost

port

the port to bind to, default is 8080

serverActorId

the actor id the HttpServer is to receive, default is spray-can-server

serviceActorId

the id of the actor to dispatch the generated RequestContext messages to, default is spray-root-service

timeoutActorId

the id of the actor to dispatch the generated Timeout messages to, default is spray-root-service

timeoutTimeout

the number of milliseconds the timeout actor has to complete the request after having received a Timeout message. If this time has elapsed without the request being completed the HttpServer completes the request by calling its timeoutTimeoutResponse method.

serverHeader

the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered

streamActorCreator

an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages. If None the HttpServer will use a new BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked content before dispatching it as a regular RequestContext to the service actor.

Linear Supertypes
Serializable, Serializable, Product, Equals, PeerConfig, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ServerConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. PeerConfig
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServerConfig (host: String, port: Int, serverActorId: String, serviceActorId: String, timeoutActorId: String, timeoutTimeout: Long, serverHeader: String, streamActorCreator: Option[(ChunkedRequestContext) ⇒ Actor], readBufferSize: Int, idleTimeout: Long, reapingCycle: Long, requestTimeout: Long, timeoutCycle: Long, parserConfig: MessageParserConfig)

    Creates a new ServerConfig

    Creates a new ServerConfig

    host

    the interface to bind to, default is localhost

    port

    the port to bind to, default is 8080

    serverActorId

    the actor id the HttpServer is to receive, default is spray-can-server

    serviceActorId

    the id of the actor to dispatch the generated RequestContext messages to, default is spray-root-service

    timeoutActorId

    the id of the actor to dispatch the generated Timeout messages to, default is spray-root-service

    timeoutTimeout

    the number of milliseconds the timeout actor has to complete the request after having received a Timeout message. If this time has elapsed without the request being completed the HttpServer completes the request by calling its timeoutTimeoutResponse method.

    serverHeader

    the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered

    streamActorCreator

    an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages. If None the HttpServer will use a new BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked content before dispatching it as a regular RequestContext to the service actor.

Value Members

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

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

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def canEqual (arg0: Any): Boolean

    Definition Classes
    ServerConfig → Equals
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def endpoint : InetSocketAddress

  10. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  11. def equals (arg0: Any): Boolean

    Definition Classes
    ServerConfig → Equals → AnyRef → Any
  12. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  14. def hashCode (): Int

    Definition Classes
    ServerConfig → AnyRef → Any
  15. val host : String

    the interface to bind to, default is localhost

  16. val idleTimeout : Long

    The time period in milliseconds that an open HTTP connection has to be idle before automatically being closed.

    The time period in milliseconds that an open HTTP connection has to be idle before automatically being closed. Set to zero to disable connection timeouts.

    Default: 10,000 ms = 10 seconds

    Definition Classes
    ServerConfigPeerConfig
  17. def isInstanceOf [T0] : Boolean

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

    Attributes
    final
    Definition Classes
    AnyRef
  19. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  20. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  21. val parserConfig : MessageParserConfig

    The configuration of the spray-can message parser.

    The configuration of the spray-can message parser.

    Definition Classes
    ServerConfigPeerConfig
  22. val port : Int

    the port to bind to, default is 8080

  23. def productArity : Int

    Definition Classes
    ServerConfig → Product
  24. def productElement (arg0: Int): Any

    Definition Classes
    ServerConfig → Product
  25. def productIterator : Iterator[Any]

    Definition Classes
    Product
  26. def productPrefix : String

    Definition Classes
    ServerConfig → Product
  27. val readBufferSize : Int

    The size of the read buffer used for processing incoming messages.

    The size of the read buffer used for processing incoming messages. Usually there should be little reason to configure it to a value different from its default of 8192 (bytes).

    Definition Classes
    ServerConfigPeerConfig
  28. val reapingCycle : Long

    The reapingCycle is the time in milliseconds between two runs of the "reaper", which is the logic that closes open HTTP connections whose idle timeout has exceeded the configured value.

    The reapingCycle is the time in milliseconds between two runs of the "reaper", which is the logic that closes open HTTP connections whose idle timeout has exceeded the configured value. Larger values (very slightly) increase overall server or client efficiency (since less time is being spent looking for timed out connections) whereas smaller values increase the precision with which idle connections are really closed after the configured idle timeout. The default value is 500, which means that the reaper runs twice per second.

    Definition Classes
    ServerConfigPeerConfig
  29. val requestTimeout : Long

    The time period in milliseconds that are response has to be produced by the application (in the case of the ServerConfig) or received by the server (in the case of the ClientConfig.

    The time period in milliseconds that are response has to be produced by the application (in the case of the ServerConfig) or received by the server (in the case of the ClientConfig. Set to zero to disable request timeouts. The default value is 5000 ms = 5 seconds.

    Definition Classes
    ServerConfigPeerConfig
  30. val serverActorId : String

    the actor id the HttpServer is to receive, default is spray-can-server

  31. val serverHeader : String

    the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered

  32. val serviceActorId : String

    the id of the actor to dispatch the generated RequestContext messages to, default is spray-root-service

  33. val streamActorCreator : Option[(ChunkedRequestContext) ⇒ Actor]

    an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages.

    an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages. If None the HttpServer will use a new BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked content before dispatching it as a regular RequestContext to the service actor.

  34. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  35. val timeoutActorId : String

    the id of the actor to dispatch the generated Timeout messages to, default is spray-root-service

  36. val timeoutCycle : Long

    The timeoutCycle is the time in milliseconds between two runs of the logic that determines which of all open requests have timed out.

    The timeoutCycle is the time in milliseconds between two runs of the logic that determines which of all open requests have timed out. Larger values (very slightly) increase overall server or client efficiency (since less time is being spent looking for timed out requests) whereas smaller values increase the precision with which timed out requests are really reacted on after the configured timeout time has elapsed. The default value is 200.

    Definition Classes
    ServerConfigPeerConfig
  37. val timeoutTimeout : Long

    the number of milliseconds the timeout actor has to complete the request after having received a Timeout message.

    the number of milliseconds the timeout actor has to complete the request after having received a Timeout message. If this time has elapsed without the request being completed the HttpServer completes the request by calling its timeoutTimeoutResponse method.

  38. def toString (): String

    Definition Classes
    ServerConfig → AnyRef → Any
  39. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from PeerConfig

Inherited from AnyRef

Inherited from Any