Java 类org.apache.camel.InOnly 实例源码

项目:further-open-core    文件:DataSourceMock.java   
/**
 * Return a {@link DsMetaData} response.
 * 
 * @param inputString
 *            input message body
 * @return meta data XML entity instance
 */
@Handler
@InOnly
public DsMetaData getDsMetaData(final String inputString)
{
    if (log.isDebugEnabled())
    {
        log.debug(getDataSourcePrefix() + "getDsMetaData()");
        // " inputString "
        // + inputString);
    }

    // For test assertion simplicity, the name field below does not depend on
    // the input string. Only the description field does.
    return new DsMetaData(name, name + ": " + inputString);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingMethodAnnotations() throws Exception {
    BeanInfo info = createBeanInfo(Foo.class);

    assertMethodPattern(info, "inOutMethod", ExchangePattern.InOut);
    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingMethodAnnotationsOnInterface() throws Exception {
    BeanInfo info = createBeanInfo(MyOneWayInterfaceWithOverloadedMethod.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
    assertMethodPattern(info, "inOutMethod", ExchangePattern.InOut);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingClassAnnotationsOnBaseInterfaceAndOverloadingMethodOnDerivedInterface() throws Exception {
    BeanInfo info = createBeanInfo(OverloadOnInterface.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
    assertMethodPattern(info, "inOutMethod", ExchangePattern.InOut);
}
项目:further-open-core    文件:DataSourceMock.java   
/**
 * Process a string body.
 * 
 * @param inputString
 *            input message body
 * @return processed input string. Contains this data source's details for easy test
 *         assertions
 */
@Handler
@InOnly
public String process(final String inputString)
{
    if (log.isTraceEnabled())
    {
        log.trace(getDataSourcePrefix() + "process() " + inputString);
    }
    return name + ": " + inputString;
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingClassAnnotationsOnInterface() throws Exception {
    BeanInfo info = createBeanInfo(MyOneWayInterface.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingClassAnnotationsButOverloadingOnMethod() throws Exception {
    BeanInfo info = createBeanInfo(OverloadOnMethod.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingClassAnnotationsButOverloadingOnBaseClassMethod() throws Exception {
    BeanInfo info = createBeanInfo(OverloadOnBaseClass.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
}
项目:Camel    文件:BeanInfoTest.java   
public void testMethodPatternUsingClassAnnotationsOnClassWithAnnotationsOnInterface() throws Exception {
    BeanInfo info = createBeanInfo(OverloadOnMethod.class);

    assertMethodPattern(info, "inOnlyMethod", ExchangePattern.InOnly);
    assertMethodPattern(info, "robustInOnlyMethod", ExchangePattern.RobustInOnly);
}
项目:Camel    文件:BeanInfoTest.java   
@Pattern(ExchangePattern.InOnly)
void inOnlyMethod();
项目:Camel    文件:IAsyncService.java   
@InOnly
void doSomethingAsync(String body);