Class Responder<T extends UserTrade>

java.lang.Object
com.caplin.motif.fx.trading.Responder<T>
Type Parameters:
T - The trade type this responder is for.
Direct Known Subclasses:
BaseErrorResponder, FXResponder

public class Responder<T extends UserTrade> extends Object

A Responder allows for messages to be sent to the frontend. Generally, you only deal with instances that extend this class that have been set up for a particular state, for example:

 espTrade.getSubmittedResponder().sendSubmitAck(new SubmitAckEvent())
 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.slf4j.Logger
     
    protected final T
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Responder(T trade)
    Constructs a responder for the specified trade object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    void
    Sends a response for the event represented by specified ResponderEvent
     

    Methods inherited from class java.lang.Object

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

    • logger

      protected final org.slf4j.Logger logger
    • trade

      protected final T extends UserTrade trade
  • Constructor Details

    • Responder

      protected Responder(T trade)
      Constructs a responder for the specified trade object.
      Parameters:
      trade - The trade object that this responder will send messages for.
  • Method Details

    • respond

      public void respond(ResponderEvent event) throws com.caplin.trading.TradeException
      Sends a response for the event represented by specified ResponderEvent
      Parameters:
      event - The event to send.
      Throws:
      com.caplin.trading.TradeException - If there was a problem sending the event.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object