org.apache.hadoop.ipc
Class RPC.Server

java.lang.Object
  extended by org.apache.hadoop.ipc.Server
      extended by org.apache.hadoop.ipc.RPC.Server
Enclosing class:
RPC

public static class RPC.Server
extends Server

An RPC Server.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.ipc.Server
Server.Connection
 
Field Summary
 
Fields inherited from class org.apache.hadoop.ipc.Server
CURRENT_VERSION, HEADER, LOG, rpcMetrics
 
Constructor Summary
RPC.Server(Object instance, Configuration conf, String bindAddress, int port)
          Construct an RPC server.
RPC.Server(Object instance, Configuration conf, String bindAddress, int port, int numHandlers, boolean verbose, SecretManager<? extends TokenIdentifier> secretManager)
          Construct an RPC server.
 
Method Summary
 Writable call(Class<?> protocol, Writable param, long receivedTime)
          Called for each call.
 
Methods inherited from class org.apache.hadoop.ipc.Server
authorize, bind, call, get, getCallQueueLen, getListenerAddress, getNumOpenConnections, getRemoteAddress, getRemoteIp, getRpcMetrics, join, setSocketSendBufSize, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPC.Server

public RPC.Server(Object instance,
                  Configuration conf,
                  String bindAddress,
                  int port)
           throws IOException
Construct an RPC server.

Parameters:
instance - the instance whose methods will be called
conf - the configuration to use
bindAddress - the address to bind on to listen for connection
port - the port to listen for connections on
Throws:
IOException

RPC.Server

public RPC.Server(Object instance,
                  Configuration conf,
                  String bindAddress,
                  int port,
                  int numHandlers,
                  boolean verbose,
                  SecretManager<? extends TokenIdentifier> secretManager)
           throws IOException
Construct an RPC server.

Parameters:
instance - the instance whose methods will be called
conf - the configuration to use
bindAddress - the address to bind on to listen for connection
port - the port to listen for connections on
numHandlers - the number of method handler threads to run
verbose - whether each call should be logged
Throws:
IOException
Method Detail

call

public Writable call(Class<?> protocol,
                     Writable param,
                     long receivedTime)
              throws IOException
Description copied from class: Server
Called for each call.

Specified by:
call in class Server
Throws:
IOException


Copyright © 2009 The Apache Software Foundation