com.twitter.finagle.server

DefaultServer

Related Doc: package server

case class DefaultServer[Req, Rep, In, Out](name: String, listener: Listener[In, Out], serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable, requestTimeout: Duration = Duration.Top, maxConcurrentRequests: Int = Int.MaxValue, cancelOnHangup: Boolean = true, prepare: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., timer: Timer = DefaultTimer.twitter, monitor: Monitor = DefaultMonitor, logger: Logger = DefaultLogger, statsReceiver: StatsReceiver = ServerStatsReceiver, tracer: Tracer = DefaultTracer, reporter: ReporterFactory = LoadedReporterFactory, newTraceInitializer: Stackable[ServiceFactory[Req, Rep]] = ...) 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, finagle.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 = Duration.Top, maxConcurrentRequests: Int = Int.MaxValue, cancelOnHangup: Boolean = true, prepare: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., timer: Timer = DefaultTimer.twitter, monitor: Monitor = DefaultMonitor, logger: Logger = DefaultLogger, statsReceiver: StatsReceiver = ServerStatsReceiver, tracer: Tracer = DefaultTracer, reporter: ReporterFactory = LoadedReporterFactory, newTraceInitializer: Stackable[ServiceFactory[Req, Rep]] = ...)

    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: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val cancelOnHangup: Boolean

    Enabled by default.

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

  6. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

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

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

    The Listener from which to accept new typed Transports.

  13. val logger: Logger

  14. val maxConcurrentRequests: Int

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

  15. val monitor: Monitor

  16. val name: String

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

    Definition Classes
    AnyRef
  18. val newTraceInitializer: Stackable[ServiceFactory[Req, Rep]]

  19. final def notify(): Unit

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

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

    Prepare the given ServiceFactory before use.

  22. val reporter: ReporterFactory

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

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

    Serve service at addr

    Serve service at addr

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

    Serve service at addr

    Serve service at addr

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

    Serve service at addr

    Serve service at addr

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

    Serve service at addr

    Serve service at addr

    Definition Classes
    Server
  28. 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
  29. 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
  30. 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
  31. def serveAndAnnounce(name: 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
  32. val serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable

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

  34. val statsReceiver: StatsReceiver

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

    Definition Classes
    AnyRef
  36. val timer: Timer

  37. val tracer: Tracer

  38. val underlying: StackServer[Req, Rep]

  39. final def wait(): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. 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 finagle.Server[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped