Class FXResponder<T extends UserTrade>

java.lang.Object
com.caplin.motif.fx.trading.Responder<T>
com.caplin.motif.fx.trading.FXResponder<T>
Type Parameters:
T - extends UserTrade which contains the basic capabilities that allow it to create and send trade events.
Direct Known Subclasses:
BlockTradeClientCloseSentResponder, BlockTradeExecuteSentResponder, BlockTradeExpiredResponder, BlockTradeQuoteResponder, BlockTradeSubmittedResponder, BulkOrderActionProcessingResponder, BulkOrderActionSentResponder, ClientCloseSentResponder, OrderCancelingResponder, OrderCancelSentResponder, OrderChangeStateSentResponder, OrderChangingStateResponder, OrderPendingAcceptResponder, OrderQueuedResponder, OrderSubmittedResponder, PendingAllocationResponder, QueuedResponder, SavingResponder, SubmittedResponder

public class FXResponder<T extends UserTrade> extends Responder<T>

Base class for FX Related responders that wish to send error and reject events

  • Field Summary

    Fields inherited from class com.caplin.motif.fx.trading.Responder

    logger, trade
  • Constructor Summary

    Constructors
    Constructor
    Description
    FXResponder(T trade)
    Constructs an Responder that can send the Error and Reject events for FX related trade models.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sends a message to the frontend to denote that an error has occurred during the trade workflow.
    void
    Sends a message to the frontend to denote that the backend has rejected the trade sometime during the trade workflow

    Methods inherited from class com.caplin.motif.fx.trading.Responder

    equals, hashCode, respond, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FXResponder

      public FXResponder(T trade)
      Constructs an Responder that can send the Error and Reject events for FX related trade models.
      Parameters:
      trade - The trade this responder will send messages for
  • Method Details

    • sendError

      public void sendError(ErrorEvent<T> event) throws com.caplin.trading.TradeException
      Sends a message to the frontend to denote that an error has occurred during the trade workflow.
      Parameters:
      event - The error event to send.
      Throws:
      com.caplin.trading.TradeException - if there was a problem sending the event
    • sendReject

      public void sendReject(RejectEvent<T> event) throws com.caplin.trading.TradeException
      Sends a message to the frontend to denote that the backend has rejected the trade sometime during the trade workflow
      Parameters:
      event - The reject event to send.
      Throws:
      com.caplin.trading.TradeException - if there was a problem sending the event