Skip to content

Commit

Permalink
optimizing imports
Browse files Browse the repository at this point in the history
Conflicts:

	finagle-thrift/src/main/java/ThriftServerTest.java
  • Loading branch information
Nick Kallen committed Jan 7, 2011
1 parent 950bfa2 commit 15b164e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import org.jboss.netty.channel.group.DefaultChannelGroup
import org.jboss.netty.handler.codec.http._
import org.jboss.netty.util.HashedWheelTimer

import com.twitter.util.Duration
import com.twitter.conversions.time._
import com.twitter.ostrich.StatsCollection

import com.twitter.finagle.util.Conversions._
import com.twitter.finagle.RandomSocket
import com.twitter.util.{RandomSocket, Duration}

object EmbeddedServer {
def apply() = new EmbeddedServer(RandomSocket())
Expand Down Expand Up @@ -75,7 +74,7 @@ class EmbeddedServer(val addr: SocketAddress) {
override def channelOpen(ctx: ChannelHandlerContext, e: ChannelStateEvent) {
if (isConnectionNonresponsive)
ctx.getChannel.setReadable(false)

channels.add(ctx.getChannel)
stats.incr("opened")
super.channelClosed(ctx, e)
Expand Down
17 changes: 4 additions & 13 deletions finagle-thrift/src/main/java/ThriftServerTest.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
package com.twitter.finagle.javaapi;

import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.concurrent.Executors;

import org.apache.thrift.TBase;
import org.jboss.netty.bootstrap.*;
import org.jboss.netty.buffer.*;
import org.jboss.netty.channel.*;
import org.jboss.netty.handler.codec.http.*;

import com.twitter.finagle.service.*;
import com.twitter.finagle.builder.*;
import com.twitter.finagle.builder.ServerBuilder;
import com.twitter.finagle.service.Service;
import com.twitter.finagle.thrift.*;
import com.twitter.silly.Silly;
import com.twitter.util.Future;
import com.twitter.util.*;

import com.twitter.silly.Silly;
import java.net.InetSocketAddress;

public class ThriftServerTest {
public static void runServer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.twitter.finagle.thrift

import org.apache.thrift.transport.TTransport

import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}
import org.jboss.netty.buffer.ChannelBuffer

class ChannelBufferTransport(underlying: ChannelBuffer) extends TTransport {
override def isOpen = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.twitter.finagle.thrift

import org.apache.thrift.{TBase, TApplicationException}
import org.apache.thrift.protocol.{TMessage, TMessageType, TProtocol, TBinaryProtocol}
import org.apache.thrift.TApplicationException
import org.apache.thrift.protocol.{TMessageType, TBinaryProtocol}

import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}
import org.jboss.netty.channel._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.twitter.finagle.thrift

import org.jboss.netty.channel.{
Channels, SimpleChannelUpstreamHandler,
MessageEvent, ChannelHandlerContext}
import org.jboss.netty.channel._
import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}

import org.apache.thrift.{TProcessor, TProcessorFactory}
import org.apache.thrift.TProcessorFactory
import org.apache.thrift.protocol.TBinaryProtocol

class ThriftProcessorHandler(processorFactory: TProcessorFactory)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.twitter.finagle.thrift

import org.apache.thrift.{TBase, TApplicationException}
import org.apache.thrift.protocol.{TMessage, TMessageType, TProtocol, TBinaryProtocol}
import org.apache.thrift.TApplicationException
import org.apache.thrift.protocol.{TMessageType, TBinaryProtocol}

import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}
import org.jboss.netty.channel._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.twitter.finagle.thrift
import scala.reflect.BeanProperty

import org.apache.thrift.protocol.{TMessage, TMessageType, TProtocol}
import org.apache.thrift.{TFieldIdEnum, TBase, TApplicationException}
import org.apache.thrift.{TBase, TApplicationException}

/**
* The ThriftCall object represents a thrift dispatch on the
Expand Down

0 comments on commit 15b164e

Please sign in to comment.