com.twitter

finagle

package finagle

Finagle is an extensible RPC system.

Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

Thus a simple HTTP server is built like this:

import com.twitter.finagle.{Http, Service}
import org.jboss.netty.handler.codec.http.{
  HttpRequest, HttpResponse, DefaultHttpResponse}
import org.jboss.netty.handler.codec.http.HttpVersion._
import org.jboss.netty.handler.codec.http.HttpResponseStatus._
import com.twitter.util.{Future, Await}

val service = new Service[HttpRequest, HttpResponse] {
  def apply(req: HttpRequest) =
    Future.value(new DefaultHttpResponse(HTTP_1_1, OK))
}
val server = Http.serve(":8080", service)
Await.ready(server)

We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

We can now query our web server:

% curl -D - localhost:8080
HTTP/1.1 200 OK

%

Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

import com.twitter.finagle.{Http, Service}
import org.jboss.netty.handler.codec.http.{
  HttpRequest, HttpResponse, DefaultHttpRequest}
import org.jboss.netty.handler.codec.http.HttpVersion._
import org.jboss.netty.handler.codec.http.HttpMethod._
import com.twitter.util.{Future, Return, Throw}

val client: Service[HttpRequest, HttpResponse] =
  Http.newService("localhost:8080")
val f: Future[HttpResponse] =
  client(new DefaultHttpRequest(HTTP_1_1, GET, "/"))
f respond {
  case Return(res) =>
    printf("Got HTTP response %s\n", res)
  case Throw(exc) =>
    printf("Got error %s\n", exc)
}

Http.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

The Finagle homepage contains useful documentation and resources for using Finagle.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. finagle
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractCodec[Req, Rep] extends Codec[Req, Rep]

    An abstract class version of the above for java compatibility.

  2. abstract class AbstractNamer extends Namer

    Abstract Namer class for Java compatibility.

  3. abstract class AbstractResolver extends Resolver

    An abstract class version of Resolver for java compatibility.

  4. sealed trait Addr extends AnyRef

    An address identifies the location of an object--it is a bound name.

    An address identifies the location of an object--it is a bound name. An object may be replicated, and thus bound to multiple physical locations; it may be delegated to an unbound name. (Similar to a symbolic link in Unix.)

  5. trait Announcement extends Closable

  6. trait Announcer extends AnyRef

  7. class AnnouncerForumInvalid extends Exception

    Indicates that a forum string passed to an com.twitter.finagle.Announcer was invalid according to the forum grammar [1].

    Indicates that a forum string passed to an com.twitter.finagle.Announcer was invalid according to the forum grammar [1].

    [1] http://twitter.github.io/finagle/guide/Names.html

  8. class AnnouncerNotFoundException extends Exception

    Indicates that an com.twitter.finagle.Announcer was not found for the given scheme.

    Indicates that an com.twitter.finagle.Announcer was not found for the given scheme.

    Announcers are discovered via Finagle's com.twitter.finagle.util.LoadService mechanism. These exceptions typically suggest that there are no libraries on the classpath that define an Announcer for the given scheme.

  9. class ApiException extends Exception

    A base class for exceptions encountered on account of incorrect API usage.

  10. trait CanStackFrom[-From, To] extends AnyRef

    A typeclass for "stackable" items.

    A typeclass for "stackable" items. This is used by the StackBuilder to provide a convenient interface for constructing Stacks.

    Annotations
    @implicitNotFound( "${From} is not Stackable to ${To}" )
  11. class CancelledConnectionException extends RequestException

    A Future is satisfied with this exception when the process of establishing a session is interrupted.

    A Future is satisfied with this exception when the process of establishing a session is interrupted. Sessions are not preemptively established in Finagle, rather requests are taxed with session establishment when necessary. For example, this exception can occur if a request is interrupted while waiting for an available session or if an interrupt is propagated from a Finagle server during session establishment.

    See also

    com.twitter.finagle.CancelledRequestException

  12. class CancelledRequestException extends RequestException

    Indicates that a request was cancelled.

    Indicates that a request was cancelled. Cancellation is propagated between a Finagle server and a client intra-process when the server is interrupted by an upstream service. In such cases, the pending Future is interrupted with this exception. The client will cancel its pending request which will by default propagate an interrupt to its downstream, and so on. This is done to conserve resources.

  13. class CancelledWriteException extends TransportException

    Indicates that a request failed because a com.twitter.finagle.transport.Transport write associated with the request was cancelled.

  14. class ChannelBufferUsageException extends Exception

    Indicates that an error occurred on account of incorrect usage of a org.jboss.netty.buffer.ChannelBuffer.

    Indicates that an error occurred on account of incorrect usage of a org.jboss.netty.buffer.ChannelBuffer.

    TODO: Probably remove this exception class once we migrate away from Netty usage in public APIs.

  15. class ChannelClosedException extends ChannelException with NoStacktrace

    Indicates that a given channel was closed, for instance if the connection was reset by a peer or a proxy.

  16. class ChannelException extends Exception with SourcedException

    An exception encountered within the context of a given socket channel.

  17. case class ChannelWriteException(underlying: Throwable) extends ChannelException with WriteException with NoStacktrace with Product with Serializable

    Default implementation for WriteException that wraps an underlying exception.

  18. trait Client[Req, Rep] extends AnyRef

    RPC clients with Req-typed requests and Rep typed replies.

    RPC clients with Req-typed requests and Rep typed replies. RPC destinations are represented by names. Names are bound for each request.

    Clients are implemented by the various protocol packages in finagle, for example com.twitter.finagle.Http:

    object Http extends Client[HttpRequest, HttpResponse] ...
    
    val service: Service[HttpRequest, HttpResponse] =
      Http.newService("google.com:80")
  19. case class ClientCodecConfig(serviceName: String) extends Product with Serializable

    Clients

  20. trait ClientConnection extends Closable

    Information about a client, passed to a Service factory for each new connection.

  21. trait Codec[Req, Rep] extends AnyRef

    Superclass for all codecs.

  22. trait CodecFactory[Req, Rep] extends AnyRef

    A combined codec factory provides both client and server codec factories in one (when available).

  23. class ConnectionFailedException extends ChannelException with NoStacktrace

    Indicates that the client failed to establish a connection.

    Indicates that the client failed to establish a connection. Typically this class will be extended to provide additional information relevant to a particular category of connection failure.

  24. case class ConnectionRefusedException(remoteAddress: SocketAddress) extends ChannelException with Product with Serializable

    Indicates that connecting to a given remoteAddress was refused.

  25. case class Deadline(timestamp: Time, deadline: Time) extends Ordered[Deadline] with Product with Serializable

    A deadline is the time by which some action (e.g., a request) must complete.

    A deadline is the time by which some action (e.g., a request) must complete. A deadline has a timestamp in addition to the deadline. This timestamp denotes the time at which the deadline was enacted.

    This is done so that they may be reconciled over process boundaries; e.g., to account for variable latencies in message deliveries.

    timestamp

    the time at which the deadline was enacted.

    deadline

    the time by which the action must complete.

  26. case class Dentry(prefix: Path, dst: NameTree[Path]) extends Product with Serializable

    Trait Dentry describes a delegation table entry.

    Trait Dentry describes a delegation table entry. prefix describes the paths that the entry applies to. dst describes the resulting tree for this prefix on lookup.

  27. case class Dtab(dentries0: IndexedSeq[Dentry]) extends IndexedSeq[Dentry] with Product with Serializable

    A Dtab--short for delegation table--comprises a sequence of delegation rules.

    A Dtab--short for delegation table--comprises a sequence of delegation rules. Together, these describe how to bind a com.twitter.finagle.Path to a set of com.twitter.finagle.Addr. com.twitter.finagle.naming.DefaultInterpreter implements the default binding stategy.

  28. final class DtabBuilder extends Builder[Dentry, Dtab]

  29. class FactoryToService[Req, Rep] extends Service[Req, Rep]

    Turns a com.twitter.finagle.ServiceFactory into a com.twitter.finagle.Service which acquires a new service for each request.

  30. class FailedFastException extends RequestException with WriteException

    Used by com.twitter.finagle.service.FailFastFactory to indicate that a request failed because all hosts in the cluster to which the client is connected have been marked as failed.

    Used by com.twitter.finagle.service.FailFastFactory to indicate that a request failed because all hosts in the cluster to which the client is connected have been marked as failed. See FailFastFactory for details on this behavior.

  31. final class Failure extends Exception with NoStacktrace

    Base exception for all Finagle originated failures.

    Base exception for all Finagle originated failures. These are Exceptions, but with additional sources and flags. Sources describe the origins of the failure to aid in debugging and flags mark attributes of the Failure (e.g. Restartable).

  32. abstract class Filter[-ReqIn, +RepOut, +ReqOut, -RepIn] extends (ReqIn, Service[ReqOut, RepIn]) ⇒ Future[RepOut]

    A Filter acts as a decorator/transformer of a service.

    A Filter acts as a decorator/transformer of a service. It may apply transformations to the input and output of that service:

              (*  MyService  *)
    [ReqIn -> (ReqOut -> RepIn) -> RepOut]

    For example, you may have a POJO service that takes Strings and parses them as Ints. If you want to expose this as a Network Service via Thrift, it is nice to isolate the protocol handling from the business rules. Hence you might have a Filter that converts back and forth between Thrift structs. Again, your service deals with POJOs:

    [ThriftIn -> (String  ->  Int) -> ThriftOut]

    Thus, a Filter[A, B, C, D] converts a Service[C, D] to a Service[A, B]. In other words, it converts a Service[ReqOut, RepIn] to a Service[ReqIn, RepOut].

  33. class GlobalRequestTimeoutException extends RequestTimeoutException

    Indicates that a request timed out, where "request" comprises a full RPC from the perspective of the application.

    Indicates that a request timed out, where "request" comprises a full RPC from the perspective of the application. For instance, multiple retried Finagle-level requests could constitute the single request that this exception pertains to.

  34. class InconsistentStateException extends ChannelException

    Indicates that some client state was inconsistent with the observed state of some server.

    Indicates that some client state was inconsistent with the observed state of some server. For example, the client could receive a channel-connection event from a proxy when there is no outstanding connect request.

  35. class IndividualRequestTimeoutException extends RequestTimeoutException

    Indicates that a single Finagle-level request timed out.

    Indicates that a single Finagle-level request timed out. In contrast to com.twitter.finagle.RequestTimeoutException, an "individual request" could be a single request-retry performed as a constituent of an application-level RPC.

  36. trait InetResolver extends Resolver

    A resolver for Inet addresses.

  37. trait ListeningServer extends Closable with Awaitable[Unit] with Group[SocketAddress]

    Trait ListeningServer represents a bound and listening server.

    Trait ListeningServer represents a bound and listening server. Closing a server instance unbinds the port and relinquishes resources that are associated with the server.

  38. class MultipleAnnouncersPerSchemeException extends Exception with NoStacktrace

    Indicates that multiple Announcers were discovered for given scheme.

    Indicates that multiple Announcers were discovered for given scheme.

    Announcers are discovered via Finagle's com.twitter.finagle.util.LoadService mechanism. These exceptions typically suggest that there are multiple libraries on the classpath with conflicting scheme definitions.

  39. class MultipleResolversPerSchemeException extends Exception with NoStacktrace

    Indicates that multiple Resolvers were discovered for given scheme.

    Indicates that multiple Resolvers were discovered for given scheme.

    Resolvers are discovered via Finagle's com.twitter.finagle.util.LoadService mechanism. These exceptions typically suggest that there are multiple libraries on the classpath with conflicting scheme definitions.

  40. sealed trait Name extends AnyRef

    Names identify network locations.

    Names identify network locations. They come in two varieties:

    1. Bound names are concrete. They represent a changeable list of network endpoints (represented by Addrs).

    2. Path names are unbound paths, representing an abstract location which must be resolved by some context, usually the Dtab.

    In practice, clients use a com.twitter.finagle.Resolver to resolve a destination name string into a Name. This is achieved by passing a destination name into methods such as ClientBuilder.dest or the newClient method of the appropriate protocol object (e.g. Http.newClient(/s/org/servicename)). These APIs use Resolver under the hood to resolve the destination names into the Name representation of the appropriate cluster.

    As names are bound, a Namer may elect to bind only a Name prefix, leaving an unbound residual name to be processed by a downstream Namer.

  41. sealed trait NameTree[+T] extends AnyRef

    Name trees represent a composite T-typed name whose interpretation is subject to evaluation rules.

    Name trees represent a composite T-typed name whose interpretation is subject to evaluation rules. Typically, a Namer is used to provide evaluation context for these trees.

    • com.twitter.finagle.NameTree.Union nodes represent the union of several trees; a destination is reached by load-balancing over the sub-trees.
    • Alt nodes represent a fail-over relationship between several trees; the first successful tree is picked as the destination. When the tree-list is empty, Alt-nodes evaluate to Empty.
    • A Leaf represents a T-typed leaf node;
    • A Neg represents a negative location; no destination exists here.
    • Finally, Empty trees represent an empty location: it exists but is uninhabited at this time.
  42. trait Namer extends AnyRef

    A namer is a context in which a NameTree is bound.

    A namer is a context in which a NameTree is bound. The context is provided by the lookup method, which translates Paths into NameTrees. Namers may represent external processes, for example lookups through DNS or to ZooKeeper, and thus lookup results are represented by a Activity.

  43. class NoBrokersAvailableException extends RequestException

    Indicates that a request failed because no servers were available.

    Indicates that a request failed because no servers were available. The Finagle client's internal load balancer was empty. This typically occurs under one of the following conditions:

    - The cluster is actually down. No servers are available. - A service discovery failure. This can be due to a number of causes, such as the client being constructed with an invalid cluster destination name [1] or a failure in the service discovery system (e.g. DNS, ZooKeeper).

    A good way to diagnose NoBrokersAvailableExceptions is to reach out to the owners of the service to which the client is attempting to connect and verify that the service is operational. If so, then investigate the service discovery mechanism that the client is using (e.g. the com.twitter.finagle.Resolver that is it configured to use and the system backing it).

    [1] http://twitter.github.io/finagle/guide/Names.html

  44. trait NoStacktrace extends Exception

    A trait for common exceptions that either

    A trait for common exceptions that either

    a) don't benefit from full stacktrace information (e.g. stacktraces don't add useful information, as in the case of connection closure), or b) are thrown frequently enough that stacktrace-creation becomes unacceptably expensive.

    This trait represents a tradeoff between debugging ease and efficiency. Implementers beware.

  45. class NotServableException extends RequestException

    Indicates that the request was not servable, according to some policy.

    Indicates that the request was not servable, according to some policy. See com.twitter.finagle.service.OptionallyServableFilter as an example.

  46. class NotShardableException extends NotServableException

    Indicates that the client failed to distribute a given request according to some sharding strategy.

    Indicates that the client failed to distribute a given request according to some sharding strategy. See com.twitter.finagle.service.ShardingService for details on this behavior.

  47. case class Path(elems: Buf*) extends Product with Serializable

    A Path comprises a sequence of byte buffers naming a hierarchically-addressed object.

  48. trait ProxyAnnouncement extends Announcement with Proxy

  49. case class RefusedByRateLimiter() extends ChannelException with Product with Serializable

    Indicates that requests were failed by a rate-limiter.

    Indicates that requests were failed by a rate-limiter. See com.twitter.finagle.service.RateLimitingFilter for details.

  50. class RequestException extends Exception with NoStacktrace with SourcedException

    A base class for request failures.

    A base class for request failures. Indicates that some failure occurred before a request could be successfully serviced.

  51. class RequestTimeoutException extends RequestException with TimeoutException

    Indicates that a request timed out.

    Indicates that a request timed out. See com.twitter.finagle.IndividualRequestTimeoutException and com.twitter.finagle.GlobalRequestTimeoutException for details on the different request granularities that this exception class can pertain to.

  52. trait Resolver extends AnyRef

    A resolver binds a name, represented by a string, to a variable address.

    A resolver binds a name, represented by a string, to a variable address. Resolvers have an associated scheme which is used for lookup so that names may be resolved in a global context.

    These are loaded by Finagle through the service loading mechanism. Thus, in order to implement a new resolver, a class implementing Resolver with a 0-arg constructor must be registered in a file named META-INF/services/com.twitter.finagle.Resolver included in the classpath; see Oracle's ServiceLoader documentation for further details.

  53. class ResolverAddressInvalid extends Exception

    Indicates that a destination name string passed to a com.twitter.finagle.Resolver was invalid according to the destination name grammar [1].

    Indicates that a destination name string passed to a com.twitter.finagle.Resolver was invalid according to the destination name grammar [1].

    [1] http://twitter.github.io/finagle/guide/Names.html

  54. class ResolverNotFoundException extends Exception

    Indicates that a com.twitter.finagle.Resolver was not found for the given scheme.

    Indicates that a com.twitter.finagle.Resolver was not found for the given scheme.

    Resolvers are discovered via Finagle's com.twitter.finagle.util.LoadService mechanism. These exceptions typically suggest that there are no libraries on the classpath that define a Resolver for the given scheme.

  55. trait Server[Req, Rep] extends AnyRef

    Servers implement RPC servers with Req-typed requests and Rep-typed responses.

    Servers implement RPC servers with Req-typed requests and Rep-typed responses. Servers dispatch requests to a com.twitter.finagle.Service or com.twitter.finagle.ServiceFactory provided through serve.

    Servers are implemented by the various protocol packages in finagle, for example com.twitter.finagle.Http:

    object Http extends Server[HttpRequest, HttpResponse] ...
    
    val server = Http.serve(":*", new Service[HttpRequest, HttpResponse] {
      def apply(req: HttpRequest): Future[HttpResponse] = ...
    })

    Will bind to an ephemeral port (":*") and dispatch request to server.boundAddress to the provided com.twitter.finagle.Service instance.

    The serve method has two variants: one for instances of Service, and another for ServiceFactory. The ServiceFactory variants are used for protocols in which connection state is significant: a new Service is requested from the ServiceFactory for each new connection, and requests on that connection are dispatched to the supplied service. The service is also closed when the client disconnects or the connection is otherwise terminated.

  56. case class ServerCodecConfig(serviceName: String, boundAddress: SocketAddress) extends Product with Serializable

    Servers

  57. abstract class Service[-Req, +Rep] extends (Req) ⇒ Future[Rep] with Closable

    A Service is an asynchronous function from Request to Future[Response].

    A Service is an asynchronous function from Request to Future[Response]. It is the basic unit of an RPC interface.

    Note: this is an abstract class (vs. a trait) to maintain java compatibility, as it has implementation as well as interface.

  58. class ServiceClosedException extends Exception with ServiceException

    Indicates that a request was applied to a com.twitter.finagle.Service that is closed (i.e.

    Indicates that a request was applied to a com.twitter.finagle.Service that is closed (i.e. the connection is closed).

  59. trait ServiceException extends Exception with SourcedException

    A trait for exceptions related to a com.twitter.finagle.Service.

  60. abstract class ServiceFactory[-Req, +Rep] extends (ClientConnection) ⇒ Future[Service[Req, Rep]] with Closable

  61. abstract class ServiceFactoryProxy[-Req, +Rep] extends ServiceFactory[Req, Rep] with ProxyServiceFactory[Req, Rep]

    A simple proxy ServiceFactory that forwards all calls to another ServiceFactory.

    A simple proxy ServiceFactory that forwards all calls to another ServiceFactory. This is is useful if you to wrap-but-modify an existing service factory.

  62. trait ServiceFactoryWrapper extends AnyRef

    A ServiceFactoryWrapper adds behavior to an underlying ServiceFactory.

  63. trait ServiceNamer[Req, Rep] extends Namer

    Base-trait for Namers that bind to a local Service.

    Base-trait for Namers that bind to a local Service.

    Implementers with a 0-argument constructor may be named and auto-loaded with /$/pkg.cls syntax.

    Note that this can't actually be accomplished in a type-safe manner since the naming step obscures the service's type to observers.

  64. class ServiceNotAvailableException extends Exception with ServiceException

    Indicates that a request was applied to a com.twitter.finagle.Service that is unavailable.

    Indicates that a request was applied to a com.twitter.finagle.Service that is unavailable. This constitutes a fail-stop condition.

  65. abstract class ServiceProxy[-Req, +Rep] extends Service[Req, Rep] with Proxy

    A simple proxy Service that forwards all calls to another Service.

    A simple proxy Service that forwards all calls to another Service. This is useful if you want to wrap-but-modify an existing service.

  66. class ServiceTimeoutException extends Exception with WriteException with ServiceException with TimeoutException

    Indicates that the connection was not established within the timeouts.

    Indicates that the connection was not established within the timeouts. This type of exception should generally be safe to retry.

  67. class ShardNotAvailableException extends NotServableException

    Indicates that the shard to which a request was assigned was not available.

    Indicates that the shard to which a request was assigned was not available. See com.twitter.finagle.service.ShardingService for details on this behavior.

  68. abstract class SimpleFilter[Req, Rep] extends Filter[Req, Rep, Req, Rep]

    A Filter where the request and reply types are the same.

  69. trait SourcedException extends Exception

    A trait for exceptions that have a source.

    A trait for exceptions that have a source. The name of the source is specified as a serviceName. The "unspecified" value is used if no serviceName is provided by the implementation.

  70. case class SslHandshakeException(underlying: Throwable, remoteAddress: SocketAddress) extends ChannelException with Product with Serializable

    Indicates that an error occurred while an SSL handshake was being performed with a server at a given remoteAddress.

  71. case class SslHostVerificationException(principal: String) extends ChannelException with Product with Serializable

    Indicates that the certificate for a given session was invalidated.

  72. sealed trait Stack[T] extends AnyRef

    Stacks represent stackable elements of type T.

    Stacks represent stackable elements of type T. It is assumed that T-typed elements can be stacked in some meaningful way; examples are functions (function composition) Filters (chaining), and ServiceFactories (through transformers). T-typed values are also meant to compose: the stack itself materializes into a T-typed value.

    Stacks are persistent, allowing for nondestructive transformations; they are designed to represent 'template' stacks which can be configured in various ways before materializing the stack itself.

    Note: Stacks are advanced and sometimes subtle. For expert use only!

  73. class StackBuilder[T] extends AnyRef

    StackBuilders are imperative-style builders for Stacks.

    StackBuilders are imperative-style builders for Stacks. It maintains a stack onto which new elements can be pushed (defining a new stack).

    See also

    stack.nilStack for starting construction of an empty stack for ServiceFactorys.

  74. trait Stackable[T] extends Head

    Produce a stack from a T-typed element.

  75. sealed trait Status extends AnyRef

    Status tells the condition of a networked endpoint.

    Status tells the condition of a networked endpoint. They are used to indicate the health of Service, ServiceFactory, and of transport.Transport.

    Object Status$ contains the status definitions.

  76. trait TimeoutException extends Exception with SourcedException

    Indicates that an operation exceeded some timeout duration before completing.

    Indicates that an operation exceeded some timeout duration before completing. Differs from com.twitter.util.TimeoutException in that this trait doesn't extend java.util.concurrent.TimeoutException, provides more context in its error message (e.g. the source and timeout value), and is only used within the confines of Finagle.

  77. class TooManyConcurrentRequestsException extends ApiException

    Indicates that the client has issued more concurrent requests than are allowable, where "allowable" is typically determined based on some configurable maximum.

  78. class TooManyWaitersException extends RequestException

    Used by com.twitter.finagle.pool.WatermarkPool to indicate that a request failed because too many requests are already waiting for a connection to become available from a client's connection pool.

  79. class TransportException extends Exception with SourcedException

    A base class for exceptions encountered in the context of a com.twitter.finagle.transport.Transport.

  80. case class UnknownChannelException(underlying: Throwable, remoteAddress: SocketAddress) extends ChannelException with Product with Serializable

    A catch-all exception class for uncategorized ChannelExceptions.

  81. case class WeightedSocketAddress(addr: SocketAddress, weight: Double) extends SocketAddress with Product with Serializable

    A SocketAddress with a weight.

    A SocketAddress with a weight. WeightedSocketAddress can be nested.

  82. trait WriteException extends Exception with SourcedException

    Marker trait to indicate there was an exception while writing the request.

    Marker trait to indicate there was an exception while writing the request. These exceptions should generally be retryable as the full request should not have reached the other end.

  83. class WriteTimedOutException extends ChannelException

    Indicates that a write to a given remoteAddress timed out.

    Indicates that a write to a given remoteAddress timed out. See com.twitter.finagle.netty3.channel.WriteCompletionTimeoutHandler for details.

  84. class ApplicationException extends Exception

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used

  85. class CancelledReadException extends TransportException

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used

  86. class CodecException extends Exception

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used

  87. case class FailFastException() extends ChannelException with Product with Serializable

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used by com.twitter.finagle.service.FailFastFactory

  88. trait Group[T] extends AnyRef

    A group is a dynamic set of T-typed values.

    A group is a dynamic set of T-typed values. It is used to represent dynamic hosts and operations over such lists. Its flexibility is derived from the ability to map, creating derived groups. The map operation ensures that each element is mapped over exactly once, allowing side-effecting operations to rely on this to implement safe semantics.

    Note: querying groups is nonblocking, which means that derived groups are effectively eventually consistent.

    Note: Ts must be hashable, definining hashCode and equals to ensure that maps have exactly-once semantics.

    Note: Groups are invariant because Scala's Sets are. In the case of sets, this is an implementation artifact, and is unfortunate, but it's better to keep things simpler and consistent.

    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use com.twitter.finagle.Name to represent clusters instead

  89. class InvalidPipelineException extends ApiException

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used

  90. case class LabelledGroup[T](underlying: Group[T], name: String) extends Group[T] with Product with Serializable

    A mixin trait to assign a name to the group.

    A mixin trait to assign a name to the group. This is used to assign labels to groups that ascribe meaning to them.

    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use com.twitter.finagle.Name to represent clusters instead

  91. trait MutableGroup[T] extends Group[T]

    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use com.twitter.finagle.Name to represent clusters instead

  92. class NotYetConnectedException extends ApiException

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used

  93. trait ProxyServiceFactory[-Req, +Rep] extends ServiceFactory[Req, Rep] with Proxy

    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.5) use ServiceFactoryProxy instead

  94. class ReplyCastException extends RequestException

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used by com.twitter.finagle.service.RetryingFilter

  95. class RetryFailureException extends RequestException

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) no longer used by com.twitter.finagle.service.RetryingFilter

Value Members

  1. object Addr

    Note: There is a Java-friendly API for this object: com.twitter.finagle.Addrs.

  2. object Addrs

    A Java adaptation of the com.twitter.finagle.Addr companion object.

  3. object Announcer

  4. object BackupRequestLost extends Exception with NoStacktrace

    An exception that is raised on backup requests that are discarded because their corresponding initial requests succeeded in time.

    An exception that is raised on backup requests that are discarded because their corresponding initial requests succeeded in time. See com.twitter.finagle.exp.BackupRequestFilter for details.

  5. object CanStackFrom

  6. object ChannelException extends Serializable

  7. object ClientConnection

  8. object Codec

  9. object Deadline extends Key[Deadline] with Serializable

    A broadcast context for deadlines.

  10. object Dentry extends Serializable

  11. object Dtab extends Serializable

    Object Dtab manages 'base' and 'local' Dtabs.

  12. object FactoryToService

  13. object FailResolver extends Resolver

  14. object Failure extends Serializable

  15. object Filter

  16. object Group

  17. object InetResolver

    Resolver for inet scheme.

    Resolver for inet scheme.

    The Var is refreshed after each TTL timeout, set from "networkaddress.cache.ttl", a Java Security Property. If "networkaddress.cache.ttl" is not set or set to a non-positive value, the Var is static and no future resolution is attempted.

  18. object Name

  19. object NameTree

    The NameTree object comprises NameTree types as well as binding and evaluation routines.

  20. object Namer

  21. object NegResolver extends Resolver

  22. object NilResolver extends Resolver

  23. object NoStacktrace extends Serializable

  24. object NullServer extends ListeningServer with CloseAwaitably

    An empty ListeningServer that can be used as a placeholder.

    An empty ListeningServer that can be used as a placeholder. For example:

    @volatile var server = NullServer
    def main() { server = Http.serve(...) }
    def exit() { server.close() }
  25. object Path extends Serializable

  26. object Resolver extends BaseResolver

  27. object Service

  28. object ServiceFactory

  29. object ServiceFactoryWrapper

  30. object SourcedException extends Serializable

  31. object Stack

    See also

    stack.nilStack for starting construction of an empty stack for ServiceFactorys.

  32. object Status

    Define valid Status! values.

    Define valid Status! values. They are, in order from most to least healthy:

    • Open
    • Busy
    • Closed

    (An scala.math.Ordering is defined in these terms.)

  33. object WeightedInetSocketAddress

  34. object WeightedSocketAddress extends Serializable

  35. object WriteException extends Serializable

  36. object asyncDns extends GlobalFlag[Boolean]

  37. package builder

  38. package client

  39. package context

  40. package core

  41. package dispatch

  42. package exp

    Package exp contains experimental code.

    Package exp contains experimental code. This can be removed or stabilized (moved elsewhere) at any time.

  43. package factory

  44. package filter

  45. package group

  46. package httpproxy

  47. package jsr166y

  48. package loadbalancer

  49. package namer

  50. package naming

  51. package netty3

    Package netty3 implements the bottom finagle primitives: {{com.twitter.finagle.Server}} and a client transport in terms of the netty3 event loop.

    Package netty3 implements the bottom finagle primitives: {{com.twitter.finagle.Server}} and a client transport in terms of the netty3 event loop.

    Note: when {{com.twitter.finagle.builder.ClientBuilder}} and {{com.twitter.finagle.builder.ServerBuilder}} are deprecated, package netty3 can move into its own package, so that only the (new-style) clients and servers that depend on netty3 bring it in.

  52. package param

    Defines common com.twitter.finagle.Stack.Param's shared between finagle clients and servers.

  53. package pool

  54. package server

  55. package service

  56. package socks

  57. package ssl

  58. object stack

  59. package stats

  60. package tracing

  61. package transport

  62. package util

Inherited from AnyRef

Inherited from Any

Ungrouped