LibraryLink ToToggle FramesPrintFeedback

How to Implement a Component

This section gives a brief overview of the steps required to implement a FUSE Mediation Router custom component.

When implementing a component, it is almost always necessary to implement the following Java interfaces:

In addition, it is sometimes also necessary to implement the following Java interfaces:

In outline, you would typically implement a custom component as follows:

  1. Implement the Component interface—a component object acts as an endpoint factory. Derive from the DefaultComponent class and implement the createEndpoint() method.

    See Chapter 5.

  2. Implement the Endpoint interface—an endpoint represents a resource identified by a specific URI. The approach you take to implementing an endpoint depends on whether your consumers follow an event-driven pattern, a scheduled poll pattern, or a polling pattern.

    For an event-driven pattern, implement the endpoint by inheriting from DefaultEndpoint and implementing the following methods:

    • createProducer().

    • createConsumer().

    For a scheduled poll pattern, implement the endpoint by inheriting from ScheduledPollEndpoint and implementing the following methods:

    • createProducer().

    • createConsumer().

    For a polling pattern, implement the endpoint by inheriting from DefaultPollingEndpoint and implementing the following methods:

    • createProducer().

    • createPollConsumer().

    See Chapter 6.

  3. Implement the Consumer interface—there are several different approaches you can take to implementing a consumer, depending on whether you need to implement an event-driven pattern, a scheduled poll pattern, or a polling pattern. The consumer implementation is also crucially important for determining the threading model used for processing a message exchange.

    See Implementing the Consumer Interface.

  4. Implement the Producer interface—to implement a producer, derive from the DefaultProducer class and implement the process() method.

    See Chapter 8.

  5. (Optionally) Implement Exchange or Message interfaces—frequently, the default implementations of Exchange and Message can be used directly. Occasionally, you might find it necessary to customize these types.

    See Chapter 9 and Chapter 10.

You can install a custom component in one of the following ways: