NettyServer

wvlet.airframe.http.netty.NettyServer
class NettyServer(config: NettyServerConfig, session: Session) extends HttpServer, LogSupport

Attributes

Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
trait HttpServer
trait AutoCloseable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def awaitTermination(): Unit

Await and block until the server terminates. If the server is already terminated (via close()), this method returns immediately.

Await and block until the server terminates. If the server is already terminated (via close()), this method returns immediately.

Attributes

Definition Classes
HttpServer
override def localAddress: String

Return the local server address in (host):(port) format. e.g., localhost:8080. This method can be used for creating a new Http client for the server. For example:

Return the local server address in (host):(port) format. e.g., localhost:8080. This method can be used for creating a new Http client for the server. For example:

 Netty.server.withRouter(router).start { server =>
   Using.resource(Http.client.newSyncClient(server.localAddress)) { client =>
      val resp = client.send(Http.GET("/hello"))
   }
 }

Attributes

Definition Classes
HttpServer
@PostConstruct
def start: Unit
override def stop(): Unit

Stop the server

Stop the server

Attributes

Definition Classes
HttpServer

Inherited methods

override def close(): Unit

Stop the server. When using Airframe DI, this method will be called automatically.

Stop the server. When using Airframe DI, this method will be called automatically.

Attributes

Definition Classes
HttpServer -> AutoCloseable
Inherited from:
HttpServer
inline protected def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods