in src/main/java/org/apache/log4j/receivers/net/MulticastReceiver.java [127:167]
public void activateOptions() {
InetAddress addr = null;
try {
Class c = Class.forName(decoder);
Object o = c.newInstance();
if (o instanceof Decoder) {
this.decoderImpl = (Decoder) o;
}
} catch (ClassNotFoundException cnfe) {
getLogger().warn("Unable to find decoder", cnfe);
} catch (IllegalAccessException iae) {
getLogger().warn("Could not construct decoder", iae);
} catch (InstantiationException ie) {
getLogger().warn("Could not construct decoder", ie);
}
try {
addr = InetAddress.getByName(address);
} catch (UnknownHostException uhe) {
uhe.printStackTrace();
}
try {
active = true;
socket = new MulticastSocket(port);
socket.joinGroup(addr);
receiverThread = new MulticastReceiverThread();
receiverThread.start();
handlerThread = new MulticastHandlerThread();
handlerThread.start();
if (advertiseViaMulticastDNS) {
zeroConf = new ZeroConfSupport(ZONE, port, getName());
zeroConf.advertise();
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
}