abstract class AbstractTwitterServer extends TwitterServer
A Java-friendly version of the TwitterServer.
In addition to TwitterServer, this abstract class defines its own
Java-friendly lifecycle methods onInit, preMain, postMain and
onExit that might be overridden in a concrete class.
In order to launch the AbstractTwitterServer instance, the main
method should be explicitly defined. It makes sense to define it
within an inner class Main as shown below.
public class JavaServer extends AbstractTwitterServer { public static class Main { public static void main(String[] args) { new JavaServer().main(args); } } }
The Main class containing the main method may be launched via
java JavaServer$Main.
- Alphabetic
- By Inheritance
- AbstractTwitterServer
- TwitterServer
- Lifecycle
- AdminHttpServer
- Hooks
- DtabFlags
- Linters
- Stats
- Logging
- Slf4jBridge
- App
- Lifecycle
- CloseOnceAwaitably
- CloseOnceAwaitably0
- Awaitable
- ClosableOnce
- CloseOnce
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AbstractTwitterServer()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
val
MinGrace: Duration
- Definition Classes
- App
-
def
addAdminRoute(route: Route): Unit
Add a Route into admin http server.
Add a Route into admin http server.
- Definition Classes
- AdminHttpServer
-
def
addAdminRoutes(newRoutes: Seq[Route]): Unit
Add a collection of Routes into admin http server.
Add a collection of Routes into admin http server.
- Definition Classes
- AdminHttpServer
-
def
addDtabs(): Unit
- Definition Classes
- DtabFlags
-
def
adminBoundAddress: InetSocketAddress
The address to which the Admin HTTP server is bound.
The address to which the Admin HTTP server is bound.
- Definition Classes
- AdminHttpServer
-
val
adminHttpServer: ListeningServer
- Attributes
- protected
- Definition Classes
- AdminHttpServer
- Annotations
- @volatile()
-
val
adminPort: Flag[InetSocketAddress]
- Definition Classes
- AdminHttpServer
-
def
allowUndefinedFlags: Boolean
- Attributes
- protected
- Definition Classes
- App
-
def
args: Array[String]
- Definition Classes
- App
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
close(deadline: Time): Future[Unit]
- Definition Classes
- CloseOnce → Closable
-
def
close(after: Duration): Future[Unit]
- Definition Classes
- Closable
-
final
def
close(): Future[Unit]
- Definition Classes
- Closable
-
final
def
closeFuture: Future[Unit]
- Attributes
- protected
- Definition Classes
- CloseOnce
-
final
def
closeOnExit(closable: Closable): Unit
- Definition Classes
- App
-
final
def
closeOnExitLast(closable: Closable): Unit
- Definition Classes
- App
-
def
closeOnce(deadline: Time): Future[Unit]
- Attributes
- protected
- Definition Classes
- App → CloseOnce
-
def
configureAdminHttpServer(server: Server): Server
This method allows for further configuration of the http server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,
This method allows for further configuration of the http server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,
override def configureAdminHttpServer(server: Http.Server): Http.Server = server.withMonitor(myMonitor)
- server
- the com.twitter.finagle.Http.Server to configure.
- returns
a configured Http.Server.
- Attributes
- protected
- Definition Classes
- AdminHttpServer
-
def
debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debugResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
defaultAdminPort: Int
- Definition Classes
- AdminHttpServer
-
def
defaultCloseGracePeriod: Duration
- Definition Classes
- App
-
def
disableAdminHttpServer: Boolean
If true, the Twitter-Server admin server will be disabled.
If true, the Twitter-Server admin server will be disabled. Note: Disabling the admin server allows services to be deployed into environments where only a single port is allowed
- Attributes
- protected
- Definition Classes
- AdminHttpServer
-
val
dtabAddBaseFlag: Flag[Dtab]
- Definition Classes
- DtabFlags
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
errorResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
exitOnError(reason: String, details: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
exitOnError(reason: String): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
exitOnError(throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
failfastOnFlagsNotParsed: Boolean
- Attributes
- protected
- Definition Classes
- App
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
val
flag: Flags
- Definition Classes
- App
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
group: String
- Definition Classes
- Lifecycle
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
infoResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
init(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- App
-
final
def
isClosed: Boolean
- Definition Classes
- CloseOnce
-
def
isDebugEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isDebugEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isErrorEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isErrorEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isInfoEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isInfoEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isReady(implicit permit: CanAwait): Boolean
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
-
def
isTraceEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isTraceEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isWarnEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isWarnEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
libraryName: String
Name used for registration in the com.twitter.util.registry.Library
Name used for registration in the com.twitter.util.registry.Library
- returns
library name to register in the Library registry.
- Attributes
- protected
- Definition Classes
- AdminHttpServer
-
def
linterRules: Seq[Rule]
Exposed for testing
Exposed for testing
- Definition Classes
- Linters
-
def
loadServiceBindings: Seq[Binding[_]]
- Attributes
- protected[this]
- Definition Classes
- App
-
final
def
logger: Logger
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
loggerName: String
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
main(): Unit
The
mainmethod of this server.The
mainmethod of this server.- Annotations
- @throws( ... )
-
final
def
main(args: Array[String]): Unit
- Definition Classes
- App
-
val
name: String
- Definition Classes
- App
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
nonExitingMain(args: Array[String]): Unit
- Definition Classes
- App
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
observe(event: Event)(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- Lifecycle
-
final
def
observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
- Attributes
- protected
- Definition Classes
- Lifecycle
-
def
onExit(): Unit
Called prior to application exiting.
-
final
def
onExit(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
onExitLast(): Unit
Called prior to application exiting after
onExit. -
final
def
onExitLast(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
onInit(): Unit
Called prior to application initialization.
-
def
parseArgs(args: Array[String]): Unit
- Attributes
- protected[this]
- Definition Classes
- App
-
def
postMain(): Unit
Called after the
mainmethod. -
final
def
postmain(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
preMain(): Unit
Called before the
mainmethod. -
final
def
premain(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- App
-
def
ready(timeout: Duration)(implicit permit: CanAwait): AbstractTwitterServer.this.type
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
-
def
result(timeout: Duration)(implicit permit: CanAwait): Unit
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
-
def
routes: Seq[Route]
Get all Routes of admin http server.
Get all Routes of admin http server.
- Definition Classes
- AdminHttpServer
-
final
def
runOnExit(runnable: Runnable): Unit
- Attributes
- protected
- Definition Classes
- App
-
final
def
runOnExitLast(runnable: Runnable): Unit
- Attributes
- protected
- Definition Classes
- App
-
lazy val
shutdownTimer: Timer
Use the Finagle DefaultTimer
Use the Finagle DefaultTimer
- Attributes
- protected
- Definition Classes
- TwitterServer → App
-
def
startupCompletionEvent: Event
- Attributes
- protected[twitter]
- Definition Classes
- TwitterServer
-
def
statsReceiver: StatsReceiver
This returns the global LoadedStatsReceiver instance.
This returns the global LoadedStatsReceiver instance.
- returns
a StatsReceiver instance.
- Definition Classes
- Stats
- See also
-
final
val
suppressGracefulShutdownErrors: Boolean
Don't let applications opt-out
Don't let applications opt-out
- Definition Classes
- TwitterServer → App
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
traceResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warnResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging