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


Java ServiceInfo.getName方法代碼示例

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


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

示例1: getServiceEvent

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
@Override
public ServiceEvent getServiceEvent(JmDNSImpl dns) {
    ServiceInfo info = this.getServiceInfo(false);
    ((ServiceInfoImpl) info).setDns(dns);
    // String domainName = "";
    // String serviceName = this.getServer();
    // int index = serviceName.indexOf('.');
    // if (index > 0)
    // {
    // serviceName = this.getServer().substring(0, index);
    // if (index + 1 < this.getServer().length())
    // domainName = this.getServer().substring(index + 1);
    // }
    // return new ServiceEventImpl(dns, domainName, serviceName, info);
    return new ServiceEventImpl(dns, info.getType(), info.getName(), info);

}
 
開發者ID:iilxy,項目名稱:AndroidmDNS,代碼行數:18,代碼來源:DNSRecord.java

示例2: 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

示例3: getServiceEvent

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
@Override
public ServiceEvent getServiceEvent(JmDNSImpl dns)
{
    ServiceInfo info = this.getServiceInfo(false);
    ((ServiceInfoImpl) info).setDns(dns);
    // String domainName = "";
    // String serviceName = this.getServer();
    // int index = serviceName.indexOf('.');
    // if (index > 0)
    // {
    // serviceName = this.getServer().substring(0, index);
    // if (index + 1 < this.getServer().length())
    // domainName = this.getServer().substring(index + 1);
    // }
    // return new ServiceEventImpl(dns, domainName, serviceName, info);
    return new ServiceEventImpl(dns, info.getType(), info.getName(), info);

}
 
開發者ID:blackshadowwalker,項目名稱:log4j-collector,代碼行數:19,代碼來源:DNSRecord.java

示例4: removeFromList

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
private void removeFromList(ServiceInfo info){
    Log.d(TAG, "Deleting unregistered printer from UI: " + info.getName());
    String name = info.getName();
    for(int i = 0; i < printers.size(); i++) {
        if(printers.get(i).getName().equals(name)) {
            printers.remove(i);
            break;
        }
    }

    adapter.notifyDataSetChanged();
}
 
開發者ID:bencikpeter,項目名稱:3DPrintingProtocols,代碼行數:13,代碼來源:UnifiedActivity.java

示例5: parseUri

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
private String parseUri(ServiceInfo serviceInfo) {
    String uri = null;

    String prefix = "ipp://";
    String folderStructure = "/ipp/print3d/"; //defined in standard head 6.1.
    String server = serviceInfo.getServer();
    String port = ":"+Integer.toString(serviceInfo.getPort());
    String name = serviceInfo.getName();

    uri = prefix+server+port+folderStructure+name;
    return uri;
}
 
開發者ID:bencikpeter,項目名稱:3DPrintingProtocols,代碼行數:13,代碼來源:UnifiedActivity.java

示例6: parseUri

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
private String parseUri(ServiceInfo serviceInfo) {
    String uri = null;

    String prefix = "ipp://";
    String folderStructure = "/ipp/print3d/";
    String server = serviceInfo.getServer();
    String port = ":"+Integer.toString(serviceInfo.getPort());
    String name = serviceInfo.getName();

    uri = prefix+server+port+folderStructure+name;
    return uri;
}
 
開發者ID:bencikpeter,項目名稱:3DPrintingProtocols,代碼行數:13,代碼來源:DiscoveryActivity.java

示例7: SPServerInfo

import javax.jmdns.ServiceInfo; //導入方法依賴的package包/類
public SPServerInfo(ServiceInfo si) {
	scheme = "http";
    name = si.getName();
    serverAddress = si.getHostAddress();
    port = si.getPort();
    path = si.getPropertyString("path");
    username = null;
    password = null;
    passwordAllowed = true;
}
 
開發者ID:SQLPower,項目名稱:sqlpower-library,代碼行數:11,代碼來源:SPServerInfo.java


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