OpenMAMA
publisher.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MAMA_PUBLISHER_H__
23 #define MAMA_PUBLISHER_H__
24 
25 #if defined( __cplusplus )
26 extern "C"
27 {
28 #endif /* defined( __cplusplus ) */
29 
52 typedef void (MAMACALLTYPE *mamaThrottledSendCompleteCb) (
53  mamaPublisher publisher,
54  mamaMsg msg,
55  mama_status status,
56  void* closure);
57 
58 
71 MAMAExpDLL
72 extern mama_status
74  mamaTransport tport,
75  const char* symbol,
76  const char* source,
77  const char* root);
78 
85 MAMAExpDLL
86 extern mama_status
88  mamaMsg msg);
89 
102 MAMAExpDLL
103 extern mama_status
105  mamaMsg msg,
106  mamaThrottledSendCompleteCb sendCompleteCb,
107  void* closure);
108 
109 
110 /*
111  * Send a p2p message from the specified inbox using the throttle.
112  * The lifecycle of the message sent is controlled by the user of the API. The
113  * callback indicates when the API is no longer using the message and can be
114  * destroyed/reused by the application.
115  *
116  * @param publisher The mamaPublisher from which to send the message.
117  * @param inbox The mamaInbox which will process any response to the sent message.
118  * @param msg The mamaMsg to send.
119  * @param sendCompleteCb The callback which will be invoked when the message
120  * is sent from the throttle queue.
121  * @param closure User supplied data returned when the callback is invoked.
122  */
123 MAMAExpDLL
124 extern mama_status
126  mamaInbox inbox,
127  mamaMsg msg,
128  mamaThrottledSendCompleteCb sendCompleteCb,
129  void* closure);
130 
131 /*
132  * Send a p2p message from the specified inbox.
133  *
134  * @param publisher The mamaPublisher from which to send the message
135  * @param inbox The mamaInbox which will process any response to the sent
136  * message.
137  * @param msg The mamaMsg to send.
138  */
139 MAMAExpDLL
140 extern mama_status
142  mamaInbox inbox,
143  mamaMsg msg);
144 
154 MAMAExpDLL
155 extern mama_status
157  mamaMsgReply replyAddress,
158  mamaMsg reply);
159 
160 
169 MAMAExpDLL
170 extern mama_status
172  mamaMsg request,
173  mamaMsg reply);
174 
180 MAMAExpDLL
181 extern mama_status
183 
184 #if defined( __cplusplus )
185 }
186 #endif /* defined( __cplusplus ) */
187 
188 #endif /* MAMA_PUBLISHER_H_*/
mamaPublisher_sendFromInbox
MAMAExpDLL mama_status mamaPublisher_sendFromInbox(mamaPublisher publisher, mamaInbox inbox, mamaMsg msg)
mama_status
mama_status
Definition: status.h:37
mamaInbox
struct mamaInboxImpl_ * mamaInbox
Definition: types.h:106
mamaPublisher_send
MAMAExpDLL mama_status mamaPublisher_send(mamaPublisher publisher, mamaMsg msg)
Send a message from the specified publisher.
mamaPublisher_sendWithThrottle
MAMAExpDLL mama_status mamaPublisher_sendWithThrottle(mamaPublisher publisher, mamaMsg msg, mamaThrottledSendCompleteCb sendCompleteCb, void *closure)
Send a message with the throttle.
mamaPublisher_create
MAMAExpDLL mama_status mamaPublisher_create(mamaPublisher *result, mamaTransport tport, const char *symbol, const char *source, const char *root)
Create a mama publisher for the corresponding transport.
mamaPublisher_sendFromInboxWithThrottle
MAMAExpDLL mama_status mamaPublisher_sendFromInboxWithThrottle(mamaPublisher publisher, mamaInbox inbox, mamaMsg msg, mamaThrottledSendCompleteCb sendCompleteCb, void *closure)
mamaPublisher_destroy
MAMAExpDLL mama_status mamaPublisher_destroy(mamaPublisher publisher)
Destroy the publisher.
mamaTransport
struct mamaTransportImpl_ * mamaTransport
Definition: types.h:98
mamaThrottledSendCompleteCb
void(MAMACALLTYPE * mamaThrottledSendCompleteCb)(mamaPublisher publisher, mamaMsg msg, mama_status status, void *closure)
Responsible for publishing mama messages.
Definition: publisher.h:52
mamaMsg
struct mamaMsgImpl_ * mamaMsg
Opaque definitions for all major MAMA data types.
Definition: types.h:95
mamaMsgReply
struct mamaMsgReplyImpl_ * mamaMsgReply
Definition: types.h:127
mamaPublisher_sendReplyToInboxHandle
MAMAExpDLL mama_status mamaPublisher_sendReplyToInboxHandle(mamaPublisher publisher, mamaMsgReply replyAddress, mamaMsg reply)
Send a reply in response to a request to an inbox.
mamaPublisher_sendReplyToInbox
MAMAExpDLL mama_status mamaPublisher_sendReplyToInbox(mamaPublisher publisher, mamaMsg request, mamaMsg reply)
Send a reply in response to a request to an inbox.
mamaPublisher
struct mamaPublisherImpl_ * mamaPublisher
Definition: types.h:103


© 2012 Linux Foundation