@Override public CheckAccessResponseProto checkAccess(RpcController controller, CheckAccessRequestProto req) throws ServiceException { try { server.checkAccess(req.getPath(), PBHelper.convert(req.getMode())); } catch (IOException e) { throw new ServiceException(e); } return VOID_CHECKACCESS_RESPONSE; }
@Override public void checkAccess(String path, FsAction mode) throws IOException { CheckAccessRequestProto req = CheckAccessRequestProto.newBuilder() .setPath(path).setMode(PBHelper.convert(mode)).build(); try { rpcProxy.checkAccess(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public void checkAccess(String path, FsAction mode) throws IOException { CheckAccessRequestProto req = CheckAccessRequestProto.newBuilder() .setPath(path).setMode(PBHelperClient.convert(mode)).build(); try { rpcProxy.checkAccess(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public CheckAccessResponseProto checkAccess(RpcController controller, CheckAccessRequestProto req) throws ServiceException { try { server.checkAccess(req.getPath(), PBHelperClient.convert(req.getMode())); } catch (IOException e) { throw new ServiceException(e); } return VOID_CHECKACCESS_RESPONSE; }