Package com.caplin.motif.fx.trading
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 java.lang.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())
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
void
respond(ResponderEvent event)
Sends a response for the event represented by specified ResponderEventjava.lang.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-