*/
@Override
public synchronized void setProperties(
final Map<String, PoolProperties.InterceptorProperty> properties) {
super.setProperties(properties);
InterceptorProperty hostnameProp = properties.get("hostname");
if (hostnameProp == null) {
throw new IllegalArgumentException(
"property \"hostname\" has not been set");
}
InterceptorProperty portProp = properties.get("port");
if (portProp == null) {
throw new IllegalArgumentException(
"property \"port\" has not been set");
}
InterceptorProperty sampleRateProp = properties.get("sampleRate");
if (sampleRateProp == null) {
throw new IllegalArgumentException(
"property \"sampleRate\" has not been set");
}
InterceptorProperty prefixProp = properties.get("prefix");
if (prefixProp == null) {
throw new IllegalArgumentException(
"property \"prefix\" has not been set");
}
String hostname = hostnameProp.getValue();
int port = portProp.getValueAsInt(0);
sampleRate = sampleRateProp.getValueAsDouble(1.0);
prefix = prefixProp.getValue();
address = new InetSocketAddress(hostname, port);
try {
channel = DatagramChannel.open();
} catch (IOException ioe) {
throw new RuntimeException(ioe);