com.bloomberglp.blpapi
Class Event

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

public abstract class Event
extends java.lang.Object
implements java.lang.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.

Author:
Siva Somu (ssomu)

Nested Class Summary
static class Event.EventType
          Enumeration of the type of events that can be delivered from Bloomberg services
 
Constructor Summary
Event()
           
 
Method Summary
abstract  Event.EventType eventType()
          Return the type messages contained by this event
abstract  boolean isValid()
          Return true if this event is valid false otherwise
 java.util.Iterator<Message> iterator()
          Return an iterator over the messages contained in this Event
 MessageIterator messageIterator()
          Return a new instance of a MessageIterator for iterating through all the messages in this Event
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event()
Method Detail

eventType

public abstract Event.EventType eventType()
Return the type messages contained by this event

Throws:
java.lang.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 java.util.Iterator<Message> iterator()
Return an iterator over the messages contained in this Event

Specified by:
iterator in interface java.lang.Iterable<Message>


Copyright © 2015 Bloomberg L.P.. All Rights Reserved.