當前位置: 首頁>>代碼示例>>Java>>正文


Java ServiceInfo.getSubtype方法代碼示例

本文整理匯總了Java中javax.jmdns.ServiceInfo.getSubtype方法的典型用法代碼示例。如果您正苦於以下問題:Java ServiceInfo.getSubtype方法的具體用法?Java ServiceInfo.getSubtype怎麽用?Java ServiceInfo.getSubtype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.jmdns.ServiceInfo的用法示例。


在下文中一共展示了ServiceInfo.getSubtype方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: serviceAdded

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
/**
 * A service has been added.
 *
 * @param event
 *            service event
 */
@Override
public void serviceAdded(ServiceEvent event) {
    synchronized (this) {
        ServiceInfo info = event.getInfo();
        if ((info != null) && (info.hasData())) {
            _infos.put(event.getName(), info);
        } else {
            String subtype = (info != null ? info.getSubtype() : "");
            info = ((JmDNSImpl) event.getDNS()).resolveServiceInfo(event.getType(), event.getName(), subtype, true);
            if (info != null) {
                _infos.put(event.getName(), info);
            } else {
                _events.put(event.getName(), event);
            }
        }
    }
}
 
開發者ID:iilxy,項目名稱:AndroidmDNS,代碼行數:24,代碼來源:JmDNSImpl.java

示例2: serviceAdded

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
/**
 * A service has been added.
 *
 * @param event
 *            service event
 */
@Override
public void serviceAdded(ServiceEvent event)
{
    synchronized (this)
    {
        ServiceInfo info = event.getInfo();
        if ((info != null) && (info.hasData()))
        {
            _infos.put(event.getName(), info);
        }
        else
        {
            String subtype = (info != null ? info.getSubtype() : "");
            info = ((JmDNSImpl) event.getDNS()).resolveServiceInfo(event.getType(), event.getName(), subtype, true);
            if (info != null)
            {
                _infos.put(event.getName(), info);
            }
            else
            {
                _events.put(event.getName(), event);
            }
        }
    }
}
 
開發者ID:blackshadowwalker,項目名稱:log4j-collector,代碼行數:32,代碼來源:JmDNSImpl.java

示例3: ServiceInfoImpl

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
/**
 * During recovery we need to duplicate service info to reregister them
 *
 * @param info
 */
public ServiceInfoImpl(ServiceInfo info)
{
    if (info != null)
    {
        this._domain = info.getDomain();
        this._protocol = info.getProtocol();
        this._application = info.getApplication();
        this._name = info.getName();
        this._subtype = info.getSubtype();
        this._port = info.getPort();
        this._weight = info.getWeight();
        this._priority = info.getPriority();
        this._text = info.getTextBytes();
        this._persistent = info.isPersistent();
        this._ipv4Addr = info.getInet4Address();
        this._ipv6Addr = info.getInet6Address();
    }
    this._state = new ServiceInfoState(this);
}
 
開發者ID:blackshadowwalker,項目名稱:log4j-collector,代碼行數:25,代碼來源:ServiceInfoImpl.java


注:本文中的javax.jmdns.ServiceInfo.getSubtype方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。