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)
Register this program with the local portmapper.
|
protected void |
register(PortmapMapping mapEntry)
Register the program with Portmap or Rpcbind
|
String |
toString() |
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)
protected void register(PortmapMapping mapEntry)
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) throws Exception
messageReceived
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
protected abstract void handleInternal(org.jboss.netty.channel.ChannelHandlerContext ctx, RpcInfo info)
protected abstract boolean isIdempotent(RpcCall call)
public int getPort()
Copyright © 2013 Apache Software Foundation. All rights reserved.