BookViewer.MarketDataHandlerImpl (3.14.0 310 API)
Date: 2018-05-30

com.marketfactory.sample

## Class BookViewer.MarketDataHandlerImpl

- java.lang.Object
- - com.marketfactory.api.AbstractMFHandler
  - - com.marketfactory.sample.BookViewer.MarketDataHandlerImpl

- All Implemented Interfaces:
    MFHandler
  Enclosing class:
    BookViewer

      public static class BookViewer.MarketDataHandlerImpl
      extends AbstractMFHandler

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearConsole()`
    `void` | `onBatchComplete(int batchDefID, MFClient client)` Batch Complete Event: Called on completed batches.
    `void` | `onConnect(MFClient client)` Called right after a reconnection attempt succeeds.
    `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` | `onDropCopy(DropCopy dropCopy, MFClient client)` Drop Copy Trading Event: Callback that gets invoked on DropCopy events.
    `void` | `onEventReport(EventReport eventReport, MFClient client)` Report Event: Called on new event report.
    `void` | `onMarketData(MarketView marketView, MFClient client)` Market Data Event: Called on new market-data updates.
    `void` | `onOrderCanceled(OrderCanceled orderCanceled, MFClient client)` Trading Event: Callback that gets invoked when an Order is successfully canceled.
    `void` | `onOrderCancelRejected(OrderCancelRejected orderCancelRejected, MFClient client)` Trading Event: Callback that gets invoked when an Order cancel is rejected.
    `void` | `onOrderDone(OrderDone orderDone, MFClient client)` Trading Event: Callback that gets invoked when an Order is finished
    `void` | `onOrderReceived(OrderReceived orderReceived, MFClient client)` Trading Event: Callback that gets invoked when an Order is received by the server.
    `void` | `onOrderRejected(OrderRejected orderRejected, MFClient client)` Trading Event: Callback that gets invoked when an Order is rejected.
    `void` | `onOrderSubmitted(OrderSubmitted orderSubmitted, MFClient client)` Trading Event: Callback that gets invoked when an Order is successfully submitted.
    `void` | `onStart(MFClient client)` Called right after we start dispatching events, once per call to client.run().
    `void` | `onStop(MFClient client)` Called right before we stop dispatching events and return from client.run().
    `void` | `onSubscriptionEvent(SubscriptionEvent subscriptionEvent, MFClient client)` Subscription Event: Called when the status of the subscription changes.
    `void` | `onTradeCapture(TradeCapture tradeCapture, MFClient client)` Trading Event: Callback that gets invoked on TradeCapture events
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.marketfactory.api.AbstractMFHandler

      `onDateRollover, onHeartbeat, onReplayDone`

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

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

- - ### Method Detail

    - #### onMarketData

          public void onMarketData(MarketView marketView,
                                   MFClient client)

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

    - #### onStart

          public void onStart(MFClient client)

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

    - #### onStop

          public void onStop(MFClient client)

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

    - #### onDisconnect

          public void onDisconnect(MFClient client)

      Description copied from class: `AbstractMFHandler`
      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`
      Overrides:
        `onDisconnect` in class `AbstractMFHandler`
      Parameters:
        `client` - -- the target client

    - #### onConnect

          public void onConnect(MFClient client)

      Description copied from class: `AbstractMFHandler`
      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`
      Overrides:
        `onConnect` in class `AbstractMFHandler`
      Parameters:
        `client` - -- the target client

    - #### onSubscriptionEvent

          public void onSubscriptionEvent(SubscriptionEvent subscriptionEvent,
                                          MFClient client)

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

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### clearConsole

          public void clearConsole()

    - #### onOrderSubmitted

          public void onOrderSubmitted(OrderSubmitted orderSubmitted,
                                       MFClient client)

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

    - #### onBatchComplete

          public void onBatchComplete(int batchDefID,
                                      MFClient client)

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

    - #### onEventReport

          public void onEventReport(EventReport eventReport,
                                    MFClient client)

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

    - #### onOrderReceived

          public void onOrderReceived(OrderReceived orderReceived,
                                      MFClient client)

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

    - #### onOrderRejected

          public void onOrderRejected(OrderRejected orderRejected,
                                      MFClient client)

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

    - #### onOrderCanceled

          public void onOrderCanceled(OrderCanceled orderCanceled,
                                      MFClient client)

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

    - #### onOrderCancelRejected

          public void onOrderCancelRejected(OrderCancelRejected orderCancelRejected,
                                            MFClient client)

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

    - #### onDropCopy

          public void onDropCopy(DropCopy dropCopy,
                                 MFClient client)

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

    - #### onTradeCapture

          public void onTradeCapture(TradeCapture tradeCapture,
                                     MFClient client)

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

    - #### onOrderDone

          public void onOrderDone(OrderDone orderDone,
                                  MFClient client)

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