本文整理汇总了Java中javax.jmdns.impl.util.NamedThreadFactory类的典型用法代码示例。如果您正苦于以下问题:Java NamedThreadFactory类的具体用法?Java NamedThreadFactory怎么用?Java NamedThreadFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NamedThreadFactory类属于javax.jmdns.impl.util包,在下文中一共展示了NamedThreadFactory类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JmmDNSImpl
import javax.jmdns.impl.util.NamedThreadFactory; //导入依赖的package包/类
/**
*
*/
public JmmDNSImpl() {
super();
_networkListeners = Collections.synchronizedSet(new HashSet<NetworkTopologyListener>());
_knownMDNS = new ConcurrentHashMap<InetAddress, JmDNS>();
_services = new ConcurrentHashMap<String, ServiceInfo>(20);
_listenerExecutor = Executors.newSingleThreadExecutor(new NamedThreadFactory("JmmDNS Listeners"));
_jmDNSExecutor = Executors.newCachedThreadPool(new NamedThreadFactory("JmmDNS"));
_timer = new Timer("Multihomed mDNS.Timer", true);
_serviceListeners = new ConcurrentHashMap<String, List<ServiceListener>>();
_typeListeners = Collections.synchronizedSet(new HashSet<ServiceTypeListener>());
_serviceTypes = Collections.synchronizedSet(new HashSet<String>());
(new NetworkChecker(this, NetworkTopologyDiscovery.Factory.getInstance())).start(_timer);
_isClosing = new AtomicBoolean(false);
_closed = new AtomicBoolean(false);
}