|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.oncrpc.RpcProgram
public abstract class RpcProgram
Class for writing RPC server programs based on RFC 1050. Extend this class
and implement handleInternal(org.apache.hadoop.oncrpc.RpcCall, org.apache.hadoop.oncrpc.XDR, org.apache.hadoop.oncrpc.XDR, java.net.InetAddress, org.jboss.netty.channel.Channel)
to handle the requests received.
Field Summary | |
---|---|
static int |
RPCB_PORT
|
Constructor Summary | |
---|---|
protected |
RpcProgram(String program,
String host,
int port,
int progNumber,
int lowProgVersion,
int highProgVersion,
int cacheSize)
Constructor |
Method Summary | |
---|---|
int |
getPort()
|
XDR |
handle(XDR xdr,
InetAddress client,
org.jboss.netty.channel.Channel channel)
|
protected abstract XDR |
handleInternal(RpcCall rpcCall,
XDR in,
XDR out,
InetAddress client,
org.jboss.netty.channel.Channel channel)
Handle an RPC request. |
protected abstract boolean |
isIdempotent(RpcCall call)
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RPCB_PORT
Constructor Detail |
---|
protected RpcProgram(String program, String host, int port, int progNumber, int lowProgVersion, int highProgVersion, int cacheSize)
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 supportedcacheSize
- size of cache to handle duplciate requests. Size <= 0
indicates no cache.Method Detail |
---|
public void register(int transport)
protected void register(PortmapMapping mapEntry)
protected abstract XDR handleInternal(RpcCall rpcCall, XDR in, XDR out, InetAddress client, org.jboss.netty.channel.Channel channel)
rpcCall
- RPC call that is receivedin
- xdr with cursor at reading the remaining bytes of a method callout
- xdr output corresponding to Rpc replyclient
- making the Rpc requestchannel
- connection over which Rpc request is received
public XDR handle(XDR xdr, InetAddress client, org.jboss.netty.channel.Channel channel)
public String toString()
toString
in class Object
protected abstract boolean isIdempotent(RpcCall call)
public int getPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |