org.apache.hadoop.oncrpc
Class SimpleTcpServer

java.lang.Object
  extended by org.apache.hadoop.oncrpc.SimpleTcpServer

public class SimpleTcpServer
extends Object

Simple UDP server implemented using netty.


Field Summary
static org.apache.commons.logging.Log LOG
           
protected  org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory
           
protected  int port
           
protected  RpcProgram rpcProgram
           
protected  int workerCount
          The maximum number of I/O worker threads
 
Constructor Summary
SimpleTcpServer(int port, RpcProgram program, int workercount)
           
 
Method Summary
 org.jboss.netty.channel.ChannelPipelineFactory getPipelineFactory()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

port

protected final int port

pipelineFactory

protected final org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory

rpcProgram

protected final RpcProgram rpcProgram

workerCount

protected final int workerCount
The maximum number of I/O worker threads

Constructor Detail

SimpleTcpServer

public SimpleTcpServer(int port,
                       RpcProgram program,
                       int workercount)
Parameters:
port - TCP port where to start the server at
program - RPC program corresponding to the server
workercount - Number of worker threads
Method Detail

getPipelineFactory

public org.jboss.netty.channel.ChannelPipelineFactory getPipelineFactory()

run

public void run()


Copyright © 2009 The Apache Software Foundation