org.ow2.jonas.camel.example.cxf.route
Class ExampleCXF

java.lang.Object
  extended by org.apache.camel.builder.BuilderSupport
      extended by org.apache.camel.builder.RouteBuilder
          extended by org.ow2.jonas.camel.component.RouteBuilderComponent
              extended by org.ow2.jonas.camel.example.cxf.route.ExampleCXF
All Implemented Interfaces:
org.apache.camel.RoutesBuilder

public class ExampleCXF
extends RouteBuilderComponent

A simple example on how to use the camel service on JOnAS 5.

Author:
Guillaume Renault

Field Summary
 
Fields inherited from class org.ow2.jonas.camel.component.RouteBuilderComponent
bundleContext, camelContextName, camelService, registryReplacements, TRACE_LOGGER_NAME, traceDestination
 
Constructor Summary
ExampleCXF(org.osgi.framework.BundleContext bundleContext)
          Constructor: saves the BundleContext.
 
Method Summary
 void configure()
          Add routes to the CAMEL context.
 void start()
          Adds the OSGi HTTP service port and the target/fileToHelloService directory into RouteBuilderComponent.registryReplacements, calls RouteBuilderComponent.start() and launches a self-test.
 void test()
          Test the routes.
 
Methods inherited from class org.ow2.jonas.camel.component.RouteBuilderComponent
configureCamelComponents, getConfigurationFolder, getFileEndpointFile, getRegistryPropertyOrReplacement, getRouteName, setCamelService, stop
 
Methods inherited from class org.apache.camel.builder.RouteBuilder
addRoutes, addRoutesToCamelContext, checkInitialized, configureRoute, configureRoutes, createContainer, errorHandler, from, from, from, from, fromF, getContext, getRouteCollection, includeRoutes, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, onCompletion, onException, onException, populateRoutes, setErrorHandlerBuilder, setRouteCollection, toString
 
Methods inherited from class org.apache.camel.builder.BuilderSupport
bean, bean, bean, bean, body, body, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, endpoints, endpoints, exceptionMessage, faultBody, faultBodyAs, getErrorHandlerBuilder, header, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, property, regexReplaceAll, regexReplaceAll, sendTo, setContext, simple, systemProperty, systemProperty, xpath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExampleCXF

public ExampleCXF(org.osgi.framework.BundleContext bundleContext)
Constructor: saves the BundleContext.

Method Detail

start

public void start()
           throws Throwable
Adds the OSGi HTTP service port and the target/fileToHelloService directory into RouteBuilderComponent.registryReplacements, calls RouteBuilderComponent.start() and launches a self-test.

Overrides:
start in class RouteBuilderComponent
Throws:
Throwable

configure

public void configure()
               throws Exception
Add routes to the CAMEL context.

Overrides:
configure in class RouteBuilderComponent
Throws:
Exception

test

public void test()
          throws Exception
Test the routes.

Throws:
Exception


Copyright © 2012 OW2 Consortium. All Rights Reserved.