Interface TicketProtocol


public interface TicketProtocol
The TicketProtocol interface defines the contract for sending various types of ticket-related requests asynchronously. Implementations of this interface should provide the necessary logic to send the requests and handle the responses.
  • Method Details

    • sendTicket

      Sends a ticket request synchronously and returns the corresponding response.
      Parameters:
      request - the ticket request to be sent
      Returns:
      the ticket response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendTicketInform

      Sends a ticket inform request synchronously and returns the corresponding response.
      Parameters:
      request - the ticket inform request to be sent
      Returns:
      the ticket inform response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendTicketAck

      Sends a ticket acknowledgment request synchronously and returns the corresponding response.
      Parameters:
      request - the ticket acknowledgment request to be sent
      Returns:
      the ticket acknowledgment response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendCancel

      Sends a cancel request synchronously and returns the corresponding response.
      Parameters:
      request - the cancel request to be sent
      Returns:
      the cancel response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendCancelAck

      Sends a cancel acknowledgment request synchronously and returns the corresponding response.
      Parameters:
      request - the cancel acknowledgment request to be sent
      Returns:
      the cancel acknowledgment response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendCashout

      Sends a cashout request synchronously and returns the corresponding response.
      Parameters:
      request - the cashout request to be sent
      Returns:
      the cashout response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendCashoutAck

      Sends a cashout acknowledgment request synchronously and returns the corresponding response.
      Parameters:
      request - the cashout acknowledgment request to be sent
      Returns:
      the cashout acknowledgment response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendExtSettlement

      Sends an external settlement request synchronously and returns the corresponding response.
      Parameters:
      request - the external settlement request to be sent
      Returns:
      the external settlement response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendExtSettlementAck

      Sends an external settlement acknowledgment request synchronously and returns the corresponding response.
      Parameters:
      request - the external settlement acknowledgment request to be sent
      Returns:
      the external settlement acknowledgment response received
      Throws:
      ExecutionException - if the execution of the request encounters an exception wrapping the cause exception
      InterruptedException - if the execution of the request is interrupted
    • sendTicketAsync

      CompletableFuture<TicketResponse> sendTicketAsync(TicketRequest request)
      Sends a ticket request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the ticket request to be sent
      Returns:
      a CompletableFuture representing the ticket response
    • sendTicketInformAsync

      Sends a ticket inform request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the ticket inform request to be sent
      Returns:
      a CompletableFuture representing the ticket inform response
    • sendTicketAckAsync

      Sends a ticket acknowledgment request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the ticket acknowledgment request to be sent
      Returns:
      a CompletableFuture representing the ticket acknowledgment response
    • sendCancelAsync

      CompletableFuture<CancelResponse> sendCancelAsync(CancelRequest request)
      Sends a cancel request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the cancel request to be sent
      Returns:
      a CompletableFuture representing the cancel response
    • sendCancelAckAsync

      Sends a cancel acknowledgment request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the cancel acknowledgment request to be sent
      Returns:
      a CompletableFuture representing the cancel acknowledgment response
    • sendCashoutAsync

      CompletableFuture<CashoutResponse> sendCashoutAsync(CashoutRequest request)
      Sends a cashout request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the cashout request to be sent
      Returns:
      a CompletableFuture representing the cashout response
    • sendCashoutAckAsync

      Sends a cashout acknowledgment request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the cashout acknowledgment request to be sent
      Returns:
      a CompletableFuture representing the cashout acknowledgment response
    • sendExtSettlementAsync

      Sends an external settlement request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the external settlement request to be sent
      Returns:
      a CompletableFuture representing the external settlement response
    • sendExtSettlementAckAsync

      Sends an external settlement acknowledgment request asynchronously and returns a CompletableFuture representing the response.
      Parameters:
      request - the external settlement acknowledgment request to be sent
      Returns:
      a CompletableFuture representing the external settlement acknowledgment response