org.apache.logging.log4j.core.net
Class MulticastDnsAdvertiser
java.lang.Object
org.apache.logging.log4j.core.net.MulticastDnsAdvertiser
- All Implemented Interfaces:
- Advertiser
@Plugin(name="multicastdns",
category="Core",
elementType="advertiser",
printObject=false)
public class MulticastDnsAdvertiser
- extends Object
- implements Advertiser
Advertise an entity via ZeroConf/MulticastDNS and the JmDNS library.
The length of property names and values must be 255 bytes or less.
Entries with names or values larger than 255 bytes will be removed prior to advertisement.
Field Summary |
protected static org.apache.logging.log4j.Logger |
LOGGER
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final org.apache.logging.log4j.Logger LOGGER
MulticastDnsAdvertiser
public MulticastDnsAdvertiser()
advertise
public Object advertise(Map<String,String> properties)
- Advertise the provided entity.
Properties map provided in advertise method must include a "name" entry
but may also provide "protocol" (tcp/udp) as well as a "port" entry
The length of property names and values must be 255 bytes or less.
Entries with names or values larger than 255 bytes will be removed prior to advertisement.
- Specified by:
advertise
in interface Advertiser
- Parameters:
properties
- the properties representing the entity to advertise
- Returns:
- the object which can be used to unadvertise, or null if advertisement was unsuccessful
unadvertise
public void unadvertise(Object serviceInfo)
- Unadvertise the previously advertised entity
- Specified by:
unadvertise
in interface Advertiser
- Parameters:
serviceInfo
-
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.