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
protected  int boundPort
           
static org.apache.commons.logging.Log LOG
           
protected  int port
           
protected  org.jboss.netty.channel.SimpleChannelUpstreamHandler rpcProgram
           
protected  int workerCount
          The maximum number of I/O worker threads
 
Constructor Summary
SimpleTcpServer(int port, RpcProgram program, int workercount)
           
 
Method Summary
 int getBoundPort()
           
 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

boundPort

protected int boundPort

rpcProgram

protected final org.jboss.netty.channel.SimpleChannelUpstreamHandler 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

run

public void run()

getBoundPort

public int getBoundPort()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.