enhanced the RemoteServer API
This commit is contained in:
parent
44556dc57d
commit
de982e7fe8
1 changed files with 5 additions and 1 deletions
|
|
@ -49,10 +49,14 @@ object RemoteServer extends Logging {
|
|||
|
||||
private val bootstrap = new ServerBootstrap(factory)
|
||||
|
||||
def start(loader: Option[ClassLoader]) = synchronized {
|
||||
def start: Unit = start(None)
|
||||
def start(loader: Option[ClassLoader]): Unit = start(HOSTNAME, PORT)
|
||||
def start(hostname: String, port: Int): Unit = start(hostname, port, None)
|
||||
def start(hostname: String, port: Int, loader: Option[ClassLoader]): Unit = synchronized {
|
||||
if (!isRunning) {
|
||||
log.info("Starting remote server at [%s:%s]", HOSTNAME, PORT)
|
||||
bootstrap.setPipelineFactory(new RemoteServerPipelineFactory(name, loader))
|
||||
// FIXME make these RemoteServer options configurable
|
||||
bootstrap.setOption("child.tcpNoDelay", true)
|
||||
bootstrap.setOption("child.keepAlive", true)
|
||||
bootstrap.setOption("child.reuseAddress", true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue