Class BaseErrorResponder<T extends UserTrade>

java.lang.Object
com.caplin.motif.fx.trading.Responder<T>
com.caplin.motif.fx.trading.orders.edit.responder.BaseErrorResponder<T>
Type Parameters:
T - extends UserTrade
Direct Known Subclasses:
ClientCloseSentResponder, EditableResponder, EditOpenSentResponder, EditPendingResponder

public class BaseErrorResponder<T extends UserTrade> extends Responder<T>
The base responder for the EditStrategy responders. This allows responders to send the error event.
  • Constructor Details

    • BaseErrorResponder

      public BaseErrorResponder(T trade)
      The edit orders use a separate base responder from the rest of the responders as not all states can go to rejected. But most do go to error.
      Parameters:
      trade - The underlying trade
  • Method Details

    • sendError

      public void sendError(ErrorEvent<T> event) throws com.caplin.trading.TradeException

      Sends an ErrorEvent containing an error message and error code

      Parameters:
      event - The ErrorEvent containing the error message and error code
      Throws:
      com.caplin.trading.TradeException - If there was a problem sending the event