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], Logging, ClosableOnce, CloseOnce, Closable, (Input) ⇒ Option[Route], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractRouter
  2. Router
  3. Logging
  4. ClosableOnce
  5. CloseOnce
  6. Closable
  7. Function1
  8. AnyRef
  9. 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. final def closeFuture: Future[Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    CloseOnce
  12. 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.

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

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  14. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  15. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  16. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  17. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  18. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  19. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  22. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  23. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. 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.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  30. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  31. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  32. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  33. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  34. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  35. final def isClosed: Boolean

    Permalink
    Definition Classes
    CloseOnce
  36. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  41. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  43. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. 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
  48. final def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  49. final def loggerName: String

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Java-friendly version of apply

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

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

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

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  57. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  58. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  61. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  62. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  66. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  69. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from Router[Input, Route]

Inherited from Logging

Inherited from ClosableOnce

Inherited from CloseOnce

Inherited from Closable

Inherited from (Input) ⇒ Option[Route]

Inherited from AnyRef

Inherited from Any

Ungrouped