Name | |
---|---|
struct | mamaPublishTopic_ |
struct | mamaDQPublisherManagerCallbacks_ |
Name | |
---|---|
typedef struct mamaPublishTopic_ | mamaPublishTopic |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager) | mamaDQPublisherCreateCB |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager, const char *symbol, short subType, short msgType, mamaMsg msg) | mamaDQPublisherNewRequestCB |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager, mamaPublishTopic *info, short subType, short msgType, mamaMsg msg) | mamaDQPublisherRequestCB |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager, mamaPublishTopic *info, short subType, short msgType, mamaMsg msg) | mamaDQPublisherRefreshCB |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager, mama_status status, const char *errortxt, mamaMsg msg) | mamaDQPublisherErrorCB |
typedef void(MAMACALLTYPE *)(mamaDQPublisherManager manager, mamaMsg msg) | mamaDQPublisherMsgCB |
typedef struct mamaDQPublisherManagerCallbacks_ | mamaDQPublisherManagerCallbacks |
Name | |
---|---|
MAMAExpDLL mama_status | mamaDQPublisherManager_allocate(mamaDQPublisherManager * result) |
MAMAExpDLL mama_status | mamaDQPublisherManager_create(mamaDQPublisherManager dqPublisher, mamaTransport transport, mamaQueue queue, const mamaDQPublisherManagerCallbacks * callback, const char * sourcename, const char * root, void * closure) |
MAMAExpDLL void | mamaDQPublisherManager_destroy(mamaDQPublisherManager manager) |
MAMAExpDLL mama_status | mamaDQPublisherManager_addPublisher(mamaDQPublisherManager manager, const char * symbol, mamaDQPublisher pub, void * cache) |
MAMAExpDLL mama_status | mamaDQPublisherManager_removePublisher(mamaDQPublisherManager manager, const char * symbol, mamaDQPublisher * pub) |
MAMAExpDLL mama_status | mamaDQPublisherManager_createPublisher(mamaDQPublisherManager manager, const char * symbol, void * cache, mamaDQPublisher * newPublisher) |
MAMAExpDLL mama_status | mamaDQPublisherManager_destroyPublisher(mamaDQPublisherManager manager, const char * symbol) |
MAMAExpDLL void | mamaDQPublisherManager_setStatus(mamaDQPublisherManager manager, mamaMsgStatus status) |
MAMAExpDLL void * | mamaDQPublisherManager_getClosure(mamaDQPublisherManager manager) |
MAMAExpDLL void | mamaDQPublisherManager_setSenderId(mamaDQPublisherManager manager, uint64_t senderid) |
MAMAExpDLL void | mamaDQPublisherManager_setSeqNum(mamaDQPublisherManager manager, mama_seqnum_t num) |
MAMAExpDLL mama_status | mamaDQPublisherManager_sendSyncRequest(mamaDQPublisherManager manager, mama_u16_t nummsg, mama_f64_t delay, mama_f64_t duration) |
MAMAExpDLL mama_status | mamaDQPublisherManager_sendNoSubscribers(mamaDQPublisherManager manager, const char * symbol) |
MAMAExpDLL mama_status | mamaDQPublisherManager_getPublisher(mamaDQPublisherManager manager, const char * symbol, mamaDQPublisher * pub) |
MAMAExpDLL void | mamaDQPublisherManager_enableSendTime(mamaDQPublisherManager manager, mama_bool_t enable) |
typedef struct mamaPublishTopic_ mamaPublishTopic;
typedef void(MAMACALLTYPE * mamaDQPublisherCreateCB) (mamaDQPublisherManager manager);
Callback method triggered when the DQ Publisher Manager is initially created and the subscription to the source root has been successfully created.
typedef void(MAMACALLTYPE * mamaDQPublisherNewRequestCB) (mamaDQPublisherManager manager, const char *symbol, short subType, short msgType, mamaMsg msg);
Parameters:
Callback method triggered when a subscription request is received for an instrument which does not currently have a publisher in the current manager.
typedef void(MAMACALLTYPE * mamaDQPublisherRequestCB) (mamaDQPublisherManager manager, mamaPublishTopic *info, short subType, short msgType, mamaMsg msg);
Parameters:
Callback method triggered when a subscription request is received for an instrument which already has a publisher in the current manager.
typedef void(MAMACALLTYPE * mamaDQPublisherRefreshCB) (mamaDQPublisherManager manager, mamaPublishTopic *info, short subType, short msgType, mamaMsg msg);
Parameters:
Callback method triggered when a subscription refresh request is received for an instrument. The DQ Publisher Manager handles sending the response, so this callback is purely informational.
typedef void(MAMACALLTYPE * mamaDQPublisherErrorCB) (mamaDQPublisherManager manager, mama_status status, const char *errortxt, mamaMsg msg);
Parameters:
Callback method triggered when a error is encountered processing a message by the DQ Publisher Manager.
typedef void(MAMACALLTYPE * mamaDQPublisherMsgCB) (mamaDQPublisherManager manager, mamaMsg msg);
Parameters:
Callback method triggered when a message is received by the DQ Publisher Manager which doesn’t contain the expected ‘MdSubscriptionType’ field.
Note: While such messages are unexpected, this feature may be used to implement publisher specific functionality, where such features are supported at the ‘source’ or ‘namespace’ level.
typedef struct mamaDQPublisherManagerCallbacks_ mamaDQPublisherManagerCallbacks;
Structure containing each of the DQ Publisher Manager callbacks.
MAMAExpDLL mama_status mamaDQPublisherManager_allocate(
mamaDQPublisherManager * result
)
Parameters:
Return: mama_status A status indicating the result of the allocation. May return:
Allocate memory for the DQ Publisher Manager, initialising the Sender ID (either pre-defined, or based on the IP and PID of the host and publisher) and Sequence Number.
MAMAExpDLL mama_status mamaDQPublisherManager_create(
mamaDQPublisherManager dqPublisher,
mamaTransport transport,
mamaQueue queue,
const mamaDQPublisherManagerCallbacks * callback,
const char * sourcename,
const char * root,
void * closure
)
Parameters:
Return: mama_status A status indicating the rest of the creation. May return:
Create the DQ Publisher Manager instance.
Creates a DQ Publisher Manager instance. Creates the publisher hashmap to store created publishers. Initialises the basic subscription which receives requests from subscribing applications for data. Also initialises the CM responder publisher to handle sync requests when required.
MAMAExpDLL void mamaDQPublisherManager_destroy(
mamaDQPublisherManager manager
)
Parameters:
Destroy the DQ Publisher Manager instance.
MAMAExpDLL mama_status mamaDQPublisherManager_addPublisher(
mamaDQPublisherManager manager,
const char * symbol,
mamaDQPublisher pub,
void * cache
)
Parameters:
Return: mama_status A status indicating the success of the addition. May return:
Add an already created MAMA Publisher to the given DQ Publisher Manager.
MAMAExpDLL mama_status mamaDQPublisherManager_removePublisher(
mamaDQPublisherManager manager,
const char * symbol,
mamaDQPublisher * pub
)
Parameters:
Return: mama_status Status indicating the successful removal of the publisher. May return:
Remove the publisher specified by the ‘symbol’ paramater from the current manager, but return a pointer to that publisher in the ‘pub’ parameter.
MAMAExpDLL mama_status mamaDQPublisherManager_createPublisher(
mamaDQPublisherManager manager,
const char * symbol,
void * cache,
mamaDQPublisher * newPublisher
)
Parameters:
Return: mama_status Status indicating the successful removal of the publisher. May return:
Create a new publisher for the given symbol, attaching a ‘cache’ to the publisher and returning it in the ‘newPublisher’ parameter.
MAMAExpDLL mama_status mamaDQPublisherManager_destroyPublisher(
mamaDQPublisherManager manager,
const char * symbol
)
Parameters:
Return: mama_status Status indicating the successful removal of the publisher. May return:
Destroy the publisher associated with the given symbol in the specified publisher manager. Calls mamaPublisher_destroy on the object, and frees the memory associated with it.
MAMAExpDLL void mamaDQPublisherManager_setStatus(
mamaDQPublisherManager manager,
mamaMsgStatus status
)
Parameters:
Set the MAMA message status to be associated with newly created publishers. Must be set before creation of the publisher to take effect.
MAMAExpDLL void * mamaDQPublisherManager_getClosure(
mamaDQPublisherManager manager
)
Parameters:
Return: void* The closure returned from the manager.
Return the closure object associated with the DQ Publisher Manager.
MAMAExpDLL void mamaDQPublisherManager_setSenderId(
mamaDQPublisherManager manager,
uint64_t senderid
)
Parameters:
Set the sender ID used in creation of new publishers. Must be set before the creation of the publisher to take effect.
MAMAExpDLL void mamaDQPublisherManager_setSeqNum(
mamaDQPublisherManager manager,
mama_seqnum_t num
)
Parameters:
Set the sequence number used when creating new publishers. Must be set before creation of the publisher to take effect.
MAMAExpDLL mama_status mamaDQPublisherManager_sendSyncRequest(
mamaDQPublisherManager manager,
mama_u16_t nummsg,
mama_f64_t delay,
mama_f64_t duration
)
Parameters:
Return: mama_status Status indicating the successful removal of the publisher. May return:
Send a ‘sync request’ message to subscribing applications.
Sync requests are a mechanism by which a newly started MAMA publisher can request that client applications inform the publisher of the instruments to which they are subscribed. Required CM responder to be enabled in the clients.
MAMAExpDLL mama_status mamaDQPublisherManager_sendNoSubscribers(
mamaDQPublisherManager manager,
const char * symbol
)
Parameters:
Return: mama_status Status indicating the successful sending of the message (unused)
Send a ‘no subscribers’ message.
MAMAExpDLL mama_status mamaDQPublisherManager_getPublisher(
mamaDQPublisherManager manager,
const char * symbol,
mamaDQPublisher * pub
)
Parameters:
Return: mama_status Status indicating the successful removal of the publisher. May return:
Return the publisher specified by the ‘symbol’ paramater from the current manager.
MAMAExpDLL void mamaDQPublisherManager_enableSendTime(
mamaDQPublisherManager manager,
mama_bool_t enable
)
Parameters:
Enable or disable the publishing of ‘send times’ by publishers created by the manager. Must be set before creation of the publisher to take effect.
/* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef MAMA_DQPUBLISHERMANAGER_H__
#define MAMA_DQPUBLISHERMANAGER_H__
#include "mama/types.h"
#include "wombat/wConfig.h"
#if defined(__cplusplus)
extern "C" {
#endif /* defined( __cplusplus ) */
typedef struct mamaPublishTopic_ {
const char * symbol;
mamaDQPublisher pub;
void * cache;
} mamaPublishTopic;
typedef void(MAMACALLTYPE *mamaDQPublisherCreateCB) (
mamaDQPublisherManager manager);
typedef void(MAMACALLTYPE *mamaDQPublisherNewRequestCB) (
mamaDQPublisherManager manager,
const char * symbol,
short subType,
short msgType,
mamaMsg msg);
typedef void(MAMACALLTYPE *mamaDQPublisherRequestCB) (
mamaDQPublisherManager manager,
mamaPublishTopic * info,
short subType,
short msgType,
mamaMsg msg);
typedef void(MAMACALLTYPE *mamaDQPublisherRefreshCB) (
mamaDQPublisherManager manager,
mamaPublishTopic * info,
short subType,
short msgType,
mamaMsg msg);
typedef void(MAMACALLTYPE *mamaDQPublisherErrorCB) (
mamaDQPublisherManager manager,
mama_status status,
const char * errortxt,
mamaMsg msg);
typedef void(MAMACALLTYPE *mamaDQPublisherMsgCB) (
mamaDQPublisherManager manager, mamaMsg msg);
typedef struct mamaDQPublisherManagerCallbacks_ {
mamaDQPublisherCreateCB onCreate;
mamaDQPublisherNewRequestCB onNewRequest;
mamaDQPublisherRequestCB onRequest;
mamaDQPublisherRefreshCB onRefresh;
mamaDQPublisherErrorCB onError;
mamaDQPublisherMsgCB onMsg;
} mamaDQPublisherManagerCallbacks;
MAMAExpDLL extern mama_status
mamaDQPublisherManager_allocate (mamaDQPublisherManager *result);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_create (mamaDQPublisherManager dqPublisher,
mamaTransport transport,
mamaQueue queue,
const mamaDQPublisherManagerCallbacks *callback,
const char *sourcename,
const char *root,
void * closure);
MAMAExpDLL extern void
mamaDQPublisherManager_destroy (mamaDQPublisherManager manager);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_addPublisher (mamaDQPublisherManager manager,
const char * symbol,
mamaDQPublisher pub,
void * cache);
MAMAExpDLL extern mama_status mamaDQPublisherManager_removePublisher (
mamaDQPublisherManager manager, const char *symbol, mamaDQPublisher *pub);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_createPublisher (mamaDQPublisherManager manager,
const char * symbol,
void * cache,
mamaDQPublisher * newPublisher);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_destroyPublisher (mamaDQPublisherManager manager,
const char * symbol);
MAMAExpDLL extern void
mamaDQPublisherManager_setStatus (mamaDQPublisherManager manager,
mamaMsgStatus status);
MAMAExpDLL extern void *
mamaDQPublisherManager_getClosure (mamaDQPublisherManager manager);
MAMAExpDLL extern void
mamaDQPublisherManager_setSenderId (mamaDQPublisherManager manager,
uint64_t senderid);
MAMAExpDLL extern void
mamaDQPublisherManager_setSeqNum (mamaDQPublisherManager manager,
mama_seqnum_t num);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_sendSyncRequest (mamaDQPublisherManager manager,
mama_u16_t nummsg,
mama_f64_t delay,
mama_f64_t duration);
MAMAExpDLL extern mama_status
mamaDQPublisherManager_sendNoSubscribers (mamaDQPublisherManager manager,
const char * symbol);
MAMAExpDLL extern mama_status mamaDQPublisherManager_getPublisher (
mamaDQPublisherManager manager, const char *symbol, mamaDQPublisher *pub);
MAMAExpDLL extern void
mamaDQPublisherManager_enableSendTime (mamaDQPublisherManager manager,
mama_bool_t enable);
#if defined(__cplusplus)
}
#endif /* defined( __cplusplus ) */
#endif /* MAMA_DQPUBLISHERMANAGER_H__*/
Updated on 2023-03-31 at 15:29:16 +0100