org.apache.hadoop.oncrpc
Class SimpleTcpServer
java.lang.Object
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
SimpleTcpServer
public SimpleTcpServer(int port,
RpcProgram program,
int workercount)
- Parameters:
port - TCP port where to start the server atprogram - RPC program corresponding to the serverworkercount - Number of worker threads
run
public void run()
getBoundPort
public int getBoundPort()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.