public SysnetRegistrationService(RegistrationServiceConfig rc) {
Object[] params = rc.getParams();
this.localRepositoryFile = (File)params[0];
if (params.length == 1) {
regWrapper = new RegistrationWrapper(getDefaultRegistrationID());
}
else if (params.length ==2) { //filename, registrationid is passed
regWrapper = new RegistrationWrapper((String)params[1]);
}
else if (params.length == 3) { //filename, host, port
regWrapper = new RegistrationWrapper((String)params[1],
(String)(rc.getParams()[1]),
((Integer)(rc.getParams()[2])).intValue());
}
else { // filename, host, port, registrationid
regWrapper = new RegistrationWrapper(
(String)(rc.getParams()[3]),
(String)(rc.getParams()[1]),
((Integer)(rc.getParams()[2])).intValue());
}
}