本文整理汇总了Java中io.vertx.core.streams.WriteStream.end方法的典型用法代码示例。如果您正苦于以下问题:Java WriteStream.end方法的具体用法?Java WriteStream.end怎么用?Java WriteStream.end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.vertx.core.streams.WriteStream
的用法示例。
在下文中一共展示了WriteStream.end方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleImport
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test a simple import
* @param context the test context
*/
@Test
public void simpleImport(TestContext context) {
String url = "/store";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport(
context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例2: importLayer
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing to a layer
* @param context the test context
*/
@Test
public void importLayer(TestContext context) {
String url = "/store/hello/world/";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport("hello/world",
context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例3: importLayerWithSpecialChars
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing to a layer with special characters
* @param context the test context
*/
@Test
public void importLayerWithSpecialChars(TestContext context) {
String url = "/store/he%2Bllo/world/";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport("he+llo/world",
context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例4: importTags
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing with tags
* @param context the test context
* @throws Exception if something goes wrong
*/
@Test
public void importTags(TestContext context) throws Exception {
String url = "/store?tags=hello%2Cworld";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport(null,
Arrays.asList("hello", "world"), context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例5: importProperties
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing properties
* @param context the test context
* @throws Exception if something goes wrong
*/
@Test
public void importProperties(TestContext context) throws Exception {
String url = "/store?props=hello%3Aworld%2Ckey%3Avalue";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport(null, null,
Arrays.asList("hello:world", "key:value"), context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例6: importTagsAndProperties
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing tags and properties
* @param context the test context
* @throws Exception if something goes wrong
*/
@Test
public void importTagsAndProperties(TestContext context) throws Exception {
String url = "/store?tags=testTag%2CtestTag2&props=hello%3Awo%5C%3Arld%2Challo2%3Aworld2";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore().startImport(null,
Arrays.asList("testTag", "testTag2"), Arrays.asList("hello:wo\\:rld", "hallo2:world2"),
context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例7: importCRS
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing tags and properties
* @param context the test context
* @throws Exception if something goes wrong
*/
@Test
public void importCRS(TestContext context) throws Exception {
String url = "/store?fallbackCRS=test";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore()
.startImport(null, null, null, Optional.empty(), "test",
context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}
示例8: importTagsAndCRS
import io.vertx.core.streams.WriteStream; //导入方法依赖的package包/类
/**
* Test importing tags and properties
* @param context the test context
* @throws Exception if something goes wrong
*/
@Test
public void importTagsAndCRS(TestContext context) throws Exception {
String url = "/store?tags=testTag%2CtestTag2&props=" +
"hello%3Awo%5C%3Arld%2Challo2%3Aworld2&fallbackCRS=test";
stubFor(post(urlEqualTo(url))
.willReturn(aResponse()
.withStatus(202)));
Async async = context.async();
WriteStream<Buffer> w = client.getStore()
.startImport(null, Arrays.asList("testTag", "testTag2"),
Arrays.asList("hello:wo\\:rld", "hallo2:world2"), Optional.empty(),
"test", context.asyncAssertSuccess(v -> {
verifyPosted(url, XML, context);
async.complete();
}));
w.end(Buffer.buffer(XML));
}