C# Класс Wombat.MamaPublisher

The MamaPublisher class publishes messages to basic or market data subscriptions depending on the underlying transport
Наследование: MamaWrapper
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
create ( MamaTransport transport, string topic ) : void

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.

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

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.

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

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.

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

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.

destroy ( ) : void

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

getRoot ( ) : string

Get the name of the transport.

getSource ( ) : string

Get the name of the transport.

getSymbol ( ) : string

Get the name of the transport.

getTransport ( ) : MamaTransport

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.

send ( MamaMsg message ) : void

Send a message from the specified publisher.

sendFromInbox ( Wombat.MamaInbox inbox, MamaMsg message ) : void

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

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

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.

sendReplyToInbox ( MamaMsg request, MamaMsg reply ) : void

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

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

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.

Защищенные методы

Метод Описание
DestroyNativePeer ( ) : MamaStatus.mamaStatus

Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer

Dispose ( bool disposing, bool destroyNativeHandle = true ) : void

Приватные методы

Метод Описание
MamaPublisher ( ) : System
MamaPublisher ( IntPtr nativeHandle ) : System

M:Wombat.MamaWrapper.#ctor(System.IntPtr)

onCreate ( IntPtr nativeHandle, IntPtr closure ) : void
onDestroy ( IntPtr nativeHandle, IntPtr closure ) : void
onError ( IntPtr nativeHandle, short status, string topic, IntPtr closure ) : void
onSendComplete ( IntPtr publisher, IntPtr msg, int status, IntPtr closure ) : void

This handler is called whenever an asynchronous publisher send has completed.

Описание методов

DestroyNativePeer() защищенный Метод

Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer
protected DestroyNativePeer ( ) : MamaStatus.mamaStatus
Результат MamaStatus.mamaStatus

Dispose() защищенный Метод

protected Dispose ( bool disposing, bool destroyNativeHandle = true ) : void
disposing bool
destroyNativeHandle bool
Результат void

create() публичный Метод

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.
public create ( MamaTransport transport, string topic ) : void
transport MamaTransport The transport.
topic string Symbol on which to publish.
Результат void

create() публичный Метод

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.
public create ( MamaTransport transport, string topic, string source ) : void
transport MamaTransport The transport.
topic string Symbol on which to publish.
source string The source for market data publishers. (e.g. source.symbol)
Результат void

create() публичный Метод

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.
public create ( MamaTransport transport, string topic, string source, string root ) : void
transport MamaTransport The transport.
topic string Symbol on which to publish.
source string The source for market data publishers. (e.g. source.symbol)
root string The root for market data publishers. Used internally.
Результат void

createWithCallbacks() публичный Метод

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.
public createWithCallbacks ( MamaTransport transport, Wombat.MamaQueue queue, MamaPublisherCallback callback, Object closure, string topic, string source, string root ) : void
transport MamaTransport The transport.
queue Wombat.MamaQueue
callback MamaPublisherCallback
closure Object
topic string Symbol on which to publish.
source string The source for market data publishers. (e.g. source.symbol)
root string The root for market data publishers. Used internally.
Результат void

destroy() публичный Метод

Destroy the publisher. A synonym to the MamaWrapper.Dispose method.
public destroy ( ) : void
Результат void

getRoot() публичный Метод

Get the name of the transport.
public getRoot ( ) : string
Результат string

getSource() публичный Метод

Get the name of the transport.
public getSource ( ) : string
Результат string

getSymbol() публичный Метод

Get the name of the transport.
public getSymbol ( ) : string
Результат string

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.
public getTransport ( ) : MamaTransport
Результат MamaTransport

send() публичный Метод

Send a message from the specified publisher.
public send ( MamaMsg message ) : void
message MamaMsg The mamaMsg to send.
Результат void

sendFromInbox() публичный Метод

Send a p2p message from the specified inbox using the throttle.
public sendFromInbox ( Wombat.MamaInbox inbox, MamaMsg message ) : void
inbox Wombat.MamaInbox The mamaInbox which will process any response to the sent /// message.
message MamaMsg The mamaMsg to send.
Результат void

sendFromInboxWithThrottle() публичный Метод

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.
public sendFromInboxWithThrottle ( Wombat.MamaInbox inbox, MamaMsg message, MamaSendCompleteCallback callback, object closure ) : void
inbox Wombat.MamaInbox The MamaInbox which will process any response to the sent message.
message MamaMsg The MamaMsg to send.
callback MamaSendCompleteCallback The callback which will be invoked when the message /// is sent from the throttle queue.
closure object User supplied data returned when the callback is invoked.
Результат void

sendReplyToInbox() публичный Метод

Send a reply in response to a request to an inbox.
public sendReplyToInbox ( MamaMsg request, MamaMsg reply ) : void
request MamaMsg The MamaMsg to which you are responding.
reply MamaMsg The MamaMsg to be sent as the reply.
Результат void

sendWithThrottle() публичный Метод

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.
public sendWithThrottle ( MamaMsg message, MamaSendCompleteCallback callback, object closure ) : void
message MamaMsg The mamaMsg to send.
callback MamaSendCompleteCallback Callback invoked once the message has been send on /// the throttle
closure object User supplied data returned in the send complete callback.
Результат void