本文整理汇总了Java中javax.jmdns.impl.tasks.RecordReaper类的典型用法代码示例。如果您正苦于以下问题:Java RecordReaper类的具体用法?Java RecordReaper怎么用?Java RecordReaper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecordReaper类属于javax.jmdns.impl.tasks包,在下文中一共展示了RecordReaper类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JmDNSImpl
import javax.jmdns.impl.tasks.RecordReaper; //导入依赖的package包/类
/**
* Create an instance of JmDNS and bind it to a specific network interface given its IP-address.
*
* @param address
* IP address to bind to.
* @param name
* name of the newly created JmDNS
* @throws java.io.IOException
*/
public JmDNSImpl(InetAddress address, String name) throws IOException
{
super();
if (logger.isLoggable(Level.FINER))
{
logger.finer("JmDNS instance created");
}
_cache = new DNSCache(100);
_listeners = Collections.synchronizedList(new ArrayList<DNSListener>());
_serviceListeners = new ConcurrentHashMap<String, List<ServiceListenerStatus>>();
_typeListeners = Collections.synchronizedSet(new HashSet<ServiceTypeListenerStatus>());
_serviceCollectors = new ConcurrentHashMap<String, ServiceCollector>();
_services = new ConcurrentHashMap<String, ServiceInfo>(20);
_serviceTypes = new ConcurrentHashMap<String, Set<String>>(20);
_localHost = HostInfo.newHostInfo(address, this);
_name = (name != null ? name : _localHost.getName());
_timer = new Timer("JmDNS(" + _name + ").Timer", true);
_stateTimer = new Timer("JmDNS(" + _name + ").State.Timer", false);
// _cancelerTimer = new Timer("JmDNS.cancelerTimer");
// (ldeck 2.1.1) preventing shutdown blocking thread
// -------------------------------------------------
// _shutdown = new Thread(new Shutdown(), "JmDNS.Shutdown");
// Runtime.getRuntime().addShutdownHook(_shutdown);
// -------------------------------------------------
// Bind to multicast socket
this.openMulticastSocket(this.getLocalHost());
this.start(this.getServices().values());
new RecordReaper(this).start(_timer);
}
开发者ID:blackshadowwalker,项目名称:log4j-collector,代码行数:47,代码来源:JmDNSImpl.java
示例2: startReaper
import javax.jmdns.impl.tasks.RecordReaper; //导入依赖的package包/类
@Override
public void startReaper() {
new RecordReaper(_jmDNSImpl).start(_timer);
}
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:5,代码来源:DNSTaskStarter.java
注:本文中的javax.jmdns.impl.tasks.RecordReaper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论