public Map<String, String> getOriginalProperties() throws Exception { Map<String, String> props=new HashMap<>(); parsePropertiesString(props); return props; }
/** * Creates a new ProtocolConfiguration. * @param config_str The configuration specification for the protocol, e.g. * <pre>VERIFY_SUSPECT(timeout=1500)</pre> */ public ProtocolConfiguration(String config_str) throws Exception { int index=config_str.indexOf('('); // e.g. "UDP(in_port=3333)" int end_index=config_str.lastIndexOf(')'); if(index == -1) { protocol_name=config_str; properties_str=""; } else { if(end_index == -1) { throw new Exception("Configurator.ProtocolConfiguration(): closing ')' " + "not found in " + config_str + ": properties cannot be set !"); } else { properties_str=config_str.substring(index + 1, end_index); protocol_name=config_str.substring(0, index); } } parsePropertiesString(properties); this.loader = ProtocolConfiguration.class.getClassLoader(); }
public Map<String, String> getOriginalProperties() throws Exception { Map<String, String> props=new HashMap<>(); parsePropertiesString(props); return props; }
/** * Creates a new ProtocolConfiguration. * @param config_str The configuration specification for the protocol, e.g. * <pre>VERIFY_SUSPECT(timeout=1500)</pre> */ public ProtocolConfiguration(String config_str) throws Exception { int index=config_str.indexOf('('); // e.g. "UDP(in_port=3333)" int end_index=config_str.lastIndexOf(')'); if(index == -1) { protocol_name=config_str; properties_str=""; } else { if(end_index == -1) { throw new Exception("Configurator.ProtocolConfiguration(): closing ')' " + "not found in " + config_str + ": properties cannot be set !"); } else { properties_str=config_str.substring(index + 1, end_index); protocol_name=config_str.substring(0, index); } } parsePropertiesString(properties); this.loader = ProtocolConfiguration.class.getClassLoader(); }