public abstract class RpcProgram
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
handleInternal(org.jboss.netty.channel.ChannelHandlerContext, org.apache.hadoop.oncrpc.RpcInfo) to handle the requests received.| Modifier and Type | Field and Description |
|---|---|
static int |
RPCB_PORT |
| Modifier | Constructor and Description |
|---|---|
protected |
RpcProgram(String program,
String host,
int port,
int progNumber,
int lowProgVersion,
int highProgVersion)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPort() |
protected abstract void |
handleInternal(org.jboss.netty.channel.ChannelHandlerContext ctx,
RpcInfo info) |
protected abstract boolean |
isIdempotent(RpcCall call) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
void |
register(int transport,
int boundPort)
Register this program with the local portmapper.
|
protected void |
register(PortmapMapping mapEntry,
boolean set)
Register the program with Portmap or Rpcbind
|
void |
startDaemons() |
String |
toString() |
void |
unregister(int transport,
int boundPort)
Unregister this program with the local portmapper.
|
public static final int RPCB_PORT
protected RpcProgram(String program, String host, int port, int progNumber, int lowProgVersion, int highProgVersion)
program - program namehost - host where the Rpc server program is startedport - port where the Rpc server program is listening toprogNumber - program number as defined in RFC 1050lowProgVersion - lowest version of the specification supportedhighProgVersion - highest version of the specification supportedpublic void register(int transport,
int boundPort)
public void unregister(int transport,
int boundPort)
protected void register(PortmapMapping mapEntry, boolean set)
public void startDaemons()
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionprotected abstract void handleInternal(org.jboss.netty.channel.ChannelHandlerContext ctx,
RpcInfo info)
protected abstract boolean isIdempotent(RpcCall call)
public int getPort()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.