@Override public SetSafeModeResponseProto setSafeMode(RpcController controller, SetSafeModeRequestProto req) throws ServiceException { try { boolean result = server.setSafeMode(PBHelper.convert(req.getAction()), req.getChecked()); return SetSafeModeResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public boolean setSafeMode(SafeModeAction action, boolean isChecked) throws IOException { SetSafeModeRequestProto req = SetSafeModeRequestProto.newBuilder() .setAction(PBHelper.convert(action)).setChecked(isChecked).build(); try { return rpcProxy.setSafeMode(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean setSafeMode(SafeModeAction action, boolean isChecked) throws IOException { SetSafeModeRequestProto req = SetSafeModeRequestProto.newBuilder() .setAction(PBHelperClient.convert(action)) .setChecked(isChecked).build(); try { return rpcProxy.setSafeMode(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public SetSafeModeResponseProto setSafeMode(RpcController controller, SetSafeModeRequestProto req) throws ServiceException { try { boolean result = server.setSafeMode(PBHelperClient.convert(req.getAction()), req.getChecked()); return SetSafeModeResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public SetSafeModeResponseProto setSafeMode(RpcController controller, SetSafeModeRequestProto req) throws ServiceException { try { boolean result = server .setSafeMode(PBHelper.convert(req.getAction()), req.getChecked()); return SetSafeModeResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public boolean setSafeMode(SafeModeAction action, boolean isChecked) throws IOException { SetSafeModeRequestProto req = SetSafeModeRequestProto.newBuilder().setAction(PBHelper.convert(action)) .setChecked(isChecked).build(); try { return rpcProxy.setSafeMode(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }