Apama
10.15.1.2
|
AP_EventEncoder_Functions. More...
#include <EventCodec.h>
Public Attributes | |
AP_EventCodecError(* | sendNormalisedEvent )(struct AP_EventEncoder *encoder, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp) |
sendNormalisedEvent More... | |
AP_EventCodecError(* | flushUpstream )(struct AP_EventEncoder *encoder) |
flushUpstream More... | |
const AP_char8 *(* | getLastError )(struct AP_EventEncoder *encoder) |
getLastError More... | |
void(* | addEventTransport )(struct AP_EventEncoder *encoder, const AP_char8 *name, struct AP_EventTransport *transport) |
addEventTransport More... | |
void(* | removeEventTransport )(struct AP_EventEncoder *encoder, const AP_char8 *name) |
removeEventTransport More... | |
Table of client visible functions exported by the encoder part of a codec library instance. These functions declare the only operations that may be performed by users of an encoder.
Note that all of these functions take an initial AP_EventEncoder* argument; this is analogous to the (hidden) 'this' pointer passed to a C++ object when a member function is invoked on it.
void(* AP_EventEncoder_Functions::addEventTransport) (struct AP_EventEncoder *encoder, const AP_char8 *name, struct AP_EventTransport *transport) |
addEventTransport
Add a named event transport to the set of transports known to the encoder.
If the named transport already exists, it should be replaced.
encoder | The event encoder instance |
name | The name of the transport to be added. |
transport | The transport object itself |
AP_EventCodecError(* AP_EventEncoder_Functions::flushUpstream) (struct AP_EventEncoder *encoder) |
flushUpstream
Flush any pending normalised events into the attached event transport. If event processing in the encoder is synchronous (as it usually will be) this function need not do anything except return AP_EventCodec_OK.
encoder | The event encoder instance |
const AP_char8*(* AP_EventEncoder_Functions::getLastError) (struct AP_EventEncoder *encoder) |
getLastError
Return the encoder's stored error message, if any. The message string is owned by the encoder so should not be modified or freed by the caller.
encoder | The event encoder instance |
void(* AP_EventEncoder_Functions::removeEventTransport) (struct AP_EventEncoder *encoder, const AP_char8 *name) |
removeEventTransport
Remove a named event transport from the set of transports known to the encoder.
If the named transport does not exist, the function should do nothing.
encoder | The event encoder instance |
name | The name of the transport to be removed |
AP_EventCodecError(* AP_EventEncoder_Functions::sendNormalisedEvent) (struct AP_EventEncoder *encoder, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp) |
sendNormalisedEvent
Called by the Semantic Mapper to encode an event and send it on to the event transport.
encoder | The event encoder instance |
event | The event to be encoded. Ownership is transferred to the callee. |
timeStamp | Timestamps associated with this event. Ownership is transferred to the callee. |