org.apache.camel.component.servlet.CamelHttpTransportServlet Java Examples

The following examples show how to use org.apache.camel.component.servlet.CamelHttpTransportServlet. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServletMappingAutoConfiguration.java    From camel-spring-boot with Apache License 2.0 6 votes vote down vote up
@Bean
ServletRegistrationBean servletRegistrationBean(ServletMappingConfiguration config) {
    ServletRegistrationBean mapping = new ServletRegistrationBean();
    mapping.setServlet(new CamelHttpTransportServlet());
    mapping.addUrlMappings(config.getContextPath());
    mapping.setName(config.getServletName());
    mapping.setLoadOnStartup(1);

    return mapping;
}
 
Example #2
Source File: WebhookServletAutoConfiguration.java    From syndesis-extensions with Apache License 2.0 5 votes vote down vote up
@Bean
ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean mapping = new ServletRegistrationBean();
    mapping.setServlet(new CamelHttpTransportServlet());
    mapping.addUrlMappings("/webhook/*");
    mapping.setName("CamelServlet");
    mapping.setLoadOnStartup(1);

    return mapping;
}
 
Example #3
Source File: WebhookServletAutoConfiguration.java    From syndesis with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletRegistrationBean<CamelHttpTransportServlet> servletRegistrationBean() {
    ServletRegistrationBean<CamelHttpTransportServlet> mapping = new ServletRegistrationBean<>();
    mapping.setServlet(new CamelHttpTransportServlet());
    mapping.addUrlMappings("/webhook/*");
    mapping.setName("CamelServlet");
    mapping.setLoadOnStartup(1);

    return mapping;
}
 
Example #4
Source File: FunktionRouteBuilder.java    From funktion-connectors with Apache License 2.0 5 votes vote down vote up
@Bean
ServletRegistrationBean camelServlet() {
    // use a @Bean to register the Camel servlet which we need to do
    // because we want to use the camel-servlet component for the Camel REST service
    ServletRegistrationBean mapping = new ServletRegistrationBean();
    mapping.setName("CamelServlet");
    mapping.setLoadOnStartup(1);
    mapping.setServlet(new CamelHttpTransportServlet());
    mapping.addUrlMappings("/camel/*");
    return mapping;
}
 
Example #5
Source File: Application.java    From camel-cookbook-examples with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean registration =
            new ServletRegistrationBean(new CamelHttpTransportServlet(), CAMEL_URL_MAPPING);
    registration.setName(CAMEL_SERVLET_NAME);
    return registration;
}
 
Example #6
Source File: Application.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean servlet = new ServletRegistrationBean(new CamelHttpTransportServlet(), contextPath+"/*");
    servlet.setName("CamelServlet");
    return servlet;
}