当前位置: 首页>>代码示例>>Java>>正文


Java SSDPNotifySocketList类代码示例

本文整理汇总了Java中org.cybergarage.upnp.ssdp.SSDPNotifySocketList的典型用法代码示例。如果您正苦于以下问题:Java SSDPNotifySocketList类的具体用法?Java SSDPNotifySocketList怎么用?Java SSDPNotifySocketList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SSDPNotifySocketList类属于org.cybergarage.upnp.ssdp包,在下文中一共展示了SSDPNotifySocketList类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ControlPoint

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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: ControlPoint

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的package包/类
public ControlPoint(int ssdpPort, int httpPort,InetAddress[] binds){
	ssdpNotifySocketList = new SSDPNotifySocketList(binds);
	ssdpSearchResponseSocketList = new SSDPSearchResponseSocketList(binds);
	
	setSSDPPort(ssdpPort);
	setHTTPPort(httpPort);
	
	setDeviceDisposer(null);
	setExpiredDeviceMonitoringInterval(DEFAULT_EXPIRED_DEVICE_MONITORING_INTERVAL);

	setRenewSubscriber(null);
			
	setNMPRMode(false);
	setRenewSubscriber(null);
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:16,代码来源:ControlPoint.java

示例4: ControlPoint

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的package包/类
public ControlPoint(int ssdpPort, int httpPort, InetAddress[] binds){
	ssdpNotifySocketList = new SSDPNotifySocketList(binds);
	ssdpSearchResponseSocketList = new SSDPSearchResponseSocketList(binds);
	
	setSSDPPort(ssdpPort);
	setHTTPPort(httpPort);
	
	setDeviceDisposer(null);
	setExpiredDeviceMonitoringInterval(DEFAULT_EXPIRED_DEVICE_MONITORING_INTERVAL);

	setRenewSubscriber(null);
			
	setNMPRMode(false);
	setRenewSubscriber(null);
}
 
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:16,代码来源:ControlPoint.java

示例5: getSSDPNotifySocketList

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的package包/类
private SSDPNotifySocketList getSSDPNotifySocketList() {
    return this.ssdpNotifySocketList;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:ControlPoint.java

示例6: start

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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: getSSDPNotifySocketList

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的package包/类
private SSDPNotifySocketList getSSDPNotifySocketList()
{
	return ssdpNotifySocketList;
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:5,代码来源:ControlPoint.java

示例8: stop

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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

示例9: start

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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

示例10: stop

import org.cybergarage.upnp.ssdp.SSDPNotifySocketList; //导入依赖的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.upnp.ssdp.SSDPNotifySocketList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。