Interface ArTrustedContractNegotiationService

  • All Known Implementing Classes:
    HttpJsonTrustedContractNegotiationService

    public interface ArTrustedContractNegotiationService
    A service useful for making contract offers, as well as accepting or rejecting received contract offers.

    The services that may be consumed via this interface must be trusted not to alter the messages sent to them.

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default se.arkalix.util.concurrent.Future<?> accept​(long negotiationId)
      Accepts contract offer identified by given session identifier.
      se.arkalix.util.concurrent.Future<?> accept​(se.arkalix.core.plugin.cp.TrustedContractAcceptanceDto acceptance)
      Accepts contract offer identified by given acceptance.
      se.arkalix.util.concurrent.Future<?> counterOffer​(se.arkalix.core.plugin.cp.TrustedContractCounterOfferDto counterOffer)
      se.arkalix.util.concurrent.Future<java.lang.Long> offer​(se.arkalix.core.plugin.cp.TrustedContractOfferDto offer)
      Makes a new contract offer.
      default se.arkalix.util.concurrent.Future<?> reject​(long negotiationId)
      Rejects contract offer identified by given session identifier.
      se.arkalix.util.concurrent.Future<?> reject​(se.arkalix.core.plugin.cp.TrustedContractRejectionDto rejection)
      Rejects contract offer identified by given rejection.
    • Method Detail

      • accept

        se.arkalix.util.concurrent.Future<?> accept​(se.arkalix.core.plugin.cp.TrustedContractAcceptanceDto acceptance)
        Accepts contract offer identified by given acceptance.
        Parameters:
        acceptance - Identifies accepted session offer.
        Returns:
        Future completed successfully only if acceptance succeeds.
      • accept

        default se.arkalix.util.concurrent.Future<?> accept​(long negotiationId)
        Accepts contract offer identified by given session identifier.
        Parameters:
        negotiationId - Identifies negotiation session the accepted offer is part of.
        Returns:
        Future completed successfully only if acceptance succeeds.
      • offer

        se.arkalix.util.concurrent.Future<java.lang.Long> offer​(se.arkalix.core.plugin.cp.TrustedContractOfferDto offer)
        Makes a new contract offer.
        Parameters:
        offer - Offer details.
        Returns:
        Future completed with a negotiation session identifier only if the offer could be made.
      • counterOffer

        se.arkalix.util.concurrent.Future<?> counterOffer​(se.arkalix.core.plugin.cp.TrustedContractCounterOfferDto counterOffer)
        Parameters:
        counterOffer - Counter-offer details.
        Returns:
        Future completed with successfully only if the counter-offer could be made.
      • reject

        se.arkalix.util.concurrent.Future<?> reject​(se.arkalix.core.plugin.cp.TrustedContractRejectionDto rejection)
        Rejects contract offer identified by given rejection.
        Parameters:
        rejection - Identifies rejected session offer.
        Returns:
        Future completed successfully only if rejection succeeds.
      • reject

        default se.arkalix.util.concurrent.Future<?> reject​(long negotiationId)
        Rejects contract offer identified by given session identifier.
        Parameters:
        negotiationId - Identifies negotiation session the rejected offer is part of.
        Returns:
        Future completed successfully only if rejection succeeds.