Classes Files

Wombat::MamaPublisher

The MamaPublisher class publishes messages to basic or market data subscriptions depending on the underlying transport

Inherits from Wombat.MamaWrapper, IDisposable

Public Functions

  Name
  MamaPublisher()
M:Wombat.MamaWrapper.::ctor
void create(MamaTransport transport, string topic, string source, string root)
Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.
void createWithCallbacks(MamaTransport transport, MamaQueue queue, MamaPublisherCallback callback, Object closure, string topic, string source, string root)
Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.
void create(MamaTransport transport, string topic, string source)
Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.
void create(MamaTransport transport, string topic)
Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.
void send(MamaMsg message)
Send a message from the specified publisher.
void sendWithThrottle(MamaMsg message, MamaSendCompleteCallback callback, object closure)
Send a message with the throttle. The lifecycle of the message sent is controlled by the user of the API. The callback indicates when the API is no longer using the message and can be destroyed/reused by the application.
void sendFromInbox(MamaInbox inbox, MamaMsg message)
Send a p2p message from the specified inbox using the throttle.
void sendFromInboxWithThrottle(MamaInbox inbox, MamaMsg message, MamaSendCompleteCallback callback, object closure)
Send a p2p message from the specified inbox using the throttle. The lifecycle of the message sent is controlled by the user of the API. The callback indicates when the API is no longer using the message and can be destroyed/reused by the application.
void sendReplyToInbox(MamaMsg request, MamaMsg reply)
Send a reply in response to a request to an inbox.
void destroy()
Destroy the publisher. A synonym to the MamaWrapper.Dispose method.
MamaTransport getTransport()
Get the MamaTransport. The result contains the reusable MamaTransport object of the nativeHandle object. Applications calling this method will receive the same reusable object for repeated calls on same nativeHandle object.
string getRoot()
Get the name of the transport.
string getSource()
Get the name of the transport.
string getSymbol()
Get the name of the transport.

Protected Functions

  Name
virtual override void Dispose(bool disposing, bool destroyNativeHandle =true)
The actual implementation of Dispose - called by both the Dispose method and the finalizer.
virtual override MamaStatus.mamaStatus DestroyNativePeer()
Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer

Additional inherited members

Public Functions inherited from Wombat.MamaWrapper

  Name
void setNativeHandle(IntPtr nHandle)
Sets the native handle of the native peer object. Should only be used by subclasses and in the same assembly.

Protected Functions inherited from Wombat.MamaWrapper

  Name
  MamaWrapper()
Constructs a new wrapper object but doesn’t create it. If the object is not explicitly disposed it will remain registered for finalization and will attempt the destroy the native peer object when finalized.
  MamaWrapper(IntPtr nativeHandle)
Constructs a managed wrapper from an existing native peer. The peer object will not be automatically finalized
virtual void OnDispose()

Protected Attributes inherited from Wombat.MamaWrapper

  Name
IntPtr nativeHandle
the handle to the native peer object

Public Functions Documentation

function MamaPublisher

MamaPublisher()

M:Wombat.MamaWrapper.::ctor

function create

void create(
    MamaTransport transport,
    string topic,
    string source,
    string root
)

Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.

Parameters:

  • transport The transport.
  • topic Symbol on which to publish.
  • source The source for market data publishers. (e.g. source.symbol)
  • root The root for market data publishers. Used internally.

function createWithCallbacks

void createWithCallbacks(
    MamaTransport transport,
    MamaQueue queue,
    MamaPublisherCallback callback,
    Object closure,
    string topic,
    string source,
    string root
)

Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.

Parameters:

  • transport The transport.
  • topic Symbol on which to publish.
  • source The source for market data publishers. (e.g. source.symbol)
  • root The root for market data publishers. Used internally.

function create

void create(
    MamaTransport transport,
    string topic,
    string source
)

Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.

Parameters:

  • transport The transport.
  • topic Symbol on which to publish.
  • source The source for market data publishers. (e.g. source.symbol)

function create

void create(
    MamaTransport transport,
    string topic
)

Create a mama publisher for the corresponding transport. If the transport is a marketdata transport, as opposed to a “basic” transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.

Parameters:

  • transport The transport.
  • topic Symbol on which to publish.

function send

void send(
    MamaMsg message
)

Send a message from the specified publisher.

Parameters:

  • message The mamaMsg to send.

function sendWithThrottle

void sendWithThrottle(
    MamaMsg message,
    MamaSendCompleteCallback callback,
    object closure
)

Send a message with the throttle. The lifecycle of the message sent is controlled by the user of the API. The callback indicates when the API is no longer using the message and can be destroyed/reused by the application.

Parameters:

  • message The mamaMsg to send.
  • callback Callback invoked once the message has been send on the throttle
  • closure User supplied data returned in the send complete callback.

function sendFromInbox

void sendFromInbox(
    MamaInbox inbox,
    MamaMsg message
)

Send a p2p message from the specified inbox using the throttle.

Parameters:

  • inbox The mamaInbox which will process any response to the sent message.
  • message The mamaMsg to send.

function sendFromInboxWithThrottle

void sendFromInboxWithThrottle(
    MamaInbox inbox,
    MamaMsg message,
    MamaSendCompleteCallback callback,
    object closure
)

Send a p2p message from the specified inbox using the throttle. The lifecycle of the message sent is controlled by the user of the API. The callback indicates when the API is no longer using the message and can be destroyed/reused by the application.

Parameters:

  • inbox The MamaInbox which will process any response to the sent message.
  • message The MamaMsg to send.
  • callback The callback which will be invoked when the message is sent from the throttle queue.
  • closure User supplied data returned when the callback is invoked.

function sendReplyToInbox

void sendReplyToInbox(
    MamaMsg request,
    MamaMsg reply
)

Send a reply in response to a request to an inbox.

Parameters:

  • request The MamaMsg to which you are responding.
  • reply The MamaMsg to be sent as the reply.

function destroy

void destroy()

Destroy the publisher. A synonym to the MamaWrapper.Dispose method.

function getTransport

MamaTransport getTransport()

Get the MamaTransport. The result contains the reusable MamaTransport object of the nativeHandle object. Applications calling this method will receive the same reusable object for repeated calls on same nativeHandle object.

function getRoot

string getRoot()

Get the name of the transport.

function getSource

string getSource()

Get the name of the transport.

function getSymbol

string getSymbol()

Get the name of the transport.

Protected Functions Documentation

function Dispose

virtual override void Dispose(
    bool disposing,
    bool destroyNativeHandle =true
)

The actual implementation of Dispose - called by both the Dispose method and the finalizer.

Parameters:

  • disposing true if the object is being disposed (false if being finalized)

Reimplements: Wombat::MamaWrapper::Dispose

function DestroyNativePeer

virtual override MamaStatus.mamaStatus DestroyNativePeer()

Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer

Return: MAMA Status code

Reimplements: Wombat::MamaWrapper::DestroyNativePeer


Updated on 2023-03-31 at 15:29:32 +0100