com.nhncorp.neptune.common.ipc
Class NRPC.Server

java.lang.Object
  extended by com.nhncorp.neptune.common.ipc.NServer
      extended by com.nhncorp.neptune.common.ipc.NRPC.Server
Enclosing class:
NRPC

public static class NRPC.Server
extends NServer

An RPC Server.


Field Summary
 
Fields inherited from class com.nhncorp.neptune.common.ipc.NServer
HEADER, LOG
 
Constructor Summary
NRPC.Server(com.nhncorp.pleiades.client.LockService lockService, java.lang.Object instance, NConfiguration conf, java.lang.String bindAddress, int port)
          Construct an RPC server.
NRPC.Server(com.nhncorp.pleiades.client.LockService lockService, java.lang.Object instance, NConfiguration conf, java.lang.String bindAddress, int port, int numHandlers, boolean verbose)
          Construct an RPC server.
 
Method Summary
 NWritable call(NWritable param)
          Called for each call.
 
Methods inherited from class com.nhncorp.neptune.common.ipc.NServer
get, getListenerAddress, getRemoteAddress, getRemoteIp, join, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NRPC.Server

public NRPC.Server(com.nhncorp.pleiades.client.LockService lockService,
                   java.lang.Object instance,
                   NConfiguration conf,
                   java.lang.String bindAddress,
                   int port)
            throws java.io.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:
java.io.IOException

NRPC.Server

public NRPC.Server(com.nhncorp.pleiades.client.LockService lockService,
                   java.lang.Object instance,
                   NConfiguration 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 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:
java.io.IOException
Method Detail

call

public NWritable call(NWritable param)
               throws java.io.IOException
Description copied from class: NServer
Called for each call.

Specified by:
call in class NServer
Throws:
java.io.IOException