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


Java Sets.set方法代码示例

本文整理汇总了Java中io.advantageous.boon.core.Sets.set方法的典型用法代码示例。如果您正苦于以下问题:Java Sets.set方法的具体用法?Java Sets.set怎么用?Java Sets.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.advantageous.boon.core.Sets的用法示例。


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

示例1: setup

import io.advantageous.boon.core.Sets; //导入方法依赖的package包/类
@Before
public void setup() throws Exception {
    mdcForHttpRequestInterceptor = new SetupMdcForHttpRequestInterceptor(Sets.set("foo"));
    methodCallBuilder = MethodCallBuilder.methodCallBuilder();
    httpRequest = HttpRequestBuilder.httpRequestBuilder().setUri("/foo").setRemoteAddress("localhost")
            .setMethodGet()
            .addHeader("foo", "bar").build();
}
 
开发者ID:advantageous,项目名称:qbit,代码行数:9,代码来源:SetupMdcForHttpRequestInterceptorTest.java

示例2: returnSet

import io.advantageous.boon.core.Sets; //导入方法依赖的package包/类
@RequestMapping("/returnSet")
public Set<Employee> returnSet() {
    return Sets.set(new Employee(1, "Rick"), new Employee(2, "Diana"));
}
 
开发者ID:advantageous,项目名称:qbit,代码行数:5,代码来源:EmployeeServiceCollectionTestService.java

示例3: fromMap

import io.advantageous.boon.core.Sets; //导入方法依赖的package包/类
/**
 * fromMap converts a map into a java object.
 * @param map map to create the object from.
 * @param clazz  the new instance type
 * @param excludeProperties the properties to exclude
 * @param <T> generic type capture
 * @return the new object
 */
@SuppressWarnings( "unchecked" )
public static <T> T fromMap( Map<String, Object> map, Class<T> clazz, String... excludeProperties ) {
    Set<String> ignoreProps = excludeProperties.length > 0 ? Sets.set(excludeProperties) :  null;
    return new MapperComplex(FieldAccessMode.FIELD_THEN_PROPERTY.create( false ), ignoreProps, null, true).fromMap(map, clazz);


}
 
开发者ID:advantageous,项目名称:boon,代码行数:16,代码来源:MapObjectConversion.java

示例4: testIntegrationWithServiceBundle

import io.advantageous.boon.core.Sets; //导入方法依赖的package包/类
@Test
public void testIntegrationWithServiceBundle() throws Exception {


    mdcForHttpRequestInterceptor = new SetupMdcForHttpRequestInterceptor(Sets.set("foo"));

    final CaptureRequestInterceptor captureRequestInterceptor = new CaptureRequestInterceptor();
    captureRequestInterceptor.before(methodCallBuilder.setName("restMethod").setOriginatingRequest(httpRequest).build());


    final ServiceBundle serviceBundle = ServiceBundleBuilder.serviceBundleBuilder()
            .setBeforeMethodCallOnServiceQueue(BeforeMethodCallChain.beforeMethodCallChain(captureRequestInterceptor, mdcForHttpRequestInterceptor))
            .setAfterMethodCallOnServiceQueue(AfterMethodCallChain.afterMethodCallChain(captureRequestInterceptor, mdcForHttpRequestInterceptor))
            .setBeforeMethodSent(new ForwardCallMethodInterceptor(new RequestContext())).build().startServiceBundle();


    serviceBundle.addServiceObject("my", new MyServiceImpl());


    final MyService localProxy = serviceBundle.createLocalProxy(MyService.class, "my");

    final AsyncFutureCallback<String> callback = AsyncFutureBuilder.asyncFutureBuilder().build(String.class);
    localProxy.getRequestURI(callback);

    localProxy.clientProxyFlush();

    assertEquals("/foo", callback.get());


    final AsyncFutureCallback<Map<String, String>> callbackMap = AsyncFutureBuilder.asyncFutureBuilder()
            .buildMap(String.class, String.class);

    localProxy.getMDC(callbackMap);

    localProxy.clientProxyFlush();

    validate(callbackMap.get());

    captureRequestInterceptor.after(null, null);

    serviceBundle.stop();


}
 
开发者ID:advantageous,项目名称:qbit,代码行数:45,代码来源:SetupMdcForHttpRequestInterceptorTest.java


注:本文中的io.advantageous.boon.core.Sets.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。