* Checks that only one {@link TransportOptionsDefinition} instance exists for each
* {@link TransportOptionsDefinition} class.
*/
private void checkForDuplicateTransportOptionDefinitions() {
if (m_transportOptDefs != null) {
Set definedOptions = new HashSet();
for (Iterator iterator = m_transportOptDefs.iterator(); iterator.hasNext();) {
TransportOptionsDefinition def = (TransportOptionsDefinition) iterator.next();
String type = def.getClass().getName();
if (definedOptions.contains(type)) {
throw new IllegalArgumentException("Duplicate transport options definition of type " + type);
}
definedOptions.add(type);
}
}
}