Apama  10.3.1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 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  * $Revision: 340684 $
14  */
15 
16 #ifndef AP_EVENT_TRANSPORT_H
17 #define AP_EVENT_TRANSPORT_H
18 
28 /*
29  * Define this here so EventCodec.h picks it up as well
30  */
31 typedef void* AP_TransportEvent;
32 
33 
34 #include <AP_Types.h>
35 #include <IAF_Platform.h>
36 #include <EventCodec.h>
37 #include <AP_TimestampSet.h>
38 #include <IAF_TimestampConfig.h>
39 
55 #define AP_EVENTTRANSPORT_VERSION 0x00040000
56 
57 
58 /*
59  * Names of functions exported from shared library. The IAF will search for
60  * these functions by name when the library is loaded, so you must use these
61  * *exact* names when implementing a transport library.
62  */
63 #define AP_EVENTTRANSPORT_INFO_FUNCTION_NAME AP_EventTransport_info
64 #define AP_EVENTTRANSPORT_CTOR_FUNCTION_NAME AP_EventTransport_ctor
65 #define AP_EVENTTRANSPORT_DTOR_FUNCTION_NAME AP_EventTransport_dtor
66 
67 
68 #ifdef __cplusplus
69 extern "C" {
70 #endif /* __cplusplus */
71 
72 
73 /*
74  * Forward-declare some structures
75  */
76 struct AP_EventTransport;
77 struct AP_EventDecoder;
78 
79 
87 typedef enum {
101 
102 
109 typedef struct {
111  AP_char8* name;
113  AP_char8* value;
115 
116 
123 typedef struct {
125  AP_char8* name;
129 
130 
146 typedef struct {
151  AP_char8* status;
155  AP_uint64 totalReceived;
159  AP_uint64 totalSent;
174 
175 
176 
189 
211 
231  AP_EventTransportError (*sendTransportEvent)(struct AP_EventTransport* transport, AP_TransportEvent event, AP_TimestampSet* timeStamp);
232 
244  void (*addEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name, struct AP_EventDecoder* decoder);
245 
256  void (*removeEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name);
257 
272 
288 
326 
347 
358  const AP_char8* (*getLastError)(struct AP_EventTransport* transport);
359 
381  void (*getStatus)(struct AP_EventTransport* transport, AP_EventTransportStatus* status);
382 };
383 
384 
398 
402  void* reserved;
403 
409 };
410 typedef struct AP_EventTransport AP_EventTransport;
411 
412 
434 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportInfoPtr)(AP_uint32* version, AP_uint32* capabilities);
435 
436 
467 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);
468 
482 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportDtorPtr)(AP_EventTransport* obj);
483 
484 
485 #ifdef __cplusplus
486 } /* extern "C" */
487 #endif /* __cplusplus */
488 
489 
490 #endif /* AP_EVENT_TRANSPORT_H */
AP_EventTransportError
AP_EventTransportError.
Definition: EventTransport.h:87
void(* addEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name, struct AP_EventDecoder *decoder)
addEventDecoder
Definition: EventTransport.h:244
AP_EventTransportStatus.
Definition: EventTransport.h:146
AP_char8 * name
Transport property value.
Definition: EventTransport.h:125
AP_uint64 totalReceived
Total number of downstream events received since IAF was run.
Definition: EventTransport.h:155
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:467
Trouble reading/writing the external transport.
Definition: EventTransport.h:93
void(* removeEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name)
removeEventDecoder
Definition: EventTransport.h:256
AP_NormalisedEvent * statusDictionary
Additional status information about this transport.
Definition: EventTransport.h:172
AP_EventTransportError(* sendTransportEvent)(struct AP_EventTransport *transport, AP_TransportEvent event, AP_TimestampSet *timeStamp)
sendTransportEvent
Definition: EventTransport.h:231
void * reserved
Pointer to private internal data.
Definition: EventTransport.h:402
AP_EventTransportError(* flushUpstream)(struct AP_EventTransport *transport)
flushUpstream
Definition: EventTransport.h:271
AP_EventTransportProperty.
Definition: EventTransport.h:109
AP_EventTransport_Functions.
Definition: EventTransport.h:188
Trouble sending transport event to decoder.
Definition: EventTransport.h:95
Some unspecified internal error occurred.
Definition: EventTransport.h:91
AP_char8 * name
Transport property name.
Definition: EventTransport.h:111
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportInfoPtr)(AP_uint32 *version, AP_uint32 *capabilities)
AP_EventTransportInfoPtr.
Definition: EventTransport.h:434
AP_EventDecoder.
Definition: EventCodec.h:441
AP_EventTransportError(* start)(struct AP_EventTransport *transport)
start
Definition: EventTransport.h:325
AP_EventTransportError(* stop)(struct AP_EventTransport *transport)
stop
Definition: EventTransport.h:346
AP_EventTransportError(* updateProperties)(struct AP_EventTransport *transport, AP_EventTransportProperties *properties, IAF_TimestampConfig *timestampConfig)
updateProperties
Definition: EventTransport.h:210
IAF_TimestampConfig.
Definition: IAF_TimestampConfig.h:29
AP_NormalisedEvent.
Definition: NormalisedEvent.h:455
void(* getStatus)(struct AP_EventTransport *transport, AP_EventTransportStatus *status)
getStatus
Definition: EventTransport.h:381
Hires Timestamps.
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportDtorPtr)(AP_EventTransport *obj)
AP_EventTransportDtorPtr.
Definition: EventTransport.h:482
Everything is fine.
Definition: EventTransport.h:89
AP_uint64 totalSent
Total number of upstream events since the IAF was run.
Definition: EventTransport.h:159
AP_char8 * status
Free form text string containing a transport specific status message.
Definition: EventTransport.h:151
Hires Timestamps configuration support.
Transport could not start correctly.
Definition: EventTransport.h:99
struct AP_EventTransport_Functions * functions
Function table of transport library operations.
Definition: EventTransport.h:408
AP_EventTransport.
Definition: EventTransport.h:397
AP_TimestampSet.
Definition: AP_TimestampSet.h:307
AP_EventTransportProperties.
Definition: EventTransport.h:123
AP_EventTransportError(* flushDownstream)(struct AP_EventTransport *transport)
flushDownstream
Definition: EventTransport.h:287
AP_EventTransportProperty ** properties
Array of transport properties.
Definition: EventTransport.h:127
Transport was passed an invalid property set.
Definition: EventTransport.h:97
AP_char8 * value
Transport property value.
Definition: EventTransport.h:113
EventCodec.