Class

com.twitter.finagle.server

DefaultServer

Related Doc: package server

Permalink

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.

serviceTransport

The function used to bind an accepted Transport with a Service. Requests read from the transport are dispatched onto the Service, with replies written back.

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
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]] = ...)

    Permalink

    listener

    The Listener from which to accept new typed Transports.

    serviceTransport

    The function used to bind an accepted Transport with a Service. Requests read from the transport are dispatched onto the Service, with replies written back.

    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

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

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

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

    Permalink
    Definition Classes
    Any
  5. val cancelOnHangup: Boolean

    Permalink

    Enabled by default.

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

  6. def clone(): AnyRef

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

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

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

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

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

    Permalink

    The Listener from which to accept new typed Transports.

  13. val logger: Logger

    Permalink
  14. val maxConcurrentRequests: Int

    Permalink

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

  15. val monitor: Monitor

    Permalink
  16. val name: String

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

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

    Permalink
  19. final def notify(): Unit

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

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

    Permalink

    Prepare the given ServiceFactory before use.

  22. val reporter: ReporterFactory

    Permalink
  23. val requestTimeout: Duration

    Permalink

    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

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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(name: String, addr: SocketAddress, service: Service[Req, Rep]): ListeningServer

    Permalink

    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. def serveAndAnnounce(name: String, addr: SocketAddress, service: ServiceFactory[Req, Rep]): ListeningServer

    Permalink

    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
  34. val serviceTransport: (Transport[In, Out], Service[Req, Rep]) ⇒ Closable

    Permalink

    The function used to bind an accepted Transport with a Service.

    The function used to bind an accepted Transport with a Service. Requests read from the transport are dispatched onto the Service, with replies written back.

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

    Permalink
  36. val statsReceiver: StatsReceiver

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

    Permalink
    Definition Classes
    AnyRef
  38. val timer: Timer

    Permalink
  39. val tracer: Tracer

    Permalink
  40. val underlying: StackServer[Req, Rep]

    Permalink
  41. final def wait(): Unit

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

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

    Permalink
    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