Class NetMgr
java.lang.Object
com.emc.ecs.nfsclient.network.NetMgr
Singleton class to manage all Connection instances
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemove a dropped connection from the map.io.netty.channel.EventLoopGroupGetter method for Factory access.static NetMgrReturns the instance.sendAndWait(String serverIP, int port, boolean usePrivilegedPort, Xdr xdrRequest, int timeout) Basic RPC call functionality only.voidshutdown()Called when the application is being shut down.
-
Method Details
-
getInstance
Returns the instance. -
sendAndWait
public Xdr sendAndWait(String serverIP, int port, boolean usePrivilegedPort, Xdr xdrRequest, int timeout) throws RpcException Basic RPC call functionality only. Send the request, creating a new connection as necessary, and return the raw Xdr returned.- Parameters:
serverIP- The endpoint of the server being called.port- The remote host port being called for this operation.usePrivilegedPort-- If
true, use a privileged local port (below 1024) for RPC communication. - If
false, use any non-privileged local port for RPC communication.
- If
xdrRequest- The Xdr data for the request.timeout- The timeout in seconds.- Returns:
- The Xdr data for the response.
- Throws:
RpcException
-
dropConnection
Remove a dropped connection from the map.- Parameters:
key- The key
-
shutdown
public void shutdown()Called when the application is being shut down. -
getFactory
public io.netty.channel.EventLoopGroup getFactory()Getter method for Factory access.- Returns:
- The factory.
-