本文整理汇总了Java中javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus类的典型用法代码示例。如果您正苦于以下问题:Java ServiceTypeListenerStatus类的具体用法?Java ServiceTypeListenerStatus怎么用?Java ServiceTypeListenerStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceTypeListenerStatus类属于javax.jmdns.impl.ListenerStatus包,在下文中一共展示了ServiceTypeListenerStatus类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JmDNSImpl
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的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
* @exception 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, ServiceTypeEntry>(20);
_localHost = HostInfo.newHostInfo(address, this, name);
_name = (name != null ? name : _localHost.getName());
// _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());
this.startReaper();
}
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:43,代码来源:JmDNSImpl.java
示例2: addServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void addServiceTypeListener(ServiceTypeListener listener) throws IOException {
ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener, ListenerStatus.ASYNCHONEOUS);
_typeListeners.add(status);
// report cached service types
for (String type : _serviceTypes.keySet()) {
status.serviceTypeAdded(new ServiceEventImpl(this, type, "", null));
}
this.startTypeResolver();
}
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:16,代码来源:JmDNSImpl.java
示例3: JmDNSImpl
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的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
* @exception IOException
*/
public JmDNSImpl(InetAddress address, String name) throws IOException {
super();
Log.i("mDNS","JmDNSImpl");
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, ServiceTypeEntry>(20);
_localHost = HostInfo.newHostInfo(address, this, name);
_name = (name != null ? name : _localHost.getName());
// _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());
this.startReaper();
}
开发者ID:DeviceConnect,项目名称:DeviceConnect-Android,代码行数:46,代码来源:JmDNSImpl.java
示例4: JmDNSImpl
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的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
示例5: addServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void addServiceTypeListener(ServiceTypeListener listener) throws IOException
{
ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener);
_typeListeners.add(status);
// report cached service types
for (String type : _serviceTypes.keySet())
{
status.serviceTypeAdded(new ServiceEventImpl(this, type, "", null));
}
new TypeResolver(this).start(_timer);
}
开发者ID:blackshadowwalker,项目名称:log4j-collector,代码行数:18,代码来源:JmDNSImpl.java
示例6: removeServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void removeServiceTypeListener(ServiceTypeListener listener)
{
ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener);
_typeListeners.remove(status);
}
开发者ID:blackshadowwalker,项目名称:log4j-collector,代码行数:10,代码来源:JmDNSImpl.java
示例7: JmDNSImpl
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的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
* @exception IOException
*/
public JmDNSImpl(final InetAddress address, final String name) throws IOException {
super();
if (logger.isLoggable(Level.FINER)) {
logger.finer("JmDNS instance created");
}
this._cache = new DNSCache(100);
this._listeners = Collections.synchronizedList(new ArrayList<DNSListener>());
this._serviceListeners = new ConcurrentHashMap<String, List<ServiceListenerStatus>>();
this._typeListeners = Collections.synchronizedSet(new HashSet<ServiceTypeListenerStatus>());
this._serviceCollectors = new ConcurrentHashMap<String, ServiceCollector>();
this._services = new ConcurrentHashMap<String, ServiceInfo>(20);
this._serviceTypes = new ConcurrentHashMap<String, ServiceTypeEntry>(20);
this._localHost = HostInfo.newHostInfo(address, this, name);
this._name = (name != null ? name : this._localHost.getName());
// _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());
this.startReaper();
}
开发者ID:mwaylabs,项目名称:JmDNS,代码行数:43,代码来源:JmDNSImpl.java
示例8: addServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void addServiceTypeListener(final ServiceTypeListener listener) throws IOException {
final ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener, ListenerStatus.ASYNCHONEOUS);
this._typeListeners.add(status);
// report cached service types
for (final String type : this._serviceTypes.keySet()) {
status.serviceTypeAdded(new ServiceEventImpl(this, type, "", null));
}
this.startTypeResolver();
}
开发者ID:mwaylabs,项目名称:JmDNS,代码行数:16,代码来源:JmDNSImpl.java
示例9: removeServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void removeServiceTypeListener(ServiceTypeListener listener) {
ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener, ListenerStatus.ASYNCHONEOUS);
_typeListeners.remove(status);
}
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:9,代码来源:JmDNSImpl.java
示例10: removeServiceTypeListener
import javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void removeServiceTypeListener(final ServiceTypeListener listener) {
final ServiceTypeListenerStatus status = new ServiceTypeListenerStatus(listener, ListenerStatus.ASYNCHONEOUS);
this._typeListeners.remove(status);
}
开发者ID:mwaylabs,项目名称:JmDNS,代码行数:9,代码来源:JmDNSImpl.java
注:本文中的javax.jmdns.impl.ListenerStatus.ServiceTypeListenerStatus类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论