code: private void registerRemoteCommands()
     {
        requestForResponsibleForResuming = rpcService.registerCommand(new RemoteCommand()
        {
           public String getId()
           {
              return this.getClass().getName() + "-requestForResponsibilityForResuming-" + wsEntry.getUniqueName();
           }
  
           public Serializable execute(Serializable[] args) throws Throwable
           {
              return responsibleForResuming.get();
           }
        });
  
        rpcService.registerTopologyChangeListener(this);
     }
docs: Register remote commands.