Apama  10.15.0.2
EventTransport.h
Go to the documentation of this file.
1 /*
2  * EventTransport.h
3  *
4  * External (client-visible) interface to Transport Integration Layer (TIL)
5  * plugin libraries within the Apama Integration Adapter Framework (IAF).
6  * This is the interface that must be implemented by all transport libraries
7  * in order to be successfully loaded and integrated by the IAF.
8  *
9  * $Copyright(c) 2002-2006, 2008, 2010 Progress Software Corporation (PSC). All rights reserved.$
10  * $Copyright (c) 2013-2014, 2016-2018, 2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.$
11  * Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG
12  *
13  */
14 
15 #ifndef AP_EVENT_TRANSPORT_H
16 #define AP_EVENT_TRANSPORT_H
17 
27 /*
28  * Define this here so EventCodec.h picks it up as well
29  */
30 typedef void* AP_TransportEvent;
31 
32 
33 #include <AP_Types.h>
34 #include <IAF_Platform.h>
35 #include <EventCodec.h>
36 #include <AP_TimestampSet.h>
37 #include <IAF_TimestampConfig.h>
38 
54 #define AP_EVENTTRANSPORT_VERSION 0x00040000
55 
56 
57 /*
58  * Names of functions exported from shared library. The IAF will search for
59  * these functions by name when the library is loaded, so you must use these
60  * *exact* names when implementing a transport library.
61  */
62 #define AP_EVENTTRANSPORT_INFO_FUNCTION_NAME AP_EventTransport_info
63 #define AP_EVENTTRANSPORT_CTOR_FUNCTION_NAME AP_EventTransport_ctor
64 #define AP_EVENTTRANSPORT_DTOR_FUNCTION_NAME AP_EventTransport_dtor
65 
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif /* __cplusplus */
70 
71 
72 /*
73  * Forward-declare some structures
74  */
75 struct AP_EventTransport;
76 struct AP_EventDecoder;
77 
78 
86 typedef enum {
100 
101 
108 typedef struct {
110  AP_char8* name;
112  AP_char8* value;
114 
115 
122 typedef struct {
124  AP_char8* name;
128 
129 
145 typedef struct {
150  AP_char8* status;
154  AP_uint64 totalReceived;
158  AP_uint64 totalSent;
173 
174 
175 
188 
210 
230  AP_EventTransportError (*sendTransportEvent)(struct AP_EventTransport* transport, AP_TransportEvent event, AP_TimestampSet* timeStamp);
231 
243  void (*addEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name, struct AP_EventDecoder* decoder);
244 
255  void (*removeEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name);
256 
271 
287 
325 
346 
357  const AP_char8* (*getLastError)(struct AP_EventTransport* transport);
358 
380  void (*getStatus)(struct AP_EventTransport* transport, AP_EventTransportStatus* status);
381 };
382 
383 
397 
401  void* reserved;
402 
408 };
409 typedef struct AP_EventTransport AP_EventTransport;
410 
411 
433 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportInfoPtr)(AP_uint32* version, AP_uint32* capabilities);
434 
435 
466 typedef AP_EVENTTRANSPORT_API AP_EventTransport* (AP_EVENTTRANSPORT_CALL* AP_EventTransportCtorPtr)(AP_char8* name, AP_EventTransportProperties* properties, AP_EventTransportError* err, AP_char8** errMsg, IAF_TimestampConfig* timestampConfig);
467 
481 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportDtorPtr)(AP_EventTransport* obj);
482 
483 
484 #ifdef __cplusplus
485 } /* extern "C" */
486 #endif /* __cplusplus */
487 
488 
489 #endif /* AP_EVENT_TRANSPORT_H */
AP_EventTransportError
AP_EventTransportError.
Definition: EventTransport.h:86
AP_EventTransportStatus.
Definition: EventTransport.h:145
AP_EventTransportError(* flushUpstream)(struct AP_EventTransport *transport)
flushUpstream
Definition: EventTransport.h:270
AP_char8 * name
Transport property value.
Definition: EventTransport.h:124
AP_uint64 totalReceived
Total number of downstream events received since IAF was run.
Definition: EventTransport.h:154
void(* getStatus)(struct AP_EventTransport *transport, AP_EventTransportStatus *status)
getStatus
Definition: EventTransport.h:380
Trouble reading/writing the external transport.
Definition: EventTransport.h:92
AP_EventTransportError(* sendTransportEvent)(struct AP_EventTransport *transport, AP_TransportEvent event, AP_TimestampSet *timeStamp)
sendTransportEvent
Definition: EventTransport.h:230
AP_NormalisedEvent * statusDictionary
Additional status information about this transport.
Definition: EventTransport.h:171
void * reserved
Pointer to private internal data.
Definition: EventTransport.h:401
AP_EventTransportProperty.
Definition: EventTransport.h:108
AP_EventTransport_Functions.
Definition: EventTransport.h:187
Trouble sending transport event to decoder.
Definition: EventTransport.h:94
Some unspecified internal error occurred.
Definition: EventTransport.h:90
AP_char8 * name
Transport property name.
Definition: EventTransport.h:110
AP_EventTransportError(* stop)(struct AP_EventTransport *transport)
stop
Definition: EventTransport.h:345
AP_EventTransportError(* flushDownstream)(struct AP_EventTransport *transport)
flushDownstream
Definition: EventTransport.h:286
AP_EventTransportError(* start)(struct AP_EventTransport *transport)
start
Definition: EventTransport.h:324
AP_EventDecoder.
Definition: EventCodec.h:440
IAF_TimestampConfig.
Definition: IAF_TimestampConfig.h:29
AP_NormalisedEvent.
Definition: NormalisedEvent.h:454
Hires Timestamps.
Everything is fine.
Definition: EventTransport.h:88
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportInfoPtr)(AP_uint32 *version, AP_uint32 *capabilities)
AP_EventTransportInfoPtr.
Definition: EventTransport.h:433
AP_uint64 totalSent
Total number of upstream events since the IAF was run.
Definition: EventTransport.h:158
AP_char8 * status
Free form text string containing a transport specific status message.
Definition: EventTransport.h:150
Hires Timestamps configuration support.
Transport could not start correctly.
Definition: EventTransport.h:98
struct AP_EventTransport_Functions * functions
Function table of transport library operations.
Definition: EventTransport.h:407
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportDtorPtr)(AP_EventTransport *obj)
AP_EventTransportDtorPtr.
Definition: EventTransport.h:481
void(* removeEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name)
removeEventDecoder
Definition: EventTransport.h:255
AP_EventTransport.
Definition: EventTransport.h:396
void(* addEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name, struct AP_EventDecoder *decoder)
addEventDecoder
Definition: EventTransport.h:243
AP_TimestampSet.
Definition: AP_TimestampSet.h:306
AP_EventTransportProperties.
Definition: EventTransport.h:122
AP_EVENTTRANSPORT_API AP_EventTransport *(AP_EVENTTRANSPORT_CALL * AP_EventTransportCtorPtr)(AP_char8 *name, AP_EventTransportProperties *properties, AP_EventTransportError *err, AP_char8 **errMsg, IAF_TimestampConfig *timestampConfig)
AP_EventTransportCtorPtr.
Definition: EventTransport.h:466
AP_EventTransportProperty ** properties
Array of transport properties.
Definition: EventTransport.h:126
Transport was passed an invalid property set.
Definition: EventTransport.h:96
AP_EventTransportError(* updateProperties)(struct AP_EventTransport *transport, AP_EventTransportProperties *properties, IAF_TimestampConfig *timestampConfig)
updateProperties
Definition: EventTransport.h:209
AP_char8 * value
Transport property value.
Definition: EventTransport.h:112
EventCodec.