1 |
526
|
bojilova
|
/**************************************************************************
|
2 |
|
|
Copyright ^?? General Atomics, 1995-1999
|
3 |
|
|
All Rights Reserved
|
4 |
|
|
|
5 |
|
|
This file contains Original Code and/or Modifications of Original Code as
|
6 |
|
|
defined in and that are subject to the General Atomics Storage Resource
|
7 |
|
|
Broker Academic and Research Use License (the 'License'). This license is
|
8 |
|
|
for academic and research use only. You may not use, copy, modify or
|
9 |
|
|
distribute SRB for commercial purposes, nor incorporate the SRB into
|
10 |
|
|
commercial products without the express written permission of General
|
11 |
|
|
Atomics nor may you distribute SRB to any third party.
|
12 |
|
|
|
13 |
|
|
You may not use this software except in compliance with the License. Please
|
14 |
|
|
obtain a copy of the License at http://www.npaci.edu/DICE/SRB/License and
|
15 |
|
|
read it before using this file.
|
16 |
|
|
|
17 |
|
|
The Original Code and all software distributed under the License are
|
18 |
|
|
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
19 |
|
|
EXPRESS OR IMPLIED, AND GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER
|
20 |
|
|
CENTER HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION,
|
21 |
|
|
ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
|
22 |
|
|
NON-INFRINGEMENT OF ANY COPYRIGHT, PATENT , TRADEMARK OR OTHER RIGHTS.
|
23 |
|
|
GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER CENTER FURTHER HAVE NO
|
24 |
|
|
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCMENTS OR
|
25 |
|
|
MODIFICATIONS.. Please see the License for the specific language governing
|
26 |
|
|
rights and limitations under the License."
|
27 |
|
|
|
28 |
|
|
Please read the terms of this license carefully. By using the SRB software,
|
29 |
|
|
you are accepting and agreeing to the terms of this license with General
|
30 |
|
|
Atomics. If you are agreeing to this license on behalf of a company, or
|
31 |
|
|
other institution, you represent that you are authorized to bind the
|
32 |
|
|
company/institution to such a license. If you do not meet this criterion or
|
33 |
|
|
you do not agree to any of the terms of this license, you are not
|
34 |
|
|
authorized to use the software.
|
35 |
|
|
**************************************************************************/
|
36 |
|
|
|
37 |
|
|
|
38 |
299
|
higgins
|
/**
|
39 |
526
|
bojilova
|
* SrbJavaGlue
|
40 |
|
|
*
|
41 |
|
|
* @version 1.0 10/23/97
|
42 |
|
|
* @author John Moreland
|
43 |
|
|
*/
|
44 |
|
|
/**
|
45 |
299
|
higgins
|
* Name: SrbJavaGlueInterface.java
|
46 |
|
|
* Purpose: Interface for RMI Implementation
|
47 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
48 |
|
|
* National Center for Ecological Analysis and Synthesis
|
49 |
|
|
* Authors: Dan Higgins
|
50 |
|
|
*
|
51 |
|
|
* Version: '$Id$'
|
52 |
|
|
* @version 1.1 6/8/00
|
53 |
|
|
* @author Dan Higgins - NCEAS
|
54 |
|
|
*/
|
55 |
|
|
|
56 |
|
|
import java.rmi.Remote;
|
57 |
|
|
import java.rmi.RemoteException;
|
58 |
|
|
|
59 |
|
|
public interface SrbJavaGlueInterface extends Remote
|
60 |
|
|
{
|
61 |
|
|
// Interface for JNI/RMI
|
62 |
526
|
bojilova
|
// JNI (Java Native Interface) Glue Routines for the SRB client library.
|
63 |
299
|
higgins
|
|
64 |
526
|
bojilova
|
public int clConnectJ( String host, String port, String auth,
|
65 |
|
|
String user, String domain )throws RemoteException;
|
66 |
299
|
higgins
|
|
67 |
|
|
public int srbListCollectJ( int conn, int catType,
|
68 |
526
|
bojilova
|
String collectionName, String flag, int types[] )throws RemoteException;
|
69 |
299
|
higgins
|
|
70 |
|
|
public String getFileListItem( int index ) throws RemoteException;
|
71 |
|
|
|
72 |
526
|
bojilova
|
public int clFinishJ( int conn )throws RemoteException ;
|
73 |
299
|
higgins
|
|
74 |
|
|
public int srbObjCopyNewJ( String srcDir, String srcFile,
|
75 |
526
|
bojilova
|
String dstDir, String dstFile, String dstRes ) throws RemoteException ;
|
76 |
299
|
higgins
|
|
77 |
526
|
bojilova
|
public int srbListResourceJ( int bs )throws RemoteException;
|
78 |
299
|
higgins
|
|
79 |
526
|
bojilova
|
public String getResListItem( int index )throws RemoteException;
|
80 |
299
|
higgins
|
|
81 |
526
|
bojilova
|
public String getDefCollection()throws RemoteException;
|
82 |
299
|
higgins
|
|
83 |
526
|
bojilova
|
public String getDefResource()throws RemoteException;
|
84 |
299
|
higgins
|
|
85 |
526
|
bojilova
|
public String getUser()throws RemoteException;
|
86 |
299
|
higgins
|
|
87 |
526
|
bojilova
|
public String getDomain()throws RemoteException;
|
88 |
299
|
higgins
|
|
89 |
526
|
bojilova
|
public String getLocalCacheDir()throws RemoteException;
|
90 |
299
|
higgins
|
|
91 |
|
|
public int srbObjReplicateJ(int conn, int catType,
|
92 |
526
|
bojilova
|
String objID, String replNum, String collection, String resource)throws RemoteException;
|
93 |
299
|
higgins
|
|
94 |
|
|
public int srbCollReplicateJ(int conn, int catType,
|
95 |
526
|
bojilova
|
String collection, String resource)throws RemoteException;
|
96 |
299
|
higgins
|
|
97 |
|
|
public int queryDataInCollJ (int conn, int catType,
|
98 |
|
|
String parColl) throws RemoteException;
|
99 |
|
|
|
100 |
|
|
public int queryDataJ (int conn, int catType, String objID,
|
101 |
526
|
bojilova
|
String parColl)throws RemoteException;
|
102 |
299
|
higgins
|
|
103 |
|
|
public int querySubCollInCollJ (int conn, int catType,
|
104 |
526
|
bojilova
|
String parColl)throws RemoteException;
|
105 |
299
|
higgins
|
|
106 |
|
|
public String getDataResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
107 |
|
|
|
108 |
|
|
public String getCollResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
109 |
|
|
|
110 |
|
|
public String getGenQueResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
111 |
|
|
|
112 |
|
|
public int getNCollAttriJ () throws RemoteException;
|
113 |
|
|
|
114 |
|
|
public int getNDataAttriJ () throws RemoteException;
|
115 |
|
|
|
116 |
|
|
public int srbObjUnlinkJ (int conn, int catType,
|
117 |
|
|
String objID, String replNum, String parColl) throws RemoteException;
|
118 |
|
|
|
119 |
|
|
public int srbCreateCollectJ (int conn, int catType,
|
120 |
|
|
String parColl, String newColl) throws RemoteException;
|
121 |
|
|
|
122 |
|
|
public int srbModifyDatasetMetaDJ (int conn, int catType,
|
123 |
|
|
String objID, String collection,
|
124 |
|
|
String newValue1, String newValue2, int retractionType) throws RemoteException;
|
125 |
|
|
public int srbModifyCollectMetaDJ (int conn, int catType,
|
126 |
|
|
String collection, String newValue1, String newValue2,
|
127 |
|
|
String newValue3, int retractionType) throws RemoteException;
|
128 |
|
|
public int importToOldObjJ (int conn, int catType,
|
129 |
|
|
String objID, String replNum, String parColl, String resource,
|
130 |
|
|
String localFile, String container) throws RemoteException;
|
131 |
|
|
|
132 |
|
|
public int importToNewObjJ (int conn, int catType,
|
133 |
|
|
String objID, String parColl, String resource, String localFile,
|
134 |
|
|
String container) throws RemoteException;
|
135 |
|
|
|
136 |
|
|
public int importDirJ (int conn, int catType,
|
137 |
|
|
String parColl, String resource, String localDir, String container) throws RemoteException;
|
138 |
|
|
|
139 |
|
|
public int srbRmCollJ (int conn, int catType, String parColl) throws RemoteException;
|
140 |
|
|
|
141 |
|
|
public int srbUnregCollJ (int conn, int catType, String parColl) throws RemoteException;
|
142 |
|
|
|
143 |
|
|
public int copyToOldObjJ (int conn, int catType,
|
144 |
|
|
String objID, String replNum, String srcColl, String targObj,
|
145 |
|
|
String targReplNum, String targColl, String targResource,
|
146 |
|
|
String container) throws RemoteException;
|
147 |
|
|
|
148 |
|
|
public int copyDataToCollJ (int conn, int catType,
|
149 |
|
|
String objID, String replNum, String srcColl,
|
150 |
|
|
String dataType, String size, String targColl, String targResource,
|
151 |
|
|
String container) throws RemoteException;
|
152 |
|
|
|
153 |
|
|
public int copyCollToCollJ (int conn, int catType,
|
154 |
|
|
String srcColl, String targColl, String targResource,
|
155 |
|
|
String container) throws RemoteException;
|
156 |
|
|
|
157 |
|
|
public int exportToFileJ(int conn, int catType,
|
158 |
|
|
String objID, String replNum, String srcColl,
|
159 |
|
|
String targFile, int forceFlag) throws RemoteException;
|
160 |
|
|
|
161 |
|
|
public int exportToDirJ(int conn, int catType,
|
162 |
|
|
String objID, String replNum, String srcColl,
|
163 |
|
|
String targDir) throws RemoteException;
|
164 |
|
|
|
165 |
|
|
public int exportCollToDirJ(int conn, int catType,
|
166 |
|
|
String srcColl, String targDir) throws RemoteException;
|
167 |
|
|
|
168 |
|
|
public int srbGenQuery (int conn, int catType,
|
169 |
|
|
String[] qval, int qvalInx[], int selVal[]) throws RemoteException;
|
170 |
|
|
|
171 |
|
|
public int srbRegisterDatasetJ(int conn, int catType,
|
172 |
|
|
String objID, String dataType, String resource, String collection,
|
173 |
|
|
String pathName, int dataSize) throws RemoteException;
|
174 |
|
|
|
175 |
|
|
public int srbUnregisterDatasetJ (int conn, int catType,
|
176 |
|
|
String objID, String replNum, String collection) throws RemoteException;
|
177 |
|
|
|
178 |
|
|
public int srbRegisterDirJ (int conn, int catType,
|
179 |
|
|
String srcDirPath, String targColl, String resource) throws RemoteException;
|
180 |
|
|
|
181 |
|
|
public int getMoreDataRowsJ (int conn, int catType) throws RemoteException;
|
182 |
|
|
|
183 |
|
|
public int getMoreCollRowsJ (int conn, int catType) throws RemoteException;
|
184 |
|
|
|
185 |
|
|
public int getMoreGenQueRowsJ (int conn, int catType) throws RemoteException;
|
186 |
|
|
|
187 |
|
|
public int chmodInCollJ (int conn, int catType,
|
188 |
|
|
String collection, String user, String domain, String mode) throws RemoteException;
|
189 |
|
|
|
190 |
|
|
public int ingestUserJ (int conn, int catType,
|
191 |
|
|
String userName, String passwd, String domain,
|
192 |
|
|
String userType, String userAddr, String userPhone, String userEmail,
|
193 |
|
|
String parentColl) throws RemoteException;
|
194 |
|
|
|
195 |
|
|
public int ingestGroupJ (int conn, int catType,
|
196 |
|
|
String groupName, String passwd,
|
197 |
|
|
String groupAddr, String groupPhone, String groupEMail) throws RemoteException;
|
198 |
|
|
|
199 |
|
|
public int ingestLocJ (int conn, int catType,
|
200 |
526
|
bojilova
|
String locName, String fullAddr, String parentLoc,
|
201 |
|
|
String serverUser, String serverUserDomain) throws RemoteException;
|
202 |
299
|
higgins
|
|
203 |
|
|
public int ingestResourceJ (int conn, int catType,
|
204 |
526
|
bojilova
|
String rescName, String rescType, String location, String phyPath,
|
205 |
|
|
String rscClass, int size) throws RemoteException;
|
206 |
299
|
higgins
|
|
207 |
|
|
public int ingestLogRescJ (int conn, int catType,
|
208 |
|
|
String logRescName, String phyResc, String phyPath) throws RemoteException;
|
209 |
|
|
|
210 |
|
|
public int addLogRescJ (int conn, int catType,
|
211 |
|
|
String logResc, String phyResc, String phyPath) throws RemoteException;
|
212 |
|
|
|
213 |
|
|
public int modifyUserJ (int conn, int catType,
|
214 |
|
|
int modOpr, String userName, String domain, String modValue) throws RemoteException;
|
215 |
|
|
|
216 |
|
|
public int containerCreateJ (int conn, int catType,
|
217 |
|
|
String contName, String dataType, String logResc, int size) throws RemoteException;
|
218 |
|
|
|
219 |
|
|
public int containerDeleteJ (int conn, int catType,
|
220 |
|
|
String contName, int forceFlag) throws RemoteException;
|
221 |
|
|
|
222 |
526
|
bojilova
|
public int containerSyncJ (int conn, int catType,
|
223 |
|
|
String contName, int purgeFlag) throws RemoteException;
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
// additions June 2000 by DFH to allows file transfers to client side of RMI
|
227 |
299
|
higgins
|
|
228 |
|
|
public byte[] getByteData(String fileName) throws RemoteException;
|
229 |
|
|
|
230 |
|
|
public void setByteData(String fileName, byte[] byteData) throws RemoteException;
|
231 |
|
|
|
232 |
|
|
public void clearTmpFiles() throws RemoteException;
|
233 |
526
|
bojilova
|
|
234 |
299
|
higgins
|
}
|