Commit 1c33b539 authored by legoc's avatar legoc
Browse files

Added HasRunningCommands request in ServerManager

parent 046c21ff
......@@ -1059,5 +1059,29 @@ public class ServantManagerAccessor {
return null;
public boolean hasRunningCommands(String userName, String message) {
// Create the message type.
ServantManagerRequest.Message type = ServantManagerRequest.Message.newBuilder()
// Create the request.
ServantManagerRequest.EmptyRequest request = ServantManagerRequest.EmptyRequest.newBuilder()
servantManagerRequester.sendTwoParts(type.toByteArray(), request.toByteArray());
try {
Common.BooleanResponse response = Common.BooleanResponse.parseFrom(servantManagerRequester.receive());
return response.getValue();
catch (InvalidProtocolBufferException e) {
LOGGER.logp(Level.WARNING, this.getClass().getName(), "hasRunningCommands", "error in parsing response");
return false;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment