Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • MyConsumerEndpoint.java - Extends ConsumerEndpoint and implements MyEndpointType. If you'd like to create a BC that fulfills the consumer role, implement the process() method in this class.
  • MyEndpointType.java - This class is simply an interface marker for Apache XBean so it can generate an XML schema document.
  • MyProviderEndpoint.java - Extends ProviderEndpoint and implements MyEndpointType. If you'd like to create a BC that fulfills the provider role, depending on the MEP being supported, implement the processInOnly() method or the processInOut() method in this class.
  • MySpringComponentTest.java - A simple JUnit test class that extends a helper class to make configuring ServiceMix very easy.

...

Adding Custom Functionality

Before creating custom functionality for the BC, you need to understand the role of a JBI BC. A BC is simply a binding to a service that is external to the JBI normalized message router (NMR) using some type of communications protocol (e.g., FTP, HTTP, JMS, etc.). It's also the responsibility of the BC to handle any conversion of the message format into Normalized Messages that can be sent along to the NMR. This is known as message normalization.

For example, if we were to create a BC that uses SNMP as the application layer protocol, the SNMP RFC specifies the message format to be used with particular versions of SNMP. It would be the responsibility of the BC to handle not only the communication via the SNMP protocol but also to handling the marshalling of SNMP messages to/from JBI normalized messages. The BC would simply be a binding to a service external to the NMR that speaks SNMP messages via the SNMP protocol.

More on this later in the tutorial. For now, let's proceed with the custom functionality.

Note
titleUsing an IDE

It is at this stage that you should employ the use of an IDE. An IDE can dramatically reduce the work necessary to import clases, override methods and so much more. Because Maven can generate project files for Eclipse and IntelliJ IDEA, either one can be used. Throughout this tutorial, Eclipse will be used. To generate project files for Eclipse, execute the Maven eclipse:eclipse goal and then import the project into your Eclipse IDE.

...