@RpcMethod public void powerVmOp(String vmId,PowerVmOp op,AsyncMethodCallback<Host.AsyncClient.power_vm_op_call> handler) throws RpcException {
  ensureClient();
  PowerVmOpRequest powerVmOpRequest=new PowerVmOpRequest(vmId,op);
  clientProxy.setTimeout(POWER_VM_OP_TIMEOUT_MS);
  logger.info("power_vm_op vm {}, target {}, request {}",vmId,getHostIp(),powerVmOpRequest);
  try {
    clientProxy.power_vm_op(powerVmOpRequest,handler);
  }
 catch (  TException e) {
    throw new RpcException(e.getMessage());
  }
}

@ RpcMethod public void powerVmOp ( String vmId , PowerVmOp op , AsyncMethodCallback < Host . AsyncClient . power_vm_op_call > handler ) throws RpcException { ensureClient ( ) ; PowerVmOpRequest powerVmOpRequest = new PowerVmOpRequest ( vmId , op ) ; clientProxy . setTimeout ( POWER_VM_OP_TIMEOUT_MS ) ; logger . info ( "power_vm_op vm {}, target {}, request {}" , vmId , getHostIp ( ) , powerVmOpRequest ) ; try { clientProxy . power_vm_op ( powerVmOpRequest , handler ) ; } catch ( TException e ) { throw new RpcException ( e . getMessage ( ) ) ; } }
this method performs an asynchronous thrift call to perform a power state operation on a vm . on completion , the specified handler is invoked .
