com.twitter.finagle.server

DefaultServer

case class DefaultServer[Req, Rep, In, Out](name: String, listener: Listener[In, Out], serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable, requestTimeout: Duration = com.twitter.util.Duration.Top, maxConcurrentRequests: Int = scala.Int.MaxValue, cancelOnHangup: Boolean = true, prepare: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., timer: Timer = ..., monitor: Monitor = ..., logger: Logger = ..., statsReceiver: StatsReceiver = ..., tracer: Tracer = ..., reporter: ReporterFactory = ...) extends Server[Req, Rep] with Product with Serializable

The default Server implementation. It is given a Listener (eg. com.twitter.finagle.netty3.Netty3Listener) and a function, serveTransport, that binds a transport and a service. It will then dispatch requests onto a standard service stack parameterized as described below.

listener

The Listener from which to accept new typed Transports.

requestTimeout

The maximum amount of time the server is allowed to handle a request. If the timeout expires, the server will cancel the future and terminate the client connection.

maxConcurrentRequests

The maximum number of concurrent requests the server is willing to handle.

cancelOnHangup

Enabled by default. If disabled, exceptions on the transport do not propagate to the transport.

prepare

Prepare the given ServiceFactory before use.

Linear Supertypes
Serializable, Serializable, Product, Equals, Server[Req, Rep], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultServer
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Server
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultServer(name: String, listener: Listener[In, Out], serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable, requestTimeout: Duration = com.twitter.util.Duration.Top, maxConcurrentRequests: Int = scala.Int.MaxValue, cancelOnHangup: Boolean = true, prepare: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., timer: Timer = ..., monitor: Monitor = ..., logger: Logger = ..., statsReceiver: StatsReceiver = ..., tracer: Tracer = ..., reporter: ReporterFactory = ...)

    listener

    The Listener from which to accept new typed Transports.

    requestTimeout

    The maximum amount of time the server is allowed to handle a request. If the timeout expires, the server will cancel the future and terminate the client connection.

    maxConcurrentRequests

    The maximum number of concurrent requests the server is willing to handle.

    cancelOnHangup

    Enabled by default. If disabled, exceptions on the transport do not propagate to the transport.

    prepare

    Prepare the given ServiceFactory before use.

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. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  7. val cancelOnHangup: Boolean

    Enabled by default.

    Enabled by default. If disabled, exceptions on the transport do not propagate to the transport.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val configured: StackServer[Req, Rep]

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def finalize(): Unit

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

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

    Definition Classes
    Any
  14. val listener: Listener[In, Out]

    The Listener from which to accept new typed Transports.

  15. val logger: Logger

  16. val maxConcurrentRequests: Int

    The maximum number of concurrent requests the server is willing to handle.

  17. val monitor: Monitor

  18. val name: String

  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

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

    Definition Classes
    AnyRef
  22. val prepare: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep]

    Prepare the given ServiceFactory before use.

  23. val reporter: ReporterFactory

  24. val requestTimeout: Duration

    The maximum amount of time the server is allowed to handle a request.

    The maximum amount of time the server is allowed to handle a request. If the timeout expires, the server will cancel the future and terminate the client connection.

  25. def serve(addr: SocketAddress, factory: ServiceFactory[Req, Rep]): ListeningServer

    Serve service at addr

    Serve service at addr

    Definition Classes
    DefaultServerServer
  26. def serve(addr: String, service: Service[Req, Rep]): ListeningServer

    Serve service at addr

    Serve service at addr

    Definition Classes
    Server
  27. def serve(addr: String, service: ServiceFactory[Req, Rep]): ListeningServer

    Serve service at addr

    Serve service at addr

    Definition Classes
    Server
  28. def serve(addr: SocketAddress, service: Service[Req, Rep]): ListeningServer

    Serve service at addr

    Serve service at addr

    Definition Classes
    Server
  29. def serveAndAnnounce(name: String, service: Service[Req, Rep]): ListeningServer

    Serve service at addr and announce with name.

    Serve service at addr and announce with name. Announcements will be removed when the service is closed. Omitting the addr will bind to an ephemeral port.

    Definition Classes
    Server
  30. def serveAndAnnounce(name: String, service: ServiceFactory[Req, Rep]): ListeningServer

    Serve service at addr and announce with name.

    Serve service at addr and announce with name. Announcements will be removed when the service is closed. Omitting the addr will bind to an ephemeral port.

    Definition Classes
    Server
  31. def serveAndAnnounce(name: String, addr: String, service: Service[Req, Rep]): ListeningServer

    Serve service at addr and announce with name.

    Serve service at addr and announce with name. Announcements will be removed when the service is closed. Omitting the addr will bind to an ephemeral port.

    Definition Classes
    Server
  32. def serveAndAnnounce(forum: String, addr: String, service: ServiceFactory[Req, Rep]): ListeningServer

    Serve service at addr and announce with name.

    Serve service at addr and announce with name. Announcements will be removed when the service is closed. Omitting the addr will bind to an ephemeral port.

    Definition Classes
    Server
  33. val serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable

  34. val stack: Stack[ServiceFactory[Req, Rep]]

  35. val statsReceiver: StatsReceiver

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

    Definition Classes
    AnyRef
  37. val timer: Timer

  38. val tracer: Tracer

  39. val underlying: StackServer[Req, Rep]

  40. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Server[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped