|
|
AdventNet Web NMS 4 DMS API Specification
|
|
PREV CLASS
NEXT CLASS |
FRAMES
NO FRAMES |
|
SUMMARY: INNER | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |
com.adventnet.nms.extranet.remote.communication.fw.probe
Interface ConfUploadAPI
- All Superinterfaces:
- com.adventnet.nms.util.CommonModuleAPI, java.rmi.Remote
- public interface ConfUploadAPI
- extends java.rmi.Remote, com.adventnet.nms.util.CommonModuleAPI
The ConfUploadAPI defines the methods that allows uploading and downloading the required conf files from DMS to Central Server.
Accessing ConfUploadAPI
This API extends the CommonAPI, which allows it to be accesible even from remote hosts through RMI.
This API can be accessed either through RMI or directly from the same JVM. It is published with the RMI ha*ndle ConfUploadAPI on the DMS. Code within the same JVM as the DMS can use the NmsUtil.getAPI(String) method t*o get the ConfUploadAPI handle.
// Accessing ConfUploadAPI from the same JVM
ConfUploadAPI confApi = (ConfUploadAPI) NmsUtil.getAPI("ConfUploadAPI");
confApi.uploadFile(fileName, probePath, nocPath);
confApi.downloadFile(fileName, destFileName, nocPath, probePath);
// Accessing ConfUploadAPI from different JVM via RMI
try
{
ConfUploadAPI confApi = (ConfUploadAPI) Naming.lookup ("rmi://" + host + ":" + rmiPort + "/ConfUploadAPI");
confApi.uploadFile(fileName, probePath, nocPath);
confApi.downloadFile(fileName, destFileName, nocPath, probePath);
}
catch (Exception remoteException)
{
System.out.println ( "Error in getting the handle for ConfUploadAPI");
}
|
Method Summary |
boolean |
downloadFile(java.lang.String fileName,
java.lang.String destFileName,
java.lang.String nocPath,
java.lang.String probePath)
This method is to download configuration files from Centeral Server to DMS. |
boolean |
uploadFile(java.lang.String fileName,
java.lang.String probePath,
java.lang.String nocPath)
This method is to upload configuration files from DMS to Centeral Server. |
uploadFile
public boolean uploadFile(java.lang.String fileName,
java.lang.String probePath,
java.lang.String nocPath)
throws java.rmi.RemoteException
- This method is to upload configuration files from DMS to Centeral Server. For instance,if seed.file needs to be uploaded from DMS to Central Server, the following has to be done.
set the fileName parameter value to "seed.file"
set probePath paramater value to "conf/"
set nocPath parameter value to "conf/
In the above case "seed.file" under <DMSHome>/conf directory will be uploaded into <CentralServerHome>/conf/probe/<DMS Name>/conf directory.
- Parameters:
fileName - name of the file to be uploaded (eg:"seed.file")probePath - path of the file name relative to DMS Home(eg:"conf/")nocPath - path of the file name relative to Central Server Home(eg:"conf/")- Returns:
- boolean true if the file is uploaded successfully, else false
downloadFile
public boolean downloadFile(java.lang.String fileName,
java.lang.String destFileName,
java.lang.String nocPath,
java.lang.String probePath)
throws java.rmi.RemoteException
- This method is to download configuration files from Centeral Server to DMS. For instance,if seed.file needs to be downloaded from Central Server to DMS, the following has to be done.
set the fileName parameter value to "seed.file"
set the destFileName parameter value to "seed.file.bkp"
set probePath paramater value to "conf/"
set nocPath parameter value to "conf/"
In the above case "seed.file" under <CentralServerHome>/conf/probe/<DMSName>/conf will be downloaded into <DMSHome>/conf directory as "seed.file.bkp".
- Parameters:
fileName - name of the file to be downloaded from (eg:"seed.file")destFileName - name of the file to be downloaded in DMS(eg:"seed.file.bkp")probePath - path of the file name relative to DMS Home(eg:"conf/")nocPath - path of the file name relative to Central Server Home(eg:"conf/")- Returns:
- boolean true if the file is downloaded successfully, else false
|
|
AdventNet Web NMS 4 DMS API Specification
|
|
PREV CLASS
NEXT CLASS |
FRAMES
NO FRAMES |
|
SUMMARY: INNER | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |