- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.controller.cluster.schema.provider.impl.YangTextSchemaSourceSerializationProxy
类的一些代码示例,展示了YangTextSchemaSourceSerializationProxy
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangTextSchemaSourceSerializationProxy
类的具体详情如下:
包路径:org.opendaylight.controller.cluster.schema.provider.impl.YangTextSchemaSourceSerializationProxy
类名称:YangTextSchemaSourceSerializationProxy
[英]org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource serialization proxy.
[中]
代码示例来源:origin: opendaylight/controller
@Override
public void onSuccess(@Nonnull final YangTextSchemaSource result) {
try {
promise.success(new YangTextSchemaSourceSerializationProxy(result));
} catch (IOException e) {
LOG.warn("Unable to read schema source for {}", result.getIdentifier(), e);
promise.failure(e);
}
}
代码示例来源:origin: opendaylight/controller
@Override
public void onComplete(Throwable throwable,
YangTextSchemaSourceSerializationProxy yangTextSchemaSourceSerializationProxy) {
if (yangTextSchemaSourceSerializationProxy != null) {
res.set(yangTextSchemaSourceSerializationProxy.getRepresentation());
}
if (throwable != null) {
res.setException(throwable);
}
}
代码示例来源:origin: opendaylight/controller
@Test
public void serializeAndDesrializeProxy() throws ClassNotFoundException, IOException {
YangTextSchemaSourceSerializationProxy proxy = new YangTextSchemaSourceSerializationProxy(schemaSource);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(proxy);
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
YangTextSchemaSourceSerializationProxy deserializedProxy =
(YangTextSchemaSourceSerializationProxy) ois.readObject();
assertEquals(deserializedProxy.getRepresentation().getIdentifier(), proxy.getRepresentation().getIdentifier());
assertArrayEquals(deserializedProxy.getRepresentation().read(), proxy.getRepresentation().read());
}
代码示例来源:origin: opendaylight/controller
@Test
public void testProxyEqualsBackingYangTextSource() throws IOException {
YangTextSchemaSourceSerializationProxy serializationProxy =
new YangTextSchemaSourceSerializationProxy(schemaSource);
assertEquals(serializationProxy.getRepresentation().getIdentifier(), schemaSource.getIdentifier());
assertArrayEquals(serializationProxy.getRepresentation().read(), schemaSource.read());
}
}
代码示例来源:origin: org.opendaylight.controller/sal-clustering-commons
@Override
public void onComplete(Throwable throwable, YangTextSchemaSourceSerializationProxy yangTextSchemaSourceSerializationProxy) {
if(yangTextSchemaSourceSerializationProxy != null) {
res.set(yangTextSchemaSourceSerializationProxy.getRepresentation());
}
if(throwable != null) {
res.setException(throwable);
}
}
代码示例来源:origin: org.opendaylight.controller/sal-clustering-commons
@Override
public void onSuccess(YangTextSchemaSource result) {
try {
promise.success(new YangTextSchemaSourceSerializationProxy(result));
} catch (IOException e) {
LOG.warn("Unable to read schema source for {}", result.getIdentifier(), e);
promise.failure(e);
}
}
代码示例来源:origin: opendaylight/controller
@Test
public void testGetExistingYangTextSchemaSource() throws Exception {
String source = "Test source.";
YangTextSchemaSource schemaSource = YangTextSchemaSource.delegateForByteSource(
ID, ByteSource.wrap(source.getBytes()));
Mockito.when(mockedLocalRepository.getSchemaSource(ID, YangTextSchemaSource.class)).thenReturn(
Futures.immediateCheckedFuture(schemaSource));
Future<YangTextSchemaSourceSerializationProxy> retrievedSourceFuture =
remoteRepository.getYangTextSchemaSource(ID);
assertTrue(retrievedSourceFuture.isCompleted());
YangTextSchemaSource resultSchemaSource = Await.result(retrievedSourceFuture,
FiniteDuration.Zero()).getRepresentation();
assertEquals(resultSchemaSource.getIdentifier(), schemaSource.getIdentifier());
assertArrayEquals(resultSchemaSource.read(), schemaSource.read());
}
代码示例来源:origin: opendaylight/controller
@Test
public void getExistingYangTextSchemaSource() throws IOException, SchemaSourceException {
String source = "Test";
YangTextSchemaSource schemaSource = YangTextSchemaSource.delegateForByteSource(
ID, ByteSource.wrap(source.getBytes()));
YangTextSchemaSourceSerializationProxy sourceProxy = new YangTextSchemaSourceSerializationProxy(schemaSource);
Mockito.when(mockedRemoteSchemaRepository.getYangTextSchemaSource(ID))
.thenReturn(Futures.successful(sourceProxy));
YangTextSchemaSource providedSource = remoteSchemaProvider.getSource(ID).checkedGet();
assertEquals(providedSource.getIdentifier(), ID);
assertArrayEquals(providedSource.read(), schemaSource.read());
}
我在 pom.xml 中添加了以下依赖 org.opendaylight.yangtools yang-parser-impl
OpenDaylight 氧气 Maven 3.3.9 Ubuntu 16.04 Karaf 4 ~/.m2/settings.xml - cp -n ~/.m2/settings.xml{,.ori
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
我是一名优秀的程序员,十分优秀!