Class Event

java.lang.Object
com.bloomberglp.blpapi.Event
All Implemented Interfaces:
Iterable<Message>

public abstract class Event extends Object implements Iterable<Message>
All data resulting from subscriptions or requests and administrative messages are delivered as Events

Event objects are created by the API and passed to the application either through a registered EventHandler or an EventQueue or returned from the AbstractSession.nextEvent() method. Event objects contain Message objects which can be accessed using a MessageIterator. The Event object is a handle to an event. The event is the basic unit of work provided to applications. Each Event object consists of an Event.EventType attribute and zero or more Message objects.

  • Constructor Details

    • Event

      public Event()
  • Method Details

    • eventType

      public abstract Event.EventType eventType()
      Return the type messages contained by this event
      Throws:
      IllegalStateException
    • isValid

      public abstract boolean isValid()
      Return true if this event is valid false otherwise
    • messageIterator

      public MessageIterator messageIterator()
      Return a new instance of a MessageIterator for iterating through all the messages in this Event
    • iterator

      public Iterator<Message> iterator()
      Return an iterator over the messages contained in this Event
      Specified by:
      iterator in interface Iterable<Message>