org.apache.hadoop.ipc
Class RPC.Server
java.lang.Object
org.apache.hadoop.ipc.Server
org.apache.hadoop.ipc.RPC.Server
- Enclosing class:
- RPC
public static class RPC.Server
- extends Server
An RPC Server.
Constructor Summary |
RPC.Server(java.lang.Object instance,
Configuration conf,
java.lang.String bindAddress,
int port)
Construct an RPC server. |
RPC.Server(java.lang.Object instance,
Configuration conf,
java.lang.String bindAddress,
int port,
int numHandlers,
boolean verbose)
Construct an RPC server. |
Method Summary |
void |
authorize(javax.security.auth.Subject user,
org.apache.hadoop.ipc.ConnectionHeader connection)
Authorize the incoming client connection. |
Writable |
call(java.lang.Class<?> protocol,
Writable param,
long receivedTime)
Called for each call. |
Methods inherited from class org.apache.hadoop.ipc.Server |
bind, call, get, getCallQueueLen, getListenerAddress, getNumOpenConnections, getRemoteAddress, getRemoteIp, join, setSocketSendBufSize, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RPC.Server
public RPC.Server(java.lang.Object instance,
Configuration conf,
java.lang.String bindAddress,
int port)
throws java.io.IOException
- Construct an RPC server.
- Parameters:
instance
- the instance whose methods will be calledconf
- the configuration to usebindAddress
- the address to bind on to listen for connectionport
- the port to listen for connections on
- Throws:
java.io.IOException
RPC.Server
public RPC.Server(java.lang.Object instance,
Configuration conf,
java.lang.String bindAddress,
int port,
int numHandlers,
boolean verbose)
throws java.io.IOException
- Construct an RPC server.
- Parameters:
instance
- the instance whose methods will be calledconf
- the configuration to usebindAddress
- the address to bind on to listen for connectionport
- the port to listen for connections onnumHandlers
- the number of method handler threads to runverbose
- whether each call should be logged
- Throws:
java.io.IOException
call
public Writable call(java.lang.Class<?> protocol,
Writable param,
long receivedTime)
throws java.io.IOException
- Description copied from class:
Server
- Called for each call.
- Specified by:
call
in class Server
- Throws:
java.io.IOException
authorize
public void authorize(javax.security.auth.Subject user,
org.apache.hadoop.ipc.ConnectionHeader connection)
throws AuthorizationException
- Description copied from class:
Server
- Authorize the incoming client connection.
- Overrides:
authorize
in class Server
- Parameters:
user
- client userconnection
- incoming connection
- Throws:
AuthorizationException
- when the client isn't authorized to talk the protocol
Copyright © 2009 The Apache Software Foundation