Class ContractOfferHandler

  • All Implemented Interfaces:
    Handler

    public class ContractOfferHandler
    extends java.lang.Object
    implements Handler
    This class handles and processes incoming IDS ContractOfferMessages.
    • Constructor Summary

      Constructors 
      Constructor Description
      ContractOfferHandler​(@NotNull org.eclipse.dataspaceconnector.spi.monitor.Monitor monitor, @NotNull java.lang.String connectorId, @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager providerNegotiationManager, @NotNull org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager consumerNegotiationManager, @NotNull IdsResponseMessageFactory responseMessageFactory)  
    • Constructor Detail

      • ContractOfferHandler

        public ContractOfferHandler​(@NotNull
                                    @NotNull org.eclipse.dataspaceconnector.spi.monitor.Monitor monitor,
                                    @NotNull
                                    @NotNull java.lang.String connectorId,
                                    @NotNull
                                    @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                    @NotNull
                                    @NotNull org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager providerNegotiationManager,
                                    @NotNull
                                    @NotNull org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager consumerNegotiationManager,
                                    @NotNull
                                    @NotNull IdsResponseMessageFactory responseMessageFactory)
    • Method Detail

      • canHandle

        public boolean canHandle​(@NotNull
                                 @NotNull MultipartRequest multipartRequest)
        Description copied from interface: Handler
        Examines whether the current handler instance is applicable handling a certain MultipartRequest.
        Specified by:
        canHandle in interface Handler
        Parameters:
        multipartRequest - from another connector
        Returns:
        true if the handler can handle the request
      • handleRequest

        @Nullable
        public @Nullable MultipartResponse handleRequest​(@NotNull
                                                         @NotNull MultipartRequest multipartRequest,
                                                         @NotNull
                                                         @NotNull org.eclipse.dataspaceconnector.spi.iam.ClaimToken claimToken)
        Description copied from interface: Handler
        Handles the given MultipartRequest.
        Specified by:
        handleRequest in interface Handler
        Parameters:
        multipartRequest - from another connector
        Returns:
        MultipartResponse or null, if the request cannot be handled (e.g. when content missing)