Class MsgModuleSender
java.lang.Object
com.scaleoutsoftware.modules.client.MsgModuleSender
The MsgModuleSender sends messages to modules.
-
Constructor Summary
ConstructorsConstructorDescriptionMsgModuleSender(com.scaleout.client.GridConnection connection) Instantiate the MsgModuleSender. -
Method Summary
Modifier and TypeMethodDescriptionsendToModule(String moduleName, String objectId, byte[] message) Sends a messages to a module with a default timeout of 5 seconds.sendToModule(String moduleName, String objectId, byte[] message, Duration timeout) Sends a messages to a module with a configurable timeout.
-
Constructor Details
-
MsgModuleSender
public MsgModuleSender(com.scaleout.client.GridConnection connection) Instantiate the MsgModuleSender.- Parameters:
connection- theGridConnection.
-
-
Method Details
-
sendToModule
Sends a messages to a module with a default timeout of 5 seconds.- Parameters:
moduleName- the module name.objectId- the unique SOSS object id.message- the serialized message.- Returns:
- a
CompletableFuturethat returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported.
-
sendToModule
public CompletableFuture<Void> sendToModule(String moduleName, String objectId, byte[] message, Duration timeout) Sends a messages to a module with a configurable timeout.- Parameters:
moduleName- the module name.objectId- the unique SOSS object id.message- the serialized message.timeout- the duration of time in seconds before a timeout occurs.- Returns:
- a
CompletableFuturethat returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported
-