Trait

com.twitter.finagle.pushsession

PushStackServer

Related Doc: package pushsession

Permalink

trait PushStackServer[Req, Rep, This <: PushStackServer[Req, Rep, This]] extends ListeningStackServer[Req, Rep, This]

Implementation of ListeningStackServer which uses the push-based abstractions.

Self Type
This
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PushStackServer
  2. ListeningStackServer
  3. WithServerAdmissionControl
  4. WithServerSession
  5. WithServerTransport
  6. CommonParams
  7. StackServer
  8. Transformable
  9. StackBasedServer
  10. Parameterized
  11. Server
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type PipelineRep

    Permalink

    The type we write into the channel.

    The type we write into the channel.

    Attributes
    protected
  2. abstract type PipelineReq

    Permalink

    The type we read out of the channel.

    The type we read out of the channel.

    Attributes
    protected

Abstract Value Members

  1. abstract def copy1(stack: Stack[ServiceFactory[Req, Rep]] = this.stack, params: Params = this.params): This

    Permalink

    A copy constructor in lieu of defining StackServer as a case class.

    A copy constructor in lieu of defining StackServer as a case class.

    Attributes
    protected
    Definition Classes
    ListeningStackServer
  2. abstract def newListener(): PushListener[This.PipelineReq, This.PipelineRep]

    Permalink

    Create a new instance of a PushListener which will be used to accept connections

    Create a new instance of a PushListener which will be used to accept connections

    Attributes
    protected
  3. abstract def newSession(handle: PushChannelHandle[This.PipelineReq, This.PipelineRep], service: Service[Req, Rep]): PushSession[This.PipelineReq, This.PipelineRep]

    Permalink

    Make a new PushSession with the provided PushChannelHandle and Service

    Make a new PushSession with the provided PushChannelHandle and Service

    Attributes
    protected
    Note

    It is possible that the new session will receive a handle that has already been closed, and must free its resources under such circumstances.

    ,

    it is presumed that the new session will take ownership of both the handle and the service and it is the sessions job to release these resources.

  4. abstract def params: Params

    Permalink

    The current parameter map used in this StackServer.

    The current parameter map used in this StackServer.

    Definition Classes
    StackServerParameterized
  5. abstract def stack: Stack[ServiceFactory[Req, Rep]]

    Permalink

    The current stack used in this StackServer.

    The current stack used in this StackServer.

    Definition Classes
    StackServer

Concrete 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 addServerToRegistry(listenerName: String): Unit

    Permalink

    Export info about the listener type to the global registry.

    Export info about the listener type to the global registry.

    The information about its implementation can then be queried at runtime.

    Attributes
    protected
    Definition Classes
    ListeningStackServer
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def configured[P](psp: (P, Param[P])): This

    Permalink

    Creates a new StackServer with parameter psp._1 and Stack Param type psp._2.

    Creates a new StackServer with parameter psp._1 and Stack Param type psp._2.

    Definition Classes
    ListeningStackServerStackServerParameterized
  8. def configured[P](p: P)(implicit arg0: Param[P]): This

    Permalink

    Creates a new StackServer with parameter p.

    Creates a new StackServer with parameter p.

    Definition Classes
    ListeningStackServerStackServerParameterized
  9. def configuredParams(newParams: Params): This

    Permalink

    Creates a new StackServer with additional parameters newParams.

    Creates a new StackServer with additional parameters newParams.

    Definition Classes
    ListeningStackServerStackServerParameterized
  10. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. final def newListeningServer(serviceFactory: ServiceFactory[Req, Rep], addr: SocketAddress)(trackSession: (ClientConnection) ⇒ Unit): ListeningServer

    Permalink

    Constructs a new ListeningServer from the ServiceFactory.

    Constructs a new ListeningServer from the ServiceFactory. Each new session is passed to the trackSession function exactly once to facilitate connection resource management.

    Attributes
    protected
    Definition Classes
    PushStackServerListeningStackServer
  18. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  20. def serve(addr: SocketAddress, factory: ServiceFactory[Req, Rep]): ListeningServer

    Permalink

    Serve service at addr

    Serve service at addr

    Definition Classes
    ListeningStackServerServer
  21. final def serve(addr: String, service: Service[Req, Rep]): ListeningServer

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    Serve service at addr

    Serve service at addr

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

    Permalink

    Serve service at addr

    Serve service at addr

    Definition Classes
    Server
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def transformed(t: Transformer): This

    Permalink

    Transform the stack using the given Transformer.

    Transform the stack using the given Transformer.

    Definition Classes
    ListeningStackServerStackServerTransformable
  33. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. val withAdmissionControl: ServerAdmissionControlParams[This]

    Permalink

    An entry point for configuring the servers' admission control.

    An entry point for configuring the servers' admission control.

    Definition Classes
    WithServerAdmissionControl
  37. def withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): This

    Permalink

    Configures this server or client with given exception stats handler.

    Configures this server or client with given exception stats handler.

    Definition Classes
    CommonParams
  38. def withLabel(label: String): This

    Permalink

    Configures this server or client with given label (default: empty string).

    Configures this server or client with given label (default: empty string).

    The label value is used for stats reporting to scope stats reported from different clients/servers to a single stats receiver.

    Definition Classes
    CommonParams
  39. def withMonitor(monitor: Monitor): This

    Permalink

    Configures this server or client with given util.Monitor (default: com.twitter.finagle.util.DefaultMonitor).

    Configures this server or client with given util.Monitor (default: com.twitter.finagle.util.DefaultMonitor).

    Definition Classes
    CommonParams
  40. def withParams(params: Params): This

    Permalink

    Creates a new StackServer with params used to configure this StackServer's stack.

    Creates a new StackServer with params used to configure this StackServer's stack.

    Definition Classes
    ListeningStackServerStackServerParameterized
  41. def withRequestTimeout(timeout: Tunable[Duration]): This

    Permalink

    Configures the Tunable request timeout of this server or client (if applying the Tunable produces a value of None, an unbounded timeout is used for the request).

    Configures the Tunable request timeout of this server or client (if applying the Tunable produces a value of None, an unbounded timeout is used for the request).

    If the request has not completed within the Duration resulting from timeout.apply(), the pending work will be interrupted via com.twitter.util.Future.raise.

    Client's Request Timeout

    The client request timeout is the maximum amount of time given to a single request (if there are retries, they each get a fresh request timeout). The timeout is applied only after a connection has been acquired. That is: it is applied to the interval between the dispatch of the request and the receipt of the response.

    Server's Request Timeout

    The server request timeout is the maximum amount of time, a server is allowed to spend handling the incoming request. Using the Finagle terminology, this is an amount of time after which a non-satisfied future returned from the user-defined service times out.

    Definition Classes
    CommonParams
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration and https://twitter.github.io/finagle/guide/Configuration.html#tunables

  42. def withRequestTimeout(timeout: Duration): This

    Permalink

    Configures the request timeout of this server or client (default: unbounded).

    Configures the request timeout of this server or client (default: unbounded).

    If the request has not completed within the given timeout, the pending work will be interrupted via com.twitter.util.Future.raise.

    Client's Request Timeout

    The client request timeout is the maximum amount of time given to a single request (if there are retries, they each get a fresh request timeout). The timeout is applied only after a connection has been acquired. That is: it is applied to the interval between the dispatch of the request and the receipt of the response.

    Server's Request Timeout

    The server request timeout is the maximum amount of time, a server is allowed to spend handling the incoming request. Using the Finagle terminology, this is an amount of time after which a non-satisfied future returned from the user-defined service times out.

    Definition Classes
    CommonParams
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration

  43. def withResponseClassifier(responseClassifier: ResponseClassifier): This

    Permalink

    Configure a com.twitter.finagle.service.ResponseClassifier which is used to determine the result of a request/response.

    Configure a com.twitter.finagle.service.ResponseClassifier which is used to determine the result of a request/response.

    This allows developers to give Finagle the additional application-specific knowledge necessary in order to properly classify responses. Without this, Finagle cannot make judgements about application-level failures as it only has a narrow understanding of failures (for example: transport level, timeouts, and nacks).

    As an example take an HTTP server that returns a response with a 500 status code. To Finagle this is a successful request/response. However, the application developer may want to treat all 500 status codes as failures and can do so via setting a com.twitter.finagle.service.ResponseClassifier.

    ResponseClassifier is a PartialFunction and as such multiple classifiers can be composed together via PartialFunction.orElse.

    Response classification is independently configured on the client and server. For client-side response classification using com.twitter.finagle.builder.ClientBuilder, see com.twitter.finagle.builder.ClientBuilder.responseClassifier

    Definition Classes
    CommonParams
    Note

    If unspecified, the default classifier is com.twitter.finagle.service.ResponseClassifier.Default which is a total function fully covering the input domain.

    See also

    com.twitter.finagle.http.service.HttpResponseClassifier for some HTTP classification tools.

  44. val withSession: SessionParams[This]

    Permalink

    An entry point for configuring the client's sessions.

    An entry point for configuring the client's sessions.

    Session might be viewed as logical connection that wraps a physical connection (i.e., transport) and controls its lifecycle. Sessions are used in Finagle to maintain liveness, requests cancellation, draining, and many more.

    The default setup for a Finagle client's sessions is to not put any timeouts on it.

    Definition Classes
    WithServerSession
  45. def withStack(stack: Stack[ServiceFactory[Req, Rep]]): This

    Permalink

    A new StackServer with the provided Stack.

    A new StackServer with the provided Stack.

    Definition Classes
    ListeningStackServerStackServer
  46. def withStatsReceiver(statsReceiver: StatsReceiver): This

    Permalink

    Configures this server or client with given stats.StatsReceiver (default: stats.DefaultStatsReceiver).

    Configures this server or client with given stats.StatsReceiver (default: stats.DefaultStatsReceiver).

    Definition Classes
    CommonParams
  47. def withTracer(tracer: Tracer): This

    Permalink

    Configures this server or client with given tracing.Tracer (default: com.twitter.finagle.tracing.DefaultTracer).

    Configures this server or client with given tracing.Tracer (default: com.twitter.finagle.tracing.DefaultTracer).

    Definition Classes
    CommonParams
  48. val withTransport: ServerTransportParams[This]

    Permalink

    An entry point for configuring servers' com.twitter.finagle.transport.Transport.

    An entry point for configuring servers' com.twitter.finagle.transport.Transport.

    Transport is a Finagle abstraction over the network connection (i.e., a TCP connection).

    Definition Classes
    WithServerTransport

Inherited from ListeningStackServer[Req, Rep, This]

Inherited from WithServerAdmissionControl[This]

Inherited from WithServerSession[This]

Inherited from WithServerTransport[This]

Inherited from CommonParams[This]

Inherited from StackServer[Req, Rep]

Inherited from Transformable[This]

Inherited from StackBasedServer[Req, Rep]

Inherited from Parameterized[This]

Inherited from Server[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped