if (registryModeName == null)
throw new IllegalArgumentException(
JaiI18N.getString("JAIRMIDescriptor11"));
String operationName = node.getOperationName();
OperationDescriptor oldDescs[] =
getServerSupportedOperationList(oldServerName);
OperationDescriptor oldOD =
getOperationDescriptor(oldDescs, operationName);
if (oldOD == null)
throw new IllegalArgumentException(
JaiI18N.getString("JAIRMIDescriptor1"));
int numSources = oldOD.getNumSources();
// If the supplied registryModeName is "remoteRendered" or
// "remoteRenderable", in order to get the OperationDescriptor's
// ParameterListDescriptor, we need to actually use the "rendered"
// or "renderable" mode respectively.
ParameterListDescriptor oldPLD = null;
if (registryModeName.equalsIgnoreCase("remoteRendered")) {
oldPLD = oldOD.getParameterListDescriptor("rendered");
} else if (registryModeName.equalsIgnoreCase("remoteRenderable")) {
oldPLD = oldOD.getParameterListDescriptor("renderable");
} else {
oldPLD = oldOD.getParameterListDescriptor(registryModeName);
}
int numParams = oldPLD.getNumParameters();
// If the serverNames are same, nothing to be done for that
if (oldServerName != newServerName) {
// Check whether they both support the supplied operation name
OperationDescriptor newDescs[] =
getServerSupportedOperationList(newServerName);
OperationDescriptor newOD;
if ((newOD = getOperationDescriptor(newDescs,
operationName)) == null)
throw new IllegalArgumentException(
JaiI18N.getString("JAIRMIDescriptor2"));
// Check the OperationDescriptor equivalence
// Sources
if (numSources != newOD.getNumSources())
throw new IllegalArgumentException(
JaiI18N.getString("JAIRMIDescriptor3"));
// Parameters
ParameterListDescriptor newPLD =
newOD.getParameterListDescriptor(registryModeName);
if (numParams != newPLD.getNumParameters())
throw new IllegalArgumentException(
JaiI18N.getString("JAIRMIDescriptor4"));