if (authz == null) {
throw new ParameterProblem(
"service-authorization mechanism is not specified");
}
final ClientSecurityDescriptor desc = new ClientSecurityDescriptor();
if (mech.equals(Constants.GSI_SEC_MSG)) {
desc.setGSISecureMsg((Integer)protection);
} else if (mech.equals(Constants.GSI_SEC_CONV)) {
desc.setGSISecureConv((Integer)protection);
} else if (mech.equals(Constants.GSI_TRANSPORT)) {
desc.setGSITransport((Integer)protection);
Util.registerTransport();
}
desc.setAuthz(authz);
return desc;
}