EventFormatter Class |
Namespace: Bloomberglp.Blpapi
The EventFormatter type exposes the following members.
Name | Description | |
---|---|---|
EventFormatter |
Creates an instance of
EventFormatter to create messages in the specified event.
The behavior is undefined if the specified event already has
another EventFormatter attached.
|
Name | Description | |
---|---|---|
AppendElement |
Append an empty complex element of the appropriate type to the
element which represents an array of 'Element' type.
| |
AppendMessage(String, Topic) | Obsolete.
Appends a (empty) message of the specified 'messageType' that will
be published under the specified 'topic' to the event referenced
by this EventFormatter. After a
message has been appended its elements can be set using the various
'SetElement' methods.
Deprecated, use AppendMessage(Name, Topic) instead.
| |
AppendMessage(Name, Topic) |
Appends a (empty) message of the specified 'messageType' that will
be published under the specified 'topic' to the event referenced by
this EventFormatter. After a
message has been appended its elements can be set using the various
'SetElement' methods.
| |
AppendMessage(String, Topic, NullableInt32) | Obsolete.
Appends a (empty) message of the specified 'messageType' that will
be published under the specified 'topic' with the specified
'sequenceNumber' to the event referenced by
this EventFormatter. After a
message has been appended its elements can be set using the various
'SetElement' methods. The behavior is undefined unless the
'sequenceNumber' is greater (unless the value wrapped) than the
last value used in any previous message on this 'topic'.
Deprecated, use AppendMessage(Name, Topic, NullableInt32) instead.
| |
AppendMessage(Name, Topic, NullableInt32) |
Appends a (empty) message of the specified 'messageType' that will
be published under the specified 'topic' with the specified
'sequenceNumber' to the event referenced by
this EventFormatter. After a
message has been appended its elements can be set using the various
'SetElement' methods. The behavior is undefined unless the
'sequenceNumber' is greater (unless the value wrapped) than the
last value used in any previous message on this 'topic'.
| |
AppendRecapMessage(Topic, CorrelationID) |
Appends a (empty) recap message that will be published under the
specified 'topic' to the event referenced by this
EventFormatter. Specifies
the optional 'cid' if this recap message is added in response to a
'TopicRecap' message. After a message has been appended its
elements can be set using the various 'SetElement' methods. It is
an error to create append a recap message to an admin event.
| |
AppendRecapMessage(Topic, NullableInt32, CorrelationID) |
Appends a (empty) recap message that will be published under the
specified 'topic' to the event referenced by this
EventFormatter. Specifies
the optional 'cid' if this recap message is added in response to a
'TopicRecap' message. After a message has been appended its
elements can be set using the various 'SetElement' methods. It is
an error to create append a recap message to an admin event. The
behavior is undefined unless the 'sequenceNumber' is greater
(unless the value wrapped) than the last value used in any previous
message on this 'topic'.
| |
AppendResponse(String) | Obsolete.
Append an (empty) response message that will be sent
in response to the previously received operation request.
After a message for this operation has been appended, its elements can be set using the various SetElement methods. Only one response can be appended to an Event. The behavior is undefined unless the Event is currently empty. Note that using Name overloads is preferable, as the Name objects have better performance if they are re-used after being created. Deprecated, use AppendResponse(Name) instead. | |
AppendResponse(Name) |
Append an (empty) response message that will be sent
in response to the previously received operation request.
After a message for this operation has been appended, its elements can be set using the various SetElement methods. Only one response can be appended to an Event. The behavior is undefined unless the Event is currently empty. | |
AppendValue(Boolean) |
Appends the specified 'value' to the element which represents an
array of 'bool'.
| |
AppendValue(Char) |
Appends the specified 'value' to the element which represents an
array of 'char'
| |
AppendValue(Double) |
Appends the specified 'value' to the element which represents an
array of 'double'.
| |
AppendValue(Int32) |
Appends the specified 'value' to the element which represents an
array of 'int'.
| |
AppendValue(Int64) |
Appends the specified 'value' to the element which represents an
array of 'long'
| |
AppendValue(Single) |
Appends the specified 'value' to the element which represents an
array of 'float'.
| |
AppendValue(String) |
Appends the specified 'value' to the element which represents an
array of 'String'
| |
AppendValue(Datetime) |
Appends the specified 'value' to the element which represents an
array of 'Datetime'.
| |
AppendValue(Name) |
Appends the specified 'value' to the element which represents an
array of 'Name'.
| |
PopElement |
Returns this formatter's context back to the location where it was
before the most recent call to 'PushElement' or 'AppendElement()'.
| |
PushElement(String) | Obsolete.
Changes the level at which this formatter is operating to the
specified element 'name'. After this returns the context of this
formatter is set to the element 'name' in the schema and subsequent
calls to 'SetElement' or 'PushElement' are applied at that level.
If 'name' represents an array of scalars then 'AppendValue' must be
used to add values. If 'name' represents an array of complex types
then 'AppendElement()' creates the first entry and set the context
of the formatter to that element. Calling 'AppendElement()' again
will create another entry.
Deprecated, use PushElement(Name) instead.
| |
PushElement(Name) |
Changes the level at which this formatter is operating to the
specified element 'name'. After this returns the context of this
formatter is set to the element 'name' in the schema and subsequent
calls to 'SetElement' or 'PushElement' are applied at that level.
If 'name' represents an array of scalars then 'AppendValue' must be
used to add values. If 'name' represents an array of complex types
then 'AppendElement()' creates the first entry and set the context
of the formatter to that element. Calling 'AppendElement()' again
will create another entry.
| |
SetElement(String, Datetime) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(String) instead.
Deprecated, use SetElement(Name, Datetime) instead.
| |
SetElement(String, Name) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(String) instead.
Deprecated, use SetElement(Name, Name) instead.
| |
SetElement(String, Boolean) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Boolean) instead.
| |
SetElement(String, Char) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Char) instead.
| |
SetElement(String, Double) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Double) instead.
| |
SetElement(String, Int32) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Int32) instead.
| |
SetElement(String, Int64) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Int64) instead.
| |
SetElement(String, Single) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'.
Deprecated, use SetElement(Name, Single) instead.
| |
SetElement(String, String) | Obsolete.
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(String) instead.
Deprecated, use SetElement(Name, String) instead.
| |
SetElement(Name, Datetime) |
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(String) instead.
| |
SetElement(Name, Name) |
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(Name) instead.
| |
SetElement(Name, Boolean) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, Byte) |
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(Name) instead.
| |
SetElement(Name, Char) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, Double) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, Int32) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, Int64) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, Single) |
Sets the element with the specified 'name' within the current
element to the specified 'value'.
| |
SetElement(Name, String) |
Sets the element with the specified 'name' within the current
element to the specified 'value'. The behavior of this function is
undefined if 'value' is 'null'. Note that this function is not
intended for publication of null values; uses
SetElementNull(Name) instead.
| |
SetElementNull(String) | Obsolete.
Creates a null element with the specified 'name'. Note that
whether or not fields containing null values are published to
subscribers is dependent upon details of the service and schema
configuration.
[Obsolete("Deprecated, use SetElementNull(Name) instead.")]
| |
SetElementNull(Name) |
Creates a null element with the specified 'name'. Note that whether
or not fields containing null values are published to subscribers
is dependent upon details of the service and schema configuration.
|
An EventFormatter is created either from an Event obtained from Service.CreatePublishEvent() or from Service.CreateResponseEvent(). Once one or more Messages have been appended to the Event using the EventFormatter the Event can be published using ProviderSession.Publish(Event)} or sent back as a response using ProviderSession.SendResponse(Event).
EventFormatter objects cannot be copied or assigned so as to ensure there is no ambiguity about what happens if two EventFormatters are both formatting the same Event.
The EventFormatter supports write once only to each field. It is an error to call SetElement() or PushElement() for the same name more than once at a particular level of the schema when creating a message.