org.apache.log4j.net
Class Zeroconf4log4j

java.lang.Object
  extended by org.apache.log4j.net.Zeroconf4log4j

public class Zeroconf4log4j
extends java.lang.Object

This singleton holds the single instance of the JmDNS instance that is used to broadcast Appender related information via ZeroConf. Once referenced, a single JmDNS instance is created and held. To ensure your JVM exits cleanly you should ensure that you call the shutdown() method to broadcast the disappearance of your devices, and cleanup sockets. (alternatively you can call the close() method on the JmDNS instead, totally up to you...) See http://jmdns.sf.net for more information about JmDNS and ZeroConf.

Author:
psmith

Constructor Summary
Zeroconf4log4j()
           
 
Method Summary
static javax.jmdns.JmDNS getInstance()
          Returns the current instance of the JmDNS being used by log4j.
static void shutdown()
          Ensures JmDNS cleanly broadcasts 'goodbye' and closes any sockets, and (more imporantly) ensures some Threads exit so your JVM can exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Zeroconf4log4j

public Zeroconf4log4j()
Method Detail

getInstance

public static javax.jmdns.JmDNS getInstance()
Returns the current instance of the JmDNS being used by log4j.

Returns:
Throws:
java.lang.IllegalStateException - if JmDNS was not correctly initialized.

shutdown

public static void shutdown()
Ensures JmDNS cleanly broadcasts 'goodbye' and closes any sockets, and (more imporantly) ensures some Threads exit so your JVM can exit.



Copyright © 2007 Apache Software Foundation. All Rights Reserved.