|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nhncorp.neptune.common.ipc.NServer
public abstract class NServer
An abstract IPC service. IPC calls take a single NWritable as a
parameter, and return a NWritable as their value. A service runs on
a port and is defined by a parameter class and a value class.
NClient| Field Summary | |
|---|---|
static java.nio.ByteBuffer |
HEADER
The first four bytes of Hadoop RPC connections |
static org.apache.commons.logging.Log |
LOG
|
| Method Summary | |
|---|---|
abstract NWritable |
call(NWritable param)
Called for each call. |
static NServer |
get()
Returns the server instance called under or null. |
java.net.InetSocketAddress |
getListenerAddress()
Return the socket (ip+port) on which the RPC server is listening to. |
static java.lang.String |
getRemoteAddress()
Returns remote address as a string when invoked inside an RPC. |
static java.net.InetAddress |
getRemoteIp()
Returns the remote side ip address when invoked inside an RPC Returns null incase of an error. |
void |
join()
Wait for the server to be stopped. |
void |
start()
Starts the service. |
void |
stop()
Stops the service. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.nio.ByteBuffer HEADER
public static final org.apache.commons.logging.Log LOG
| Method Detail |
|---|
public static NServer get()
call(NWritable) implementations, and under NWritable
methods of paramters and return values. Permits applications to access
the server context.
public static java.net.InetAddress getRemoteIp()
public static java.lang.String getRemoteAddress()
public void start()
throws java.io.IOException
java.io.IOExceptionpublic void stop()
public void join()
throws java.lang.InterruptedException
stop().
java.lang.InterruptedExceptionpublic java.net.InetSocketAddress getListenerAddress()
public abstract NWritable call(NWritable param)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||