Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
fix up impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robey Pointer committed Mar 2, 2011
1 parent d035b09 commit 46d415c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Expand Up @@ -2,14 +2,11 @@ package com.twitter.birdname

import com.twitter.util._

class BirdNameServiceImpl(config: BirdNameServiceConfig) extends BirdNameService {
class BirdNameServiceImpl(port: Int) extends BirdNameService {
val serverName = "BirdName"
val thriftPort = config.thriftPort

// TODO: Please implement

def hello() = {
Future("world")
}
val thriftPort = port

}
def get_name() = {
Future("Jabberwocky")
}
}
Expand Up @@ -5,8 +5,8 @@ import com.twitter.admin._
object Main {
def main(args: Array[String]) {
val env = RuntimeEnvironment(this, args)
val impl = env.loadRuntimeConfig[BirdNameService]
impl.start
val service = env.loadRuntimeConfig[BirdNameService]
service.start()
}
}

Expand Up @@ -11,7 +11,7 @@ class BirdNameConfig extends ServerConfig[BirdNameService] {
var serverPort: Int = 9999

def apply(runtime: RuntimeEnvironment) = {
val server = new BirdNameService(serverPort)
val server = new BirdNameServiceImpl(serverPort)
ServiceTracker.register(server)
server
}
Expand Down

0 comments on commit 46d415c

Please sign in to comment.