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


Java HTTPServerList類代碼示例

本文整理匯總了Java中org.cybergarage.http.HTTPServerList的典型用法代碼示例。如果您正苦於以下問題:Java HTTPServerList類的具體用法?Java HTTPServerList怎麽用?Java HTTPServerList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: ControlPoint

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public ControlPoint(int ssdpPort, int httpPort, InetAddress[] binds) {
    this.mutex = new Mutex();
    this.ssdpPort = 0;
    this.httpPort = 0;
    this.devNodeList = new NodeList();
    this.deviceNotifyListenerList = new ListenerList();
    this.deviceSearchResponseListenerList = new ListenerList();
    this.deviceChangeListenerList = new ListenerList();
    this.searchMx = 3;
    this.httpServerList = new HTTPServerList();
    this.eventListenerList = new ListenerList();
    this.eventSubURI = DEFAULT_EVENTSUB_URI;
    this.userData = null;
    this.ssdpNotifySocketList = new SSDPNotifySocketList(binds);
    this.ssdpSearchResponseSocketList = new SSDPSearchResponseSocketList(binds);
    setSSDPPort(ssdpPort);
    setHTTPPort(httpPort);
    setDeviceDisposer(null);
    setExpiredDeviceMonitoringInterval(60);
    setRenewSubscriber(null);
    setNMPRMode(false);
    setRenewSubscriber(null);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:24,代碼來源:ControlPoint.java

示例2: stop

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean stop() {
    unsubscribe();
    SSDPNotifySocketList ssdpNotifySocketList = getSSDPNotifySocketList();
    ssdpNotifySocketList.stop();
    ssdpNotifySocketList.close();
    ssdpNotifySocketList.clear();
    SSDPSearchResponseSocketList ssdpSearchResponseSocketList = getSSDPSearchResponseSocketList();
    ssdpSearchResponseSocketList.stop();
    ssdpSearchResponseSocketList.close();
    ssdpSearchResponseSocketList.clear();
    HTTPServerList httpServerList = getHTTPServerList();
    httpServerList.stop();
    httpServerList.close();
    httpServerList.clear();
    Disposer disposer = getDeviceDisposer();
    if (disposer != null) {
        disposer.stop();
        setDeviceDisposer(null);
    }
    RenewSubscriber renewSub = getRenewSubscriber();
    if (renewSub != null) {
        renewSub.stop();
        setRenewSubscriber(null);
    }
    return true;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:27,代碼來源:ControlPoint.java

示例3: stop

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private boolean stop(boolean doByeBye)
{
	if (doByeBye == true)
		byebye();
	
	HTTPServerList httpServerList = getHTTPServerList();
	httpServerList.stop();
	httpServerList.close();
	httpServerList.clear();
	
	SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList();
	ssdpSearchSockList.stop();
	ssdpSearchSockList.close();
	ssdpSearchSockList.clear();
	
	Advertiser adv = getAdvertiser();
	if (adv != null) {
		adv.stop();
		setAdvertiser(null);
	}

	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:24,代碼來源:Device.java

示例4: stop

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private boolean stop(boolean doByeBye) {
	if (doByeBye == true)
		byebye();

	HTTPServerList httpServerList = getHTTPServerList();
	httpServerList.stop();
	httpServerList.close();
	httpServerList.clear();

	SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList();
	ssdpSearchSockList.stop();
	ssdpSearchSockList.close();
	ssdpSearchSockList.clear();

	Advertiser adv = getAdvertiser();
	if (adv != null) {
		adv.stop();
		setAdvertiser(null);
	}

	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:23,代碼來源:Device.java

示例5: getHTTPServerList

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private HTTPServerList getHTTPServerList() {
    return this.httpServerList;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:ControlPoint.java

示例6: start

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean start(String target, int mx) {
    stop();
    int retryCnt = 0;
    int bindPort = getHTTPPort();
    HTTPServerList httpServerList = getHTTPServerList();
    while (!httpServerList.open(bindPort)) {
        retryCnt++;
        if (100 < retryCnt) {
            return false;
        }
        setHTTPPort(bindPort + 1);
        bindPort = getHTTPPort();
    }
    httpServerList.addRequestListener(this);
    httpServerList.start();
    SSDPNotifySocketList ssdpNotifySocketList = getSSDPNotifySocketList();
    if (!ssdpNotifySocketList.open()) {
        return false;
    }
    ssdpNotifySocketList.setControlPoint(this);
    ssdpNotifySocketList.start();
    int ssdpPort = getSSDPPort();
    retryCnt = 0;
    SSDPSearchResponseSocketList ssdpSearchResponseSocketList = getSSDPSearchResponseSocketList();
    while (!ssdpSearchResponseSocketList.open(ssdpPort)) {
        retryCnt++;
        if (100 < retryCnt) {
            return false;
        }
        setSSDPPort(ssdpPort + 1);
        ssdpPort = getSSDPPort();
    }
    ssdpSearchResponseSocketList.setControlPoint(this);
    ssdpSearchResponseSocketList.start();
    search(target, mx);
    Disposer disposer = new Disposer(this);
    setDeviceDisposer(disposer);
    disposer.start();
    if (isNMPRMode()) {
        RenewSubscriber renewSub = new RenewSubscriber(this);
        setRenewSubscriber(renewSub);
        renewSub.start();
    }
    return true;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:46,代碼來源:ControlPoint.java

示例7: getHTTPServerList

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private HTTPServerList getHTTPServerList() 
{
	return getDeviceData().getHTTPServerList();
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:5,代碼來源:Device.java

示例8: start

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean start()
{
	stop(true);
	
	////////////////////////////////////////
	// HTTP Server
	////////////////////////////////////////
	
	int retryCnt = 0;
	int bindPort = getHTTPPort();
	HTTPServerList httpServerList = getHTTPServerList();
	while (httpServerList.open(bindPort) == false) {
		retryCnt++;
		if (UPnP.SERVER_RETRY_COUNT < retryCnt)
			return false;
		setHTTPPort(bindPort + 1);
		bindPort = getHTTPPort();
	}
	httpServerList.addRequestListener(this);
	httpServerList.start();

	////////////////////////////////////////
	// SSDP Seach Socket
	////////////////////////////////////////
	
	SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList();
	if (ssdpSearchSockList.open() == false)
		return false;
	ssdpSearchSockList.addSearchListener(this);
	ssdpSearchSockList.start();

	////////////////////////////////////////
	// Announce
	////////////////////////////////////////
	
	announce();
	
	////////////////////////////////////////
	// Advertiser
	////////////////////////////////////////

	Advertiser adv = new Advertiser(this);
	setAdvertiser(adv);
	adv.start();
	
	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:48,代碼來源:Device.java

示例9: getHTTPServerList

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private HTTPServerList getHTTPServerList()
{
	return httpServerList;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:5,代碼來源:ControlPoint.java

示例10: stop

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean stop()
{ 
	unsubscribe();
	
	SSDPNotifySocketList ssdpNotifySocketList = getSSDPNotifySocketList();
	ssdpNotifySocketList.stop();
	ssdpNotifySocketList.close();
	ssdpNotifySocketList.clear();
	
	SSDPSearchResponseSocketList ssdpSearchResponseSocketList = getSSDPSearchResponseSocketList();
	ssdpSearchResponseSocketList.stop();
	ssdpSearchResponseSocketList.close();
	ssdpSearchResponseSocketList.clear();

	HTTPServerList httpServerList = getHTTPServerList();
	httpServerList.stop();
	httpServerList.close();
	httpServerList.clear();
		
	////////////////////////////////////////
	// Disposer
	////////////////////////////////////////
	
	Disposer disposer = getDeviceDisposer();
	if (disposer != null) {
		disposer.stop();
		setDeviceDisposer(null);
	}
	
	////////////////////////////////////////
	// Subscriber
	////////////////////////////////////////
	
	RenewSubscriber renewSub = getRenewSubscriber();
	if (renewSub != null) {
		renewSub.stop();
		setRenewSubscriber(null);
	}
	
	// I2P so we will re-notify on restart
	DeviceList dl = getDeviceList();
	for (int i = 0; i < dl.size(); i++) {
		removeDevice(dl.getDevice(i));
	}

	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:48,代碼來源:ControlPoint.java

示例11: getHTTPServerList

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
private HTTPServerList getHTTPServerList() {
	return getDeviceData().getHTTPServerList();
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:4,代碼來源:Device.java

示例12: start

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean start() {
	stop(true);

	// //////////////////////////////////////
	// HTTP Server
	// //////////////////////////////////////

	int retryCnt = 0;
	int bindPort = getHTTPPort();
	HTTPServerList httpServerList = getHTTPServerList();
	while (httpServerList.open(bindPort) == false) {
		retryCnt++;
		if (UPnP.SERVER_RETRY_COUNT < retryCnt)
			return false;
		setHTTPPort(bindPort + 1);
		bindPort = getHTTPPort();
	}
	httpServerList.addRequestListener(this);
	httpServerList.start();

	// //////////////////////////////////////
	// SSDP Seach Socket
	// //////////////////////////////////////

	SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList();
	if (ssdpSearchSockList.open() == false)
		return false;
	ssdpSearchSockList.addSearchListener(this);
	ssdpSearchSockList.start();

	// //////////////////////////////////////
	// BOOTID/CONFIGID.UPNP.ORG
	// //////////////////////////////////////

	updateBootId();
	updateConfigId();

	// //////////////////////////////////////
	// Announce
	// //////////////////////////////////////

	announce();

	// //////////////////////////////////////
	// Advertiser
	// //////////////////////////////////////

	Advertiser adv = new Advertiser(this);
	setAdvertiser(adv);
	adv.start();

	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:54,代碼來源:Device.java

示例13: start

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean start(String target, int mx)
{
	stop();
	
	////////////////////////////////////////
	// HTTP Server
	////////////////////////////////////////
	
	int retryCnt = 0;
	int bindPort = getHTTPPort();
	HTTPServerList httpServerList = getHTTPServerList();
	while (httpServerList.open(bindPort) == false) {
		retryCnt++;
		if (UPnP.SERVER_RETRY_COUNT < retryCnt)
			return false;
		setHTTPPort(bindPort + 1);
		bindPort = getHTTPPort();
	}
	httpServerList.addRequestListener(this);
	httpServerList.start();
	
	////////////////////////////////////////
	// Notify Socket
	////////////////////////////////////////
	
	SSDPNotifySocketList ssdpNotifySocketList = getSSDPNotifySocketList();
	if (ssdpNotifySocketList.open() == false)
		return false;
	ssdpNotifySocketList.setControlPoint(this);			
	ssdpNotifySocketList.start();
	
	////////////////////////////////////////
	// SeachResponse Socket
	////////////////////////////////////////
	
	int ssdpPort = getSSDPPort();
	retryCnt = 0;
	SSDPSearchResponseSocketList ssdpSearchResponseSocketList = getSSDPSearchResponseSocketList();
	while (ssdpSearchResponseSocketList.open(ssdpPort) == false) {
		retryCnt++;
		if (UPnP.SERVER_RETRY_COUNT < retryCnt)
			return false;
		setSSDPPort(ssdpPort + 1);
		ssdpPort = getSSDPPort();
	}
	ssdpSearchResponseSocketList.setControlPoint(this);
	ssdpSearchResponseSocketList.start();

	////////////////////////////////////////
	// search root devices
	////////////////////////////////////////
	
	search(target, mx);
	
	////////////////////////////////////////
	// Disposer
	////////////////////////////////////////

	Disposer disposer = new Disposer(this);
	setDeviceDisposer(disposer);
	disposer.start();
			
	////////////////////////////////////////
	// Subscriber
	////////////////////////////////////////
	
	if (isNMPRMode() == true) {
		RenewSubscriber renewSub = new RenewSubscriber(this);
		setRenewSubscriber(renewSub);
		renewSub.start();
	}
	
	return true;
}
 
開發者ID:jimdowling,項目名稱:nat-traverser,代碼行數:75,代碼來源:ControlPoint.java

示例14: stop

import org.cybergarage.http.HTTPServerList; //導入依賴的package包/類
public boolean stop()
{ 
	unsubscribe();
	
	SSDPNotifySocketList ssdpNotifySocketList = getSSDPNotifySocketList();
	ssdpNotifySocketList.stop();
	ssdpNotifySocketList.close();
	ssdpNotifySocketList.clear();
	
	SSDPSearchResponseSocketList ssdpSearchResponseSocketList = getSSDPSearchResponseSocketList();
	ssdpSearchResponseSocketList.stop();
	ssdpSearchResponseSocketList.close();
	ssdpSearchResponseSocketList.clear();

	HTTPServerList httpServerList = getHTTPServerList();
	httpServerList.stop();
	httpServerList.close();
	httpServerList.clear();
		
	////////////////////////////////////////
	// Disposer
	////////////////////////////////////////
	
	Disposer disposer = getDeviceDisposer();
	if (disposer != null) {
		disposer.stop();
		setDeviceDisposer(null);
	}
	
	////////////////////////////////////////
	// Subscriber
	////////////////////////////////////////
	
	RenewSubscriber renewSub = getRenewSubscriber();
	if (renewSub != null) {
		renewSub.stop();
		setRenewSubscriber(null);
	}
	
	return true;
}
 
開發者ID:jimdowling,項目名稱:nat-traverser,代碼行數:42,代碼來源:ControlPoint.java


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