Class

com.twitter.util.routing

AbstractRouter

Related Doc: package routing

Permalink

abstract class AbstractRouter[Input, Route] extends Router[Input, Route]

Java-friendly version of Router

Input

The Input type used to determine a route destination

Route

The output/resulting route type

Linear Supertypes
Router[Input, Route], ClosableOnce, CloseOnce, Closable, (Input) ⇒ Option[Route], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractRouter
  2. Router
  3. ClosableOnce
  4. CloseOnce
  5. Closable
  6. Function1
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractRouter(label: String, jRoutes: Iterable[Route])

    Permalink

    label

    A label used for identifying this Router (i.e. for distinguishing between Router instances in error messages or for StatsReceiver scope).

    jRoutes

    All of the Route routes contained within this Router, represented as a Java JIterable.

Abstract Value Members

  1. abstract def findAny(input: Input): Optional[Route]

    Permalink

    Java-friendly version of find

    Java-friendly version of find

    Attributes
    protected

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. def andThen[A](g: (Option[Route]) ⇒ A): (Input) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def apply(input: Input): Option[Route]

    Permalink

    Attempt to route an Input to a Route route known by this Router.

    Attempt to route an Input to a Route route known by this Router.

    input

    The Input to use for determining an available route

    returns

    Some(Route) if a route is found to match, None otherwise

    Definition Classes
    Router → Function1
    Note

    A ClosedRouterException will be thrown if close has been initiated on this router and subsequent routing attempts are received.

  6. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def close(deadline: Time): Future[Unit]

    Permalink
    Definition Classes
    CloseOnce
  9. def close(after: Duration): Future[Unit]

    Permalink
    Definition Classes
    Closable
  10. final def close(): Future[Unit]

    Permalink
    Definition Classes
    Closable
  11. def closeOnce(deadline: Time): Future[Unit]

    Permalink

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Attributes
    protected
    Definition Classes
    Router → CloseOnce
    Note

    NonFatal exceptions encountered when calling close() on a Route will be suppressed and Fatal exceptions will take on the same exception behavior of a Future.join.

  12. def compose[A](g: (A) ⇒ Input): (A) ⇒ Option[Route]

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def find(input: Input): Option[Route]

    Permalink

    Logic used to determine if this Router contains a Route for an Input.

    Logic used to determine if this Router contains a Route for an Input.

    input

    The Input to determine a route for.

    returns

    Some(Route) if a matching route is defined, None if a route destination is not defined for the Input.

    Attributes
    protected
    Definition Classes
    AbstractRouterRouter
    Note

    This method is only meant to be called within the Router's apply, which handles lifecycle concerns. It should not be accessed directly.

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getLogger(): Logger

    Permalink

    The Logger to use for this Router.

    The Logger to use for this Router. Can be overridden to customize.

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isClosed: Boolean

    Permalink
    Definition Classes
    CloseOnce
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val label: String

    Permalink

    A label used for identifying this Router (i.e.

    A label used for identifying this Router (i.e. for distinguishing between Router instances in error messages or for StatsReceiver scope).

    Definition Classes
    AbstractRouterRouter
  23. final def logger: Logger

    Permalink

    The Logger to use for this Router.

    The Logger to use for this Router. Can be overridden to customize.

    Definition Classes
    AbstractRouterRouter
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  27. final def route(input: Input): Optional[Route]

    Permalink

    Java-friendly version of apply

  28. final val routes: Iterable[Route]

    Permalink

    All of the Route routes contained within this Router

    All of the Route routes contained within this Router

    Definition Classes
    AbstractRouterRouter
    Note

    This property is used to linearly determine the routes when closed() is called. It may also be used as a way to determine what routes are defined within a Router (i.e. for generating meaningful error messages). This property does not imply any relationship with apply or find or that a Router's runtime behavior needs to be linear.

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

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

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Router[Input, Route]

Inherited from ClosableOnce

Inherited from CloseOnce

Inherited from Closable

Inherited from (Input) ⇒ Option[Route]

Inherited from AnyRef

Inherited from Any

Ungrouped