Object TbdexHttpClient

  • All Implemented Interfaces:

    
    public class TbdexHttpClient
    
                        

    A client of the tbDEX HTTP interface for communicating with a PFI.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<Offering> getOfferings(String pfiDid, GetOfferingsFilter filter) Fetches offerings from a PFI.
      final List<Balance> getBalances(String pfiDid, BearerDid requesterDid) Fetches balances from a PFI.
      final Unit createExchange(Rfq rfq) Send RFQ message to the PFI.
      final Unit createExchange(Rfq rfq, String replyTo) Send RFQ message and include a replyTo URL for the PFI to send a callback to.
      final Unit submitOrder(Order order) Send Order message to the PFI.
      final Unit submitClose(Close close) Send Close message to the PFI.
      final List<Message> getExchange(String pfiDid, BearerDid requesterDid, String exchangeId) Fetches a specific exchange identified by its ID from the PFI.
      final List<List<Message>> getExchanges(String pfiDid, BearerDid requesterDid, GetExchangesFilter filter) Fetches exchanges from the PFI based on the provided filters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getOfferings

         final List<Offering> getOfferings(String pfiDid, GetOfferingsFilter filter)

        Fetches offerings from a PFI.

        Parameters:
        pfiDid - The decentralized identifier of the PFI.
        filter - An optional filter to apply for fetching offerings.
        Returns:

        A list of Offering matching the request.

      • getBalances

         final List<Balance> getBalances(String pfiDid, BearerDid requesterDid)

        Fetches balances from a PFI.

        Parameters:
        pfiDid - The decentralized identifier of the PFI.
        requesterDid - The decentralized identifier of the entity requesting the balances.
        Returns:

        A list of Balance matching the request.

      • createExchange

         final Unit createExchange(Rfq rfq)

        Send RFQ message to the PFI.

        Parameters:
        rfq - The RFQ to send
      • createExchange

         final Unit createExchange(Rfq rfq, String replyTo)

        Send RFQ message and include a replyTo URL for the PFI to send a callback to.

        Parameters:
        rfq - The RFQ to send
        replyTo - The callback URL for PFI to send messages to.
      • submitOrder

         final Unit submitOrder(Order order)

        Send Order message to the PFI.

        Parameters:
        order - The Order to send
      • submitClose

         final Unit submitClose(Close close)

        Send Close message to the PFI.

        Parameters:
        close - The Close to send
      • getExchange

         final List<Message> getExchange(String pfiDid, BearerDid requesterDid, String exchangeId)

        Fetches a specific exchange identified by its ID from the PFI.

        Parameters:
        pfiDid - The decentralized identifier of the PFI.
        requesterDid - The decentralized identifier of the entity requesting the exchange.
        exchangeId - The unique identifier of the exchange to be fetched.
        Returns:

        An Exchange containing the requested exchange.

      • getExchanges

         final List<List<Message>> getExchanges(String pfiDid, BearerDid requesterDid, GetExchangesFilter filter)

        Fetches exchanges from the PFI based on the provided filters.

        Parameters:
        pfiDid - The decentralized identifier of the PFI.
        requesterDid - The decentralized identifier of the entity requesting the exchange.
        filter - An optional filter to apply for fetching exchanges.
        Returns:

        A list of matching Exchange.