org.apache.hadoop.ipc
Class RPC

java.lang.Object
  extended byorg.apache.hadoop.ipc.RPC

public class RPC
extends Object

A simple RPC mechanism. A protocol is a Java interface. All parameters and return types must be one of:

All methods in the protocol should throw only IOException. No field data of the protocol instance is transmitted.


Nested Class Summary
static class RPC.Server
          An RPC Server.
 
Method Summary
static Object[] call(Method method, Object[][] params, InetSocketAddress[] addrs, Configuration conf)
          Expert: Make multiple, parallel calls to a set of servers.
static Object getProxy(Class protocol, InetSocketAddress addr, Configuration conf)
          Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.
static RPC.Server getServer(Object instance, int port, Configuration conf)
          Construct a server for a protocol implementation instance listening on a port.
static RPC.Server getServer(Object instance, int port, int numHandlers, boolean verbose, Configuration conf)
          Construct a server for a protocol implementation instance listening on a port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProxy

public static Object getProxy(Class protocol,
                              InetSocketAddress addr,
                              Configuration conf)
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.


call

public static Object[] call(Method method,
                            Object[][] params,
                            InetSocketAddress[] addrs,
                            Configuration conf)
                     throws IOException
Expert: Make multiple, parallel calls to a set of servers.

Throws:
IOException

getServer

public static RPC.Server getServer(Object instance,
                                   int port,
                                   Configuration conf)
Construct a server for a protocol implementation instance listening on a port.


getServer

public static RPC.Server getServer(Object instance,
                                   int port,
                                   int numHandlers,
                                   boolean verbose,
                                   Configuration conf)
Construct a server for a protocol implementation instance listening on a port.



Copyright © 2006 The Apache Software Foundation