本文整理了Java中org.cybergarage.upnp.Device.isRootDevice()
方法的一些代码示例,展示了Device.isRootDevice()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.isRootDevice()
方法的具体详情如下:
包路径:org.cybergarage.upnp.Device
类名称:Device
方法名:isRootDevice
暂无
代码示例来源:origin: i2p/i2p.i2p
private String getNotifyDeviceNT() {
if (isRootDevice() == false)
return getUDN();
return UPNP_ROOTDEVICE;
}
代码示例来源:origin: i2p/i2p.i2p
public String getURLBase() {
if (isRootDevice() == true)
return getRootNode().getNodeValue(URLBASE_NAME);
return "";
}
代码示例来源:origin: i2p/i2p.i2p
public SSDPPacket getSSDPPacket() {
if (isRootDevice() == false)
return null;
return getDeviceData().getSSDPPacket();
}
代码示例来源:origin: i2p/i2p.i2p
private String getNotifyDeviceUSN() {
if (isRootDevice() == false)
return getUDN();
return getUDN() + "::" + UPNP_ROOTDEVICE;
}
代码示例来源:origin: i2p/i2p.i2p
private void removeDevice(Node rootNode)
{
// Thanks for Oliver Newell (2004/10/16)
// Invoke device removal listener prior to actual removal so Device node
// remains valid for the duration of the listener (application may want
// to access the node)
Device dev = getDevice(rootNode);
if( dev != null && dev.isRootDevice() )
performRemoveDeviceListener( dev );
devNodeList.remove(rootNode);
}
代码示例来源:origin: i2p/i2p.i2p
/**
*
* @return A Device that contain this object.<br>
* Return <code>null</code> if this is a root device.
*/
public Device getParentDevice() {
if (isRootDevice())
return null;
Node devNode = getDeviceNode();
Node aux = null;
// <device><deviceList><device>
aux = devNode.getParentNode().getParentNode();
return new Device(aux);
}
代码示例来源:origin: i2p/i2p.i2p
dev.isRootDevice() &&
stringEquals(_router.getFriendlyName(), dev.getFriendlyName()) &&
stringEquals(_router.getUDN(), udn)) {
代码示例来源:origin: i2p/i2p.i2p
private void setURLBase(String value) {
if (isRootDevice() == true) {
Node node = getRootNode().getNode(URLBASE_NAME);
if (node != null) {
node.setValue(value);
return;
}
node = new Node(URLBASE_NAME);
node.setValue(value);
int index = 1;
if (getRootNode().hasNodes() == false)
index = 1;
getRootNode().insertNode(node, index);
}
}
代码示例来源:origin: i2p/i2p.i2p
name = "???";
String type = dev.getDeviceType();
boolean isIGD = (ROUTER_DEVICE.equals(type) || ROUTER_DEVICE_2.equals(type)) && dev.isRootDevice();
name += isIGD ? " IGD" : (' ' + type);
String ip = getIP(dev);
代码示例来源:origin: i2p/i2p.i2p
return;
boolean isRootDevice = isRootDevice();
代码示例来源:origin: cybergarage/cybergarage-upnp
private String getNotifyDeviceNT() {
if (isRootDevice() == false)
return getUDN();
return UPNP_ROOTDEVICE;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public SSDPPacket getSSDPPacket() {
if (isRootDevice() == false)
return null;
return getDeviceData().getSSDPPacket();
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public String getURLBase() {
if (isRootDevice() == true)
return getRootNode().getNodeValue(URLBASE_NAME);
return "";
}
代码示例来源:origin: cybergarage/cybergarage-upnp
private String getNotifyDeviceUSN() {
if (isRootDevice() == false)
return getUDN();
return getUDN() + "::" + UPNP_ROOTDEVICE;
}
代码示例来源:origin: geniusgithub/MediaPlayer
public String getURLBase() {
if (isRootDevice() == true)
return getRootNode().getNodeValue(URLBASE_NAME);
return "";
}
代码示例来源:origin: geniusgithub/MediaPlayer
public SSDPPacket getSSDPPacket() {
if (isRootDevice() == false)
return null;
return getDeviceData().getSSDPPacket();
}
代码示例来源:origin: geniusgithub/MediaPlayer
private String getNotifyDeviceUSN() {
if (isRootDevice() == false)
return getUDN();
return getUDN() + "::" + UPNP_ROOTDEVICE;
}
代码示例来源:origin: i2p/i2p.i2p
if (isRootDevice() == true) {
String devNT = getNotifyDeviceNT();
String devUSN = getNotifyDeviceUSN();
代码示例来源:origin: i2p/i2p.i2p
if (isRootDevice() == true) {
String devNT = getNotifyDeviceNT();
String devUSN = getNotifyDeviceUSN();
代码示例来源:origin: cybergarage/cybergarage-upnp
void set(Device dev)
{
if (dev.isRootDevice() == true) {
addRow("Location", dev.getLocation());
addRow("URLBase", dev.getURLBase());
addRow("LeaseTime", Long.toString(dev.getLeaseTime()));
}
set(dev.getDeviceNode());
}
}
内容来源于网络,如有侵权,请联系作者删除!