SubTool (3.14.0 310 API)
Date: 2018-05-30

com.marketfactory.sample

## Class SubTool

- java.lang.Object
- - com.marketfactory.sample.SubTool

- All Implemented Interfaces:
    MFAdminHandler, MFHandler, MFMarketMakerHandler, java.lang.Runnable

      public class SubTool
      extends java.lang.Object
      implements java.lang.Runnable, MFHandler, MFAdminHandler, MFMarketMakerHandler

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `_defaultTradeAction`
    `boolean` | `_displayQuoteRequests`
    `java.util.Map<java.lang.Integer,java.lang.Double>` | `_marketRates`
    `int` | `_newTradeCount`
    `java.util.Map<java.lang.Integer,NewOrder>` | `_newTrades`
    `int` | `_quoteID`
    `java.util.Map<java.lang.String,java.lang.String>` | `_quoteIDMap`
    `java.util.Map<java.lang.String,QuoteRequest>` | `_quoteRequests`
    `java.util.Map<java.lang.String,QuoteRequest>` | `_quoteSymbolMap`
    `long` | `_settlDate`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `APIResult` | `close()`
    `APIResult` | `exit()`
    `static void` | `main(java.lang.String[] args)`
    `void` | `onBatchComplete(int batchDefID, MFAdmin admin)`
    `void` | `onBatchComplete(int batchDefID, MFClient client)` Batch Complete Event: Called on completed batches.
    `void` | `onConnect(MFAdmin admin)`
    `void` | `onConnect(MFClient client)` Called right after a reconnection attempt succeeds.
    `void` | `onConnect(MFMarketMaker maker)`
    `void` | `onDateRollover(DateRollover dateRollover, MFAdmin admin)`
    `void` | `onDateRollover(DateRollover dateRollover, MFClient client)` Date Rollover Event: Called on new date rollover upate.
    `void` | `onDisconnect(MFAdmin admin)`
    `void` | `onDisconnect(MFClient client)` Called when connection is broken unexpectedly; this signals that the dispatcher is about to attempt to reconnect and if necessary fail over to the secondary server, if one has been provided.
    `void` | `onDisconnect(MFMarketMaker maker)`
    `void` | `onDropCopy(DropCopy dropCopy, MFAdmin admin)`
    `void` | `onDropCopy(DropCopy dropCopy, MFClient client)` Trading Event: Callback that gets invoked on DropCopy events
    `void` | `onDropCopy(DropCopy dropCopy, MFMarketMaker maker)`
    `void` | `onEventReport(EventReport eventReport, MFAdmin admin)`
    `void` | `onEventReport(EventReport eventReport, MFClient client)` Report Event: Called on new event report.
    `void` | `onEventReport(EventReport eventReport, MFMarketMaker maker)`
    `void` | `onHeartbeat(Heartbeat heartbeat, MFAdmin admin)`
    `void` | `onHeartbeat(Heartbeat heartbeat, MFClient client)` Called with fast heartbeats containing feed status information.
    `void` | `onHeartbeat(Heartbeat heartbeat, MFMarketMaker maker)`
    `void` | `onLockResponse(LockResponse lockResponse, MFAdmin admin)`
    `void` | `onLockResponse(LockResponse lockResponse, MFClient client)`
    `void` | `onMarketData(MarketView marketView, MFAdmin admin)`
    `void` | `onMarketData(MarketView marketView, MFClient client)` Market Data Event: Called on new market-data updates.
    `void` | `onMassQuoteAck(MassQuoteAck msg, MFMarketMaker maker)`
    `void` | `onNewOrder(NewOrder msg, MFMarketMaker maker)`
    `void` | `onOrderCanceled(OrderCanceled orderCanceled, MFAdmin admin)`
    `void` | `onOrderCanceled(OrderCanceled orderCanceled, MFClient client)` Trading Event: Callback that gets invoked when an Order is successfully canceled.
    `void` | `onOrderCancelRejected(OrderCancelRejected orderCancelRejected, MFAdmin admin)`
    `void` | `onOrderCancelRejected(OrderCancelRejected orderCancelRejected, MFClient client)` Trading Event: Callback that gets invoked when an Order cancel is rejected.
    `void` | `onOrderDone(OrderDone orderDone, MFAdmin admin)`
    `void` | `onOrderDone(OrderDone orderDone, MFClient client)` Trading Event: Callback that gets invoked when an Order is finished
    `void` | `onOrderReceived(OrderReceived orderReceived, MFAdmin admin)`
    `void` | `onOrderReceived(OrderReceived orderReceived, MFClient client)` Trading Event: Callback that gets invoked when an Order is received by the server.
    `void` | `onOrderRejected(OrderRejected orderRejected, MFAdmin admin)`
    `void` | `onOrderRejected(OrderRejected orderRejected, MFClient client)` Trading Event: Callback that gets invoked when an Order is rejected.
    `void` | `onOrderSubmitted(OrderSubmitted orderSubmitted, MFAdmin admin)`
    `void` | `onOrderSubmitted(OrderSubmitted orderSubmitted, MFClient client)` Trading Event: Callback that gets invoked when an Order is successfully submitted.
    `void` | `onOrderTimeout(OrderTimeout msg, MFMarketMaker maker)`
    `void` | `onQuoteRequest(QuoteRequest msg, MFMarketMaker maker)`
    `void` | `onReplayDone(ReplayDone replayDone, MFAdmin admin)`
    `void` | `onReplayDone(ReplayDone replayDone, MFClient client)` Replay Event: Callback that gets invoked after replay request has been fully processed.
    `void` | `onReplayDone(ReplayDone replayDone, MFMarketMaker maker)`
    `void` | `onRiskResponse(RiskResponse riskResponse, MFAdmin admin)`
    `void` | `onRiskResponse(RiskResponse riskResponse, MFClient client)`
    `void` | `onStart(MFAdmin admin)`
    `void` | `onStart(MFClient client)` Called right after we start dispatching events, once per call to client.run().
    `void` | `onStart(MFMarketMaker maker)`
    `void` | `onStop(MFAdmin admin)`
    `void` | `onStop(MFClient client)` Called right before we stop dispatching events and return from client.run().
    `void` | `onStop(MFMarketMaker maker)`
    `void` | `onSubscriptionEvent(SubscriptionEvent subscriptionEvent, MFAdmin admin)`
    `void` | `onSubscriptionEvent(SubscriptionEvent subscriptionEvent, MFClient client)` Subscription Event: Called when the status of the subscription changes.
    `void` | `onSubscriptionEvent(SubscriptionEvent subscriptionEvent, MFMarketMaker maker)`
    `void` | `onTradeCapture(TradeCapture tradeCapture, MFAdmin admin)`
    `void` | `onTradeCapture(TradeCapture tradeCapture, MFClient client)` Trading Event: Callback that gets invoked on TradeCapture events
    `void` | `onTradeCaptureAck(TradeCaptureAck msg, MFMarketMaker maker)`
    `void` | `run()`
    `void` | `start()`
    `APIResult` | `stop()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _newTrades

          public java.util.Map<java.lang.Integer,NewOrder> _newTrades

    - #### _quoteRequests

          public java.util.Map<java.lang.String,QuoteRequest> _quoteRequests

    - #### _marketRates

          public java.util.Map<java.lang.Integer,java.lang.Double> _marketRates

    - #### _quoteIDMap

          public java.util.Map<java.lang.String,java.lang.String> _quoteIDMap

    - #### _quoteSymbolMap

          public java.util.Map<java.lang.String,QuoteRequest> _quoteSymbolMap

    - #### _displayQuoteRequests

          public boolean _displayQuoteRequests

    - #### _defaultTradeAction

          public java.lang.String _defaultTradeAction

    - #### _settlDate

          public long _settlDate

    - #### _newTradeCount

          public int _newTradeCount

    - #### _quoteID

          public int _quoteID

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### close

          public APIResult close()

    - #### stop

          public APIResult stop()

    - #### exit

          public APIResult exit()

    - #### start

          public void start()

    - #### onStart

          public void onStart(MFClient client)

      Description copied from interface: `MFHandler`
      Called right after we start dispatching events, once per call to client.run().
      Specified by:
        `onStart` in interface `MFHandler`
      Parameters:
        `client` - -- the target client

    - #### onStop

          public void onStop(MFClient client)

      Description copied from interface: `MFHandler`
      Called right before we stop dispatching events and return from client.run().
      Specified by:
        `onStop` in interface `MFHandler`
      Parameters:
        `client` - -- the target client

    - #### onDisconnect

          public void onDisconnect(MFClient client)

      Description copied from interface: `MFHandler`
      Called when connection is broken unexpectedly; this signals that the dispatcher is about to attempt to reconnect and if necessary fail over to the secondary server, if one has been provided.
      Specified by:
        `onDisconnect` in interface `MFHandler`
      Parameters:
        `client` - -- the target client

    - #### onConnect

          public void onConnect(MFClient client)

      Description copied from interface: `MFHandler`
      Called right after a reconnection attempt succeeds. If reconnection failed, the run() dispatcher will return with an error code. (Note: this is only used for failover. During connect()/close() there is no active dispatcher, so there is no handler, so no corresponding callback either.)
      Specified by:
        `onConnect` in interface `MFHandler`
      Parameters:
        `client` - -- the target client

    - #### onHeartbeat

          public void onHeartbeat(Heartbeat heartbeat,
                                  MFClient client)

      Description copied from interface: `MFHandler`
      Called with fast heartbeats containing feed status information.
      Specified by:
        `onHeartbeat` in interface `MFHandler`
      Parameters:
        `heartbeat` - -- the event parameter
        `client` - -- the target client

    - #### onSubscriptionEvent

          public void onSubscriptionEvent(SubscriptionEvent subscriptionEvent,
                                          MFClient client)

      Description copied from interface: `MFHandler`
      Subscription Event: Called when the status of the subscription changes.
      Specified by:
        `onSubscriptionEvent` in interface `MFHandler`
      Parameters:
        `subscriptionEvent` - -- the event parameter
        `client` - -- the target client

    - #### onMarketData

          public void onMarketData(MarketView marketView,
                                   MFClient client)

      Description copied from interface: `MFHandler`
      Market Data Event: Called on new market-data updates.
      Specified by:
        `onMarketData` in interface `MFHandler`
      Parameters:
        `marketView` - -- the event parameter
        `client` - -- the target client

    - #### onBatchComplete

          public void onBatchComplete(int batchDefID,
                                      MFClient client)

      Description copied from interface: `MFHandler`
      Batch Complete Event: Called on completed batches.
      Specified by:
        `onBatchComplete` in interface `MFHandler`
      Parameters:
        `batchDefID` - -- the batch that is complete
        `client` - -- the target client

    - #### onEventReport

          public void onEventReport(EventReport eventReport,
                                    MFClient client)

      Description copied from interface: `MFHandler`
      Report Event: Called on new event report.
      Specified by:
        `onEventReport` in interface `MFHandler`
      Parameters:
        `eventReport` - -- the event parameter
        `client` - -- the target client

    - #### onOrderReceived

          public void onOrderReceived(OrderReceived orderReceived,
                                      MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order is received by the server.
      Specified by:
        `onOrderReceived` in interface `MFHandler`
      Parameters:
        `orderReceived` - -- the results
        `client` - -- the target client

    - #### onOrderRejected

          public void onOrderRejected(OrderRejected orderRejected,
                                      MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order is rejected.
      Specified by:
        `onOrderRejected` in interface `MFHandler`
      Parameters:
        `orderRejected` - -- the results
        `client` - -- the target client

    - #### onOrderSubmitted

          public void onOrderSubmitted(OrderSubmitted orderSubmitted,
                                       MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order is successfully submitted.
      Specified by:
        `onOrderSubmitted` in interface `MFHandler`
      Parameters:
        `orderSubmitted` - -- the results
        `client` - -- the target client

    - #### onOrderCanceled

          public void onOrderCanceled(OrderCanceled orderCanceled,
                                      MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order is successfully canceled.
      Specified by:
        `onOrderCanceled` in interface `MFHandler`
      Parameters:
        `orderCanceled` - -- the results
        `client` - -- the target client

    - #### onOrderCancelRejected

          public void onOrderCancelRejected(OrderCancelRejected orderCancelRejected,
                                            MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order cancel is rejected.
      Specified by:
        `onOrderCancelRejected` in interface `MFHandler`
      Parameters:
        `orderCancelRejected` - -- the results
        `client` - -- the target client

    - #### onTradeCapture

          public void onTradeCapture(TradeCapture tradeCapture,
                                     MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked on TradeCapture events
      Specified by:
        `onTradeCapture` in interface `MFHandler`
      Parameters:
        `tradeCapture` - -- the results
        `client` - -- the target client

    - #### onOrderDone

          public void onOrderDone(OrderDone orderDone,
                                  MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked when an Order is finished
      Specified by:
        `onOrderDone` in interface `MFHandler`
      Parameters:
        `orderDone` - -- the results
        `client` - -- the target client

    - #### onDropCopy

          public void onDropCopy(DropCopy dropCopy,
                                 MFClient client)

      Description copied from interface: `MFHandler`
      Trading Event: Callback that gets invoked on DropCopy events
      Specified by:
        `onDropCopy` in interface `MFHandler`
      Parameters:
        `dropCopy` - -- the results
        `client` - -- the target client

    - #### onLockResponse

          public void onLockResponse(LockResponse lockResponse,
                                     MFClient client)

    - #### onReplayDone

          public void onReplayDone(ReplayDone replayDone,
                                   MFClient client)

      Description copied from interface: `MFHandler`
      Replay Event: Callback that gets invoked after replay request has been fully processed.
      Specified by:
        `onReplayDone` in interface `MFHandler`
      Parameters:
        `replayDone` - -- the results
        `client` - -- the target client

    - #### onDateRollover

          public void onDateRollover(DateRollover dateRollover,
                                     MFClient client)

      Description copied from interface: `MFHandler`
      Date Rollover Event: Called on new date rollover upate.
      Specified by:
        `onDateRollover` in interface `MFHandler`
      Parameters:
        `dateRollover` - -- the event parameter
        `client` - -- the target client

    - #### onRiskResponse

          public void onRiskResponse(RiskResponse riskResponse,
                                     MFClient client)

    - #### onStart

          public void onStart(MFAdmin admin)

      Specified by:
        `onStart` in interface `MFAdminHandler`

    - #### onStop

          public void onStop(MFAdmin admin)

      Specified by:
        `onStop` in interface `MFAdminHandler`

    - #### onDisconnect

          public void onDisconnect(MFAdmin admin)

      Specified by:
        `onDisconnect` in interface `MFAdminHandler`

    - #### onConnect

          public void onConnect(MFAdmin admin)

      Specified by:
        `onConnect` in interface `MFAdminHandler`

    - #### onHeartbeat

          public void onHeartbeat(Heartbeat heartbeat,
                                  MFAdmin admin)

      Specified by:
        `onHeartbeat` in interface `MFAdminHandler`

    - #### onSubscriptionEvent

          public void onSubscriptionEvent(SubscriptionEvent subscriptionEvent,
                                          MFAdmin admin)

      Specified by:
        `onSubscriptionEvent` in interface `MFAdminHandler`

    - #### onMarketData

          public void onMarketData(MarketView marketView,
                                   MFAdmin admin)

      Specified by:
        `onMarketData` in interface `MFAdminHandler`

    - #### onBatchComplete

          public void onBatchComplete(int batchDefID,
                                      MFAdmin admin)

      Specified by:
        `onBatchComplete` in interface `MFAdminHandler`

    - #### onEventReport

          public void onEventReport(EventReport eventReport,
                                    MFAdmin admin)

      Specified by:
        `onEventReport` in interface `MFAdminHandler`

    - #### onOrderReceived

          public void onOrderReceived(OrderReceived orderReceived,
                                      MFAdmin admin)

    - #### onOrderRejected

          public void onOrderRejected(OrderRejected orderRejected,
                                      MFAdmin admin)

    - #### onOrderSubmitted

          public void onOrderSubmitted(OrderSubmitted orderSubmitted,
                                       MFAdmin admin)

    - #### onOrderCanceled

          public void onOrderCanceled(OrderCanceled orderCanceled,
                                      MFAdmin admin)

    - #### onOrderCancelRejected

          public void onOrderCancelRejected(OrderCancelRejected orderCancelRejected,
                                            MFAdmin admin)

    - #### onTradeCapture

          public void onTradeCapture(TradeCapture tradeCapture,
                                     MFAdmin admin)

    - #### onOrderDone

          public void onOrderDone(OrderDone orderDone,
                                  MFAdmin admin)

    - #### onDropCopy

          public void onDropCopy(DropCopy dropCopy,
                                 MFAdmin admin)

      Specified by:
        `onDropCopy` in interface `MFAdminHandler`

    - #### onLockResponse

          public void onLockResponse(LockResponse lockResponse,
                                     MFAdmin admin)

      Specified by:
        `onLockResponse` in interface `MFAdminHandler`

    - #### onReplayDone

          public void onReplayDone(ReplayDone replayDone,
                                   MFAdmin admin)

      Specified by:
        `onReplayDone` in interface `MFAdminHandler`

    - #### onDateRollover

          public void onDateRollover(DateRollover dateRollover,
                                     MFAdmin admin)

      Specified by:
        `onDateRollover` in interface `MFAdminHandler`

    - #### onRiskResponse

          public void onRiskResponse(RiskResponse riskResponse,
                                     MFAdmin admin)

      Specified by:
        `onRiskResponse` in interface `MFAdminHandler`

    - #### onStart

          public void onStart(MFMarketMaker maker)

      Specified by:
        `onStart` in interface `MFMarketMakerHandler`

    - #### onStop

          public void onStop(MFMarketMaker maker)

      Specified by:
        `onStop` in interface `MFMarketMakerHandler`

    - #### onDisconnect

          public void onDisconnect(MFMarketMaker maker)

      Specified by:
        `onDisconnect` in interface `MFMarketMakerHandler`

    - #### onConnect

          public void onConnect(MFMarketMaker maker)

      Specified by:
        `onConnect` in interface `MFMarketMakerHandler`

    - #### onHeartbeat

          public void onHeartbeat(Heartbeat heartbeat,
                                  MFMarketMaker maker)

      Specified by:
        `onHeartbeat` in interface `MFMarketMakerHandler`

    - #### onEventReport

          public void onEventReport(EventReport eventReport,
                                    MFMarketMaker maker)

      Specified by:
        `onEventReport` in interface `MFMarketMakerHandler`

    - #### onSubscriptionEvent

          public void onSubscriptionEvent(SubscriptionEvent subscriptionEvent,
                                          MFMarketMaker maker)

      Specified by:
        `onSubscriptionEvent` in interface `MFMarketMakerHandler`

    - #### onQuoteRequest

          public void onQuoteRequest(QuoteRequest msg,
                                     MFMarketMaker maker)

      Specified by:
        `onQuoteRequest` in interface `MFMarketMakerHandler`

    - #### onMassQuoteAck

          public void onMassQuoteAck(MassQuoteAck msg,
                                     MFMarketMaker maker)

      Specified by:
        `onMassQuoteAck` in interface `MFMarketMakerHandler`

    - #### onNewOrder

          public void onNewOrder(NewOrder msg,
                                 MFMarketMaker maker)

      Specified by:
        `onNewOrder` in interface `MFMarketMakerHandler`

    - #### onOrderTimeout

          public void onOrderTimeout(OrderTimeout msg,
                                     MFMarketMaker maker)

      Specified by:
        `onOrderTimeout` in interface `MFMarketMakerHandler`

    - #### onTradeCaptureAck

          public void onTradeCaptureAck(TradeCaptureAck msg,
                                        MFMarketMaker maker)

      Specified by:
        `onTradeCaptureAck` in interface `MFMarketMakerHandler`

    - #### onDropCopy

          public void onDropCopy(DropCopy dropCopy,
                                 MFMarketMaker maker)

      Specified by:
        `onDropCopy` in interface `MFMarketMakerHandler`

    - #### onReplayDone

          public void onReplayDone(ReplayDone replayDone,
                                   MFMarketMaker maker)

      Specified by:
        `onReplayDone` in interface `MFMarketMakerHandler`

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException,
                                  java.lang.InterruptedException

      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`