Class BinaryOrderPublisher

java.lang.Object
com.quantfinlib.sbe.BinaryOrderPublisher
All Implemented Interfaces:
OrderListener, AutoCloseable

public final class BinaryOrderPublisher extends Object implements OrderListener, AutoCloseable
Binary order-entry adapter: attach to HftOrderGateway as its OrderListener and every accepted order is encoded as an OrderFlyweight and written to the venue channel — the binary counterpart of fix.FixSession#sendNewOrderSingle, with zero allocation and zero string formatting per order.

Runs on the gateway's single venue thread, so writes need no lock; the reusable direct buffer is written fully (looping short writes) before the next order is encoded.

  • Constructor Details

  • Method Details

    • onOrder

      public void onOrder(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos)
      Specified by:
      onOrder in interface OrderListener
    • ordersSent

      public long ordersSent()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException