class_docstr: A real-time BarFeed that builds bars from live trades.
  
  :param maxLen: The maximum number of values that the :class:`pyalgotrade.dataseries.bards.BarDataSeries` will hold.
      Once a bounded length is full, when new items are added, a corresponding number of items are discarded
      from the opposite end. If None then dataseries.DEFAULT_MAX_LEN is used.
  :type maxLen: int.
  
  .. note::
      Note that a Bar will be created for every trade, so open, high, low and close values will all be the same.
class_docstr_tok: ["A","real-time","BarFeed","that","builds","bars","from","live","trades",".",":","param","maxLen",":","The","maximum","number","of","values","that","the",":","class",":","`","pyalgotrade.dataseries.bards.BarDataSeries","`","will","hold",".","Once","a","bounded","length","is","full",",","when","new","items","are","added",",","a","corresponding","number","of","items","are","discarded","from","the","opposite","end",".","If","None","then","dataseries.DEFAULT_MAX_LEN","is","used",".",":","type","maxLen",":","int",".","..","note",":",":","Note","that","a","Bar","will","be","created","for","every","trade",",","so","open",",","high",",","low","and","close","values","will","all","be","the","same","."]
code: def __dispatchImpl(self, eventFilter):
      ret = False
      try:
          eventType, eventData = self.__thread.getQueue().get(
              True, LiveTradeFeed.QUEUE_TIMEOUT
          )
          if eventFilter is not None and eventType not in eventFilter:
              return False
  
          ret = True
          if eventType == wsclient.WebSocketClient.Event.TRADE:
              self.__onTrade(eventData)
          elif (
              eventType
              == wsclient.WebSocketClient.Event.ORDER_BOOK_UPDATE
          ):
              self.__orderBookUpdateEvent.emit(eventData)
          elif eventType == wsclient.WebSocketClient.Event.CONNECTED:
              self.__onConnected()
          elif eventType == wsclient.WebSocketClient.Event.DISCONNECTED:
              self.__onDisconnected()
          else:
              ret = False
              common.logger.error(
                  "Invalid event received to dispatch: %s - %s"
                  % (eventType, eventData)
              )
      except queue.Empty:
          pass
      return ret
  
imports: import datetime
  import time
  from six.moves import queue
  from pyalgotrade import bar
  from pyalgotrade import barfeed
  from pyalgotrade import observer
  from pyalgotrade.bitstamp import common
  from pyalgotrade.bitstamp import wsclient
label_desc: Use image node_id 8 for calling the LiveTradeFeed obj's underlying member method code with example usage: obj.__dispatchImpl(eventFilter) and returns: ret, False