List of Required Beans

Required Beans for Adapter Implementation

The adapter framework requires several mandatory beans. If any is missing, the
Spring context fails to start and the application exits.

Core Required Beans

  1. AuthenticationHandler — handles authentication of a client/account/channel.

  2. SubmitHandler — exactly one of the following implementations is
    required, depending on the submission mode:

    • RegularSubmitHandler
    • FamilyBasedSubmitHandler
    • PackagingBasedSubmitHandler
  3. ClientChannelDeletedEventHandler — triggered when a client removes the
    channel from PDX, or when the entire client is removed. This handler should
    result in deleting all of the client's data on the adapter side.

Optional Bean Override

Additional beans can be overridden to modify default behavior:

  • SubmitStatusAggregationStrategy — customize status-aggregation logic.

Minimal Implementation Example

Any bean you don't have real logic for yet can start as a no-op @Service, which
is enough to get the adapter running. For example, a minimal
ClientChannelDeletedEventHandler:

package sdk.getting.started.adapter.handlers;

import com.stibo.leap.adapter.api.handler.event.ClientChannelDeletedEventHandler;
import com.stibo.leap.adapter.api.handler.event.model.ClientChannelDeletedEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class FakeClientChannelDeletedEventHandler implements ClientChannelDeletedEventHandler {
    private static final Logger LOG = LoggerFactory.getLogger(FakeClientChannelDeletedEventHandler.class);

    @Override
    public void handle(ClientChannelDeletedEvent event) {
        LOG.info("Client channel deleted: {}", event);
        // No-op mock: in production, delete the client's data on the adapter side.
    }
}

If a required bean is missing, startup fails with an error such as:

Parameter N of constructor in ... required a bean of type
'com.stibo.leap.adapter.api.handler.event.ClientChannelDeletedEventHandler'
that could not be found.

Tip: If the application exits with no visible stack trace, make sure your
logback.xml defines a root logger so Spring Boot / SDK startup errors are
printed to the console.



Did this page help you?