本文整理汇总了Java中com.subgraph.orchid.RouterDescriptor类的典型用法代码示例。如果您正苦于以下问题:Java RouterDescriptor类的具体用法?Java RouterDescriptor怎么用?Java RouterDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RouterDescriptor类属于com.subgraph.orchid包,在下文中一共展示了RouterDescriptor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: downloadDescriptor
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
private void downloadDescriptor() {
logger.fine("Downloading descriptor for bridge: "+ target);
try {
final RouterDescriptor descriptor = directoryDownloader.downloadBridgeDescriptor(target);
if(descriptor != null) {
logger.fine("Descriptor received for bridge "+ target +". Adding to list of usable bridges");
target.setDescriptor(descriptor);
synchronized(lock) {
bridgeRouters.add(target);
lock.notifyAll();
}
}
} catch (DirectoryRequestFailedException e) {
logger.warning("Failed to download descriptor for bridge: "+ e.getMessage());
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:17,代码来源:Bridges.java
示例2: createBasicDescriptorCache
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
private static DescriptorCache<RouterDescriptor> createBasicDescriptorCache(DirectoryStore store) {
return new DescriptorCache<RouterDescriptor>(store, CacheFile.DESCRIPTOR_CACHE, CacheFile.DESCRIPTOR_JOURNAL) {
@Override
protected DocumentParser<RouterDescriptor> createDocumentParser(ByteBuffer buffer) {
return parserFactory.createRouterDescriptorParser(buffer, false);
}
};
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:DirectoryImpl.java
示例3: isHibernating
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public boolean isHibernating() {
final RouterDescriptor rd = downcastDescriptor();
if(rd == null) {
return false;
} else {
return rd.isHibernating();
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例4: getIdentityKey
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public TorPublicKey getIdentityKey() {
final RouterDescriptor rd = downcastDescriptor();
if(rd != null) {
return rd.getIdentityKey();
} else {
return null;
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例5: getAverageBandwidth
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public int getAverageBandwidth() {
final RouterDescriptor rd = downcastDescriptor();
if(rd == null) {
return 0;
} else {
return rd.getAverageBandwidth();
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例6: getBurstBandwidth
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public int getBurstBandwidth() {
final RouterDescriptor rd = downcastDescriptor();
if(rd == null) {
return 0;
} else {
return rd.getBurstBandwidth();
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例7: getObservedBandwidth
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public int getObservedBandwidth() {
final RouterDescriptor rd = downcastDescriptor();
if(rd == null) {
return 0;
} else {
return rd.getObservedBandwidth();
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例8: downcastDescriptor
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
private RouterDescriptor downcastDescriptor() {
refreshDescriptor();
if(descriptor instanceof RouterDescriptor) {
return (RouterDescriptor) descriptor;
} else {
return null;
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:9,代码来源:RouterImpl.java
示例9: parse
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public boolean parse(DocumentParsingResultHandler<RouterDescriptor> resultHandler) {
this.resultHandler = resultHandler;
startNewDescriptor();
try {
fieldParser.processDocument();
return true;
} catch(TorParsingException e) {
resultHandler.parsingError(e.getMessage());
return false;
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:12,代码来源:RouterDescriptorParser.java
示例10: isHibernating
import com.subgraph.orchid.RouterDescriptor; //导入依赖的package包/类
public boolean isHibernating() {
if(descriptor instanceof RouterDescriptor) {
return ((RouterDescriptor)descriptor).isHibernating();
} else {
return false;
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:8,代码来源:BridgeRouterImpl.java
注:本文中的com.subgraph.orchid.RouterDescriptor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论