Class UserStrategyDetailsListener
- java.lang.Object
-
- com.caplin.motif.fx.ret.orders.details.subscription.UserStrategyDetailsListener
-
- All Implemented Interfaces:
StrategyDetailsListener
public class UserStrategyDetailsListener extends java.lang.Object implements StrategyDetailsListener
Validates that the Strategy is in the list of valid clients. Sends anStrategyDetailsListener.onError(java.lang.String)
event if it is not and swallows all future updates.
-
-
Constructor Summary
Constructors Constructor Description UserStrategyDetailsListener(StrategyDetailsListener wrappedListener, OrderPermission permission, com.caplin.ret.trapi.concurrent.executor.SharedExecutorService<java.util.concurrent.ExecutorService> serialExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onError(java.lang.String error)
Signals an error on the subscription.void
onUpdate(com.caplin.motif.fx.trading.orders.details.Strategy strategy, com.caplin.ret.trapi.fx.order.strategy.StrategyTree strategyTree)
Sends a strategy update to the subscription.
-
-
-
Constructor Detail
-
UserStrategyDetailsListener
public UserStrategyDetailsListener(StrategyDetailsListener wrappedListener, OrderPermission permission, com.caplin.ret.trapi.concurrent.executor.SharedExecutorService<java.util.concurrent.ExecutorService> serialExecutor)
-
-
Method Detail
-
onError
public void onError(java.lang.String error)
Description copied from interface:StrategyDetailsListener
Signals an error on the subscription.
Errors do NOT signal that the subscription has ended. Subscribers should still remove their listeners.- Specified by:
onError
in interfaceStrategyDetailsListener
- Parameters:
error
- The reason for the error.
-
onUpdate
public void onUpdate(com.caplin.motif.fx.trading.orders.details.Strategy strategy, com.caplin.ret.trapi.fx.order.strategy.StrategyTree strategyTree)
Description copied from interface:StrategyDetailsListener
Sends a strategy update to the subscription.- Specified by:
onUpdate
in interfaceStrategyDetailsListener
- Parameters:
strategy
- The updatedStrategy
.strategyTree
- The latestStrategyTree
that was used to produce theStrategy
.
-
-