Package com.sportradar.mbs.sdk.protocol
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 Summary
Modifier and TypeMethodDescriptiondefault CancelResponse
sendCancel
(CancelRequest request) Sends a cancel request synchronously and returns the corresponding response.default CancelAckResponse
sendCancelAck
(CancelAckRequest request) Sends a cancel acknowledgment request synchronously and returns the corresponding response.sendCancelAckAsync
(CancelAckRequest request) Sends a cancel acknowledgment request asynchronously and returns a CompletableFuture representing the response.sendCancelAsync
(CancelRequest request) Sends a cancel request asynchronously and returns a CompletableFuture representing the response.default CashoutResponse
sendCashout
(CashoutRequest request) Sends a cashout request synchronously and returns the corresponding response.default CashoutAckResponse
sendCashoutAck
(CashoutAckRequest request) Sends a cashout acknowledgment request synchronously and returns the corresponding response.sendCashoutAckAsync
(CashoutAckRequest request) Sends a cashout acknowledgment request asynchronously and returns a CompletableFuture representing the response.sendCashoutAsync
(CashoutRequest request) Sends a cashout request asynchronously and returns a CompletableFuture representing the response.default ExtSettlementResponse
sendExtSettlement
(ExtSettlementRequest request) Sends an external settlement request synchronously and returns the corresponding response.default ExtSettlementAckResponse
Sends an external settlement acknowledgment request synchronously and returns the corresponding response.Sends an external settlement acknowledgment request asynchronously and returns a CompletableFuture representing the response.Sends an external settlement request asynchronously and returns a CompletableFuture representing the response.default TicketResponse
sendTicket
(TicketRequest request) Sends a ticket request synchronously and returns the corresponding response.default TicketAckResponse
sendTicketAck
(TicketAckRequest request) Sends a ticket acknowledgment request synchronously and returns the corresponding response.sendTicketAckAsync
(TicketAckRequest request) Sends a ticket acknowledgment request asynchronously and returns a CompletableFuture representing the response.sendTicketAsync
(TicketRequest request) Sends a ticket request asynchronously and returns a CompletableFuture representing the response.default TicketInformResponse
sendTicketInform
(TicketInformRequest request) Sends a ticket inform request synchronously and returns the corresponding response.sendTicketInformAsync
(TicketInformRequest request) Sends a ticket inform request asynchronously and returns a CompletableFuture representing the response.
-
Method Details
-
sendTicket
default TicketResponse sendTicket(TicketRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendTicketInform
default TicketInformResponse sendTicketInform(TicketInformRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendTicketAck
default TicketAckResponse sendTicketAck(TicketAckRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendCancel
default CancelResponse sendCancel(CancelRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendCancelAck
default CancelAckResponse sendCancelAck(CancelAckRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendCashout
default CashoutResponse sendCashout(CashoutRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendCashoutAck
default CashoutAckResponse sendCashoutAck(CashoutAckRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendExtSettlement
default ExtSettlementResponse sendExtSettlement(ExtSettlementRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendExtSettlementAck
default ExtSettlementAckResponse sendExtSettlementAck(ExtSettlementAckRequest request) throws ExecutionException, InterruptedException 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 exceptionInterruptedException
- if the execution of the request is interrupted
-
sendTicketAsync
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
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
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
CompletableFuture<ExtSettlementAckResponse> sendExtSettlementAckAsync(ExtSettlementAckRequest request) 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
-