Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

trivial: remove accidentally added file

  • Loading branch information...
commit 8720687f82d5edb3d1e2bd2d58e6f0c0ea10ee17 1 parent 11e0d76
@chunyan chunyan authored
Showing with 0 additions and 30 deletions.
  1. +0 −30 scrooge-maven-plugin/demo/DemoServer.scala
View
30 scrooge-maven-plugin/demo/DemoServer.scala
@@ -1,30 +0,0 @@
-import java.net.InetSocketAddress
-import com.twitter.util.Future
-import java.util.concurrent.atomic.AtomicInteger
-import com.twitter.mydemo.renamed.{User, UserService}
-import com.twitter.finagle.thrift.{ThriftServerFramedCodec, ThriftClientFramedCodec, ThriftClientRequest}
-import com.twitter.finagle.builder.{ServerBuilder, ClientBuilder}
-import org.apache.thrift.protocol.TBinaryProtocol
-
-
-object DemoServer {
- private val userIdCounter: AtomicInteger = new AtomicInteger(0)
-
- // need to provide an implementation for the finagle service
- class MyUserImpl extends UserService.FutureIface {
- def createUser(name: String): Future[User] = {
- val id = userIdCounter.incrementAndGet()
- Future.value(User(id, name))
- }
- }
-
- def buildServer() = {
- val protocol = new TBinaryProtocol.Factory()
- val serverService = new UserService.FinagledService(new MyUserImpl, protocol)
- ServerBuilder()
- .codec(ThriftServerFramedCodec())
- .name("binary_service")
- .bindTo(new InetSocketAddress(0))
- .build(serverService)
- }
-}
Please sign in to comment.
Something went wrong with that request. Please try again.