Package org.apache.nemo.client
Class DriverRPCServer
- java.lang.Object
-
- org.apache.nemo.client.DriverRPCServer
-
@NotThreadSafe public final class DriverRPCServer extends java.lang.Object
Client-side RPC implementation for communication from/to Nemo Driver.
-
-
Constructor Summary
Constructors Constructor Description DriverRPCServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.reef.tang.Configuration
getListeningConfiguration()
java.lang.String
getListeningHost()
int
getListeningPort()
DriverRPCServer
registerHandler(ControlMessage.DriverToClientMessageType type, org.apache.reef.wake.EventHandler<ControlMessage.DriverToClientMessage> handler)
Registers handler for the given type of message.void
run()
Runs the RPC server.void
send(ControlMessage.ClientToDriverMessage message)
Sends a message to driver.void
shutdown()
Shut down the server.
-
-
-
Method Detail
-
registerHandler
public DriverRPCServer registerHandler(ControlMessage.DriverToClientMessageType type, org.apache.reef.wake.EventHandler<ControlMessage.DriverToClientMessage> handler)
Registers handler for the given type of message.- Parameters:
type
- the type of messagehandler
- handler implementation- Returns:
this
-
run
public void run()
Runs the RPC server. Specifically, creates aNettyMessagingTransport
and binds it to a listening port.
-
getListeningPort
public int getListeningPort()
- Returns:
- the listening port
-
getListeningHost
public java.lang.String getListeningHost()
- Returns:
- the host of the client
-
getListeningConfiguration
public org.apache.reef.tang.Configuration getListeningConfiguration()
- Returns:
- the configuration for RPC server listening information
-
send
public void send(ControlMessage.ClientToDriverMessage message)
Sends a message to driver.- Parameters:
message
- message to send
-
shutdown
public void shutdown()
Shut down the server.
-
-