XrdClientAdminJNI.java

Go to the documentation of this file.
00001 package xrootdadmin;
00002 
00003 public class XrdClientAdminJNI {
00004 
00005     // This usually is an xrootd redirector
00006     String firsturl;
00007 
00008 
00009     public native boolean chmod(String locpathfile1, int user, int group, int other);
00010 
00011     public native boolean dirlist(String path, String[] lst);
00012 
00013     public native boolean existfiles(String[] pathslist, boolean[] res);
00014 
00015     public native boolean existdirs(String[] pathslist, boolean[] res);
00016 
00017     public native boolean getchecksum(String pathname, String chksum);
00018 
00019     public native boolean isfileonline(String[] pathslist, boolean[] res);
00020 
00021     // Finds one of the final locations for a given file
00022     // Returns false if errors occurred
00023     public native boolean locate(String pathfile, String hostname);
00024 
00025     public native boolean mv(String locpathfile1, String locpathfile2);
00026 
00027     public native boolean mkdir(String locpathfile1, int user, int group, int other);
00028 
00029     public native boolean rm(String locpathfile);
00030 
00031     public native boolean rmdir(String locpath);
00032 
00033     public native boolean prepare(String[] pathnamelist, char opts, char priority);
00034 
00035     // Gives info for a given file
00036     public native boolean stat(String pathfile, int id, long size, int flags, int modtime);
00037 
00038 
00039 
00040     public XrdClientAdminJNI(String hostname) { firsturl = "xroot://"+hostname+"//dummy"; };
00041 
00042     public static void main(String args[]) {
00043         XrdClientAdminJNI a = new XrdClientAdminJNI("kanolb-a.slac.stanford.edu");
00044         String newhost = "";
00045         boolean r = a.locate("pippo.root", newhost);
00046         System.out.println("Locate Result: " + r + " host: '" + newhost + "'");
00047     }
00048 
00049     static {
00050         System.loadLibrary("XrdClientAdminJNI");
00051     }
00052 }

Generated on Tue Jul 5 14:46:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1