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


Java NullPayload类代码示例

本文整理汇总了Java中org.mule.transport.NullPayload的典型用法代码示例。如果您正苦于以下问题:Java NullPayload类的具体用法?Java NullPayload怎么用?Java NullPayload使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testFlowPublisher2

import org.mule.transport.NullPayload; //导入依赖的package包/类
@Test
public void testFlowPublisher2() throws Exception
{
    //Allow servers to start
    Thread.sleep(1000);
    
    RunTcpTest t1 = new RunTcpTest(PUBLISHER1_PORT, CONNECTOR_NAME);
    t1.start();
    
    RunTcpTest t2 = new RunTcpTest(PUBLISHER2_PORT, CONNECTOR_NAME);
    t2.start();
    
    runFlowWithPayloadAndExpect("testFlowPublisher2", NullPayload.getInstance(), PAYLOAD);
    
    t1.join();
    Assert.assertEquals(PAYLOAD, t1.getResult());
    t2.join();
    Assert.assertEquals(PAYLOAD, t2.getResult());
}
 
开发者ID:Ricston,项目名称:mule-transport-netty-publisher,代码行数:20,代码来源:NettyPublisherConnectorTest.java

示例2: testFlowPublisher1

import org.mule.transport.NullPayload; //导入依赖的package包/类
@Test
public void testFlowPublisher1() throws Exception
{
    //Allow servers to start
    Thread.sleep(1000);
    
    RunTcpTest t1 = new RunTcpTest(PUBLISHER1_PORT, CONNECTOR_NAME);
    t1.start();
    
    runFlowWithPayloadAndExpect("testFlowPublisher1", NullPayload.getInstance(), PAYLOAD);
    
    t1.join();
    Assert.assertEquals(PAYLOAD, t1.getResult());
}
 
开发者ID:Ricston,项目名称:mule-transport-netty-publisher,代码行数:15,代码来源:NettyPublisherConnectorTest.java

示例3: runFlowAndExpect

import org.mule.transport.NullPayload; //导入依赖的package包/类
/**
 * Run the flow specified by name and assert equality on the expected output
 * 
 * @param flowName The name of the flow to run
 * @param expect The expected output
 */
protected <T> void runFlowAndExpect(String flowName, T expect) throws Exception
{
    Flow flow = lookupFlowConstruct(flowName);
    MuleEvent event = getTestEvent(NullPayload.getInstance());
    MuleEvent responseEvent = flow.process(event);

    Assert.assertEquals(expect, responseEvent.getMessage().getPayload());
}
 
开发者ID:Ricston,项目名称:mule-transport-netty-publisher,代码行数:15,代码来源:NettyPublisherConnectorTest.java

示例4: DxTransformer

import org.mule.transport.NullPayload; //导入依赖的package包/类
public DxTransformer() {
	super();
	
	transformerPool = new GenericObjectPool(new PooledDxTransformerFactory());
       transformerPool.setMinIdle(MIN_IDLE_TRANSFORMERS);
       transformerPool.setMaxIdle(MAX_IDLE_TRANSFORMERS);
       transformerPool.setMaxActive(MAX_ACTIVE_TRANSFORMERS);

	registerSourceType(DataTypeFactory.create(org.w3c.dom.Node.class));
	registerSourceType(DataTypeFactory.create(InputSource.class));
	registerSourceType(DataTypeFactory.create(NullPayload.class));

	contextProperties = new HashMap<String, Object>();
}
 
开发者ID:skjolber,项目名称:mule-module-dxpath,代码行数:15,代码来源:DxTransformer.java

示例5: testMessage

import org.mule.transport.NullPayload; //导入依赖的package包/类
protected DefaultMuleMessage testMessage() {
    MuleEvent testEvent;
    try {
        testEvent = MuleTestUtils.getTestEvent(NullPayload.getInstance(), new DefaultMuleSession(), context());
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    RequestContext.setEvent(testEvent);
    return new DefaultMuleMessage(NullPayload.getInstance(), muleContext);
}
 
开发者ID:greenbird,项目名称:mule-access-log,代码行数:11,代码来源:AccessLogConverterTestBase.java

示例6: getResponse

import org.mule.transport.NullPayload; //导入依赖的package包/类
public T getResponse() {
    // TODO: I would rather return EmptyResponse instead of null! - sporcina (Oct.12, 2013)
    // return null instead of NullPayload to ensure the caller (e.g. acceptance tests) is not exposed to Mule constructs
    return (response instanceof NullPayload) ? null : response;
}
 
开发者ID:sporcina,项目名称:dynamodb-connector,代码行数:6,代码来源:FlowResponse.java

示例7: testFlow

import org.mule.transport.NullPayload; //导入依赖的package包/类
@Test
public void testFlow() throws Exception
{
    runFlowAndExpect("testRecord", NullPayload.getInstance());
    // wish there was a way to verify it was recorded
}
 
开发者ID:mulesoft,项目名称:kissmetrics-connector,代码行数:7,代码来源:KissMetricsConnectorTest.java

示例8: doConvert_responseNotAvailable_defaultUsed

import org.mule.transport.NullPayload; //导入依赖的package包/类
@Test
public void doConvert_responseNotAvailable_defaultUsed() {
    String logOutput = logWithPayload(ContentLengthConverter.CONVERSION_STRING, NullPayload.getInstance());
    assertThat(logOutput, is(DEFAULT_VALUE));
}
 
开发者ID:greenbird,项目名称:mule-access-log,代码行数:6,代码来源:ContentLengthConverterTest.java

示例9: doConvert_responseNotAvailable_defaultUsed

import org.mule.transport.NullPayload; //导入依赖的package包/类
@Test
public void doConvert_responseNotAvailable_defaultUsed() {
    String logOutput = logWithPayload(StatusCodeConverter.CONVERSION_STRING, NullPayload.getInstance());
    assertThat(logOutput, is(DEFAULT_VALUE));
}
 
开发者ID:greenbird,项目名称:mule-access-log,代码行数:6,代码来源:StatusCodeConverterTest.java

示例10: logWithSession

import org.mule.transport.NullPayload; //导入依赖的package包/类
protected String logWithSession(String conversionString, MuleSession session) throws Exception {
    MuleMessage message = testMessage();
    MuleEvent testEvent = MuleTestUtils.getTestEvent(NullPayload.getInstance(), session, context());
    RequestContext.setEvent(testEvent);
    return logSpecifierWithDefault(conversionString, message);
}
 
开发者ID:greenbird,项目名称:mule-access-log,代码行数:7,代码来源:AccessLogConverterTestBase.java


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