Versions Compared

Key

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

...

The implementation of this method was provided by the servicemix-service-engine Maven archetype and is shown in the code snippet above. Because the archetype can be used to create a consumer or a provider, this snippet method is very generic and contains a conditional block for handling either a consuemr consumer or a provider role. But this method will still require us to make the decision of which style of Message Exchange Pattern (MEP) to handle as well. In the case of the Hello World SE, we are only interested in the provider role so we're going to make some changes to MyEndpointknow that it is a provider so it will need to send a return message. Therefore it will need to handle an InOut MEP.

Instead of having MyEndpoint extend the very basic Endpoint class, we're going to extend a different class that is specifically for provider endpoints named ProviderEndpoint. Notice the diagram above showing the class hierarchy of Endpoint. The ProviderEndpoint supplies some additional conveniences for provider components and will make the job of implementing MyEndpoint as a provider much easier. So change the definition of MyEndpoint from this:

...