C# Class Wombat.MamaPublisher

The MamaPublisher class publishes messages to basic or market data subscriptions depending on the underlying transport
Inheritance: MamaWrapper
ファイルを表示 Open project: OpenMAMA/OpenMAMA Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
DestroyNativePeer ( ) : MamaStatus.mamaStatus

Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer

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

Private Methods

Method Description
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.

Method Details

DestroyNativePeer() protected method

Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer
protected DestroyNativePeer ( ) : MamaStatus.mamaStatus
return MamaStatus.mamaStatus

Dispose() protected method

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

create() public method

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.
return void

create() public method

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)
return void

create() public method

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.
return void

createWithCallbacks() public method

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.
return void

destroy() public method

Destroy the publisher. A synonym to the MamaWrapper.Dispose method.
public destroy ( ) : void
return void

getRoot() public method

Get the name of the transport.
public getRoot ( ) : string
return string

getSource() public method

Get the name of the transport.
public getSource ( ) : string
return string

getSymbol() public method

Get the name of the transport.
public getSymbol ( ) : string
return string

getTransport() public method

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
return MamaTransport

send() public method

Send a message from the specified publisher.
public send ( MamaMsg message ) : void
message MamaMsg The mamaMsg to send.
return void

sendFromInbox() public method

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.
return void

sendFromInboxWithThrottle() public method

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.
return void

sendReplyToInbox() public method

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.
return void

sendWithThrottle() public method

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.
return void