...
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 contains a conditional block for handling either a consuemr or a provider role. 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 MyEndpoint
.
Instead of extending having MyEndpoint
extend the very basic Endpoint
class, we're going to extend a different class that is specifically for providers provider endpoints named ProviderEndpoint
. This class provides Notice the diagram above showing the class hierarchy of Endpoint
. The ProviderEndpoint
supplies some additional conveniences for providers provider components and will make the job of implementing MyEndpoint
as a provider much easier. So change the definition of MyEndpoint
from this:
Code Block |
---|
public class MyEndpoint extends Endpoint implements ExchangeProcessor
|
to this:
Code Block |
---|
public class MyEndpoint extends ProviderEndpoint implements ExchangeProcessor
|
...
Creating the Maven Subprojects For the Service Unit and Service Assembly
...