Classes Files

com::wombat::mama::MamaBasicSubscription

Public Functions

  Name
  MamaBasicSubscription()
void createBasicSubscription(final MamaBasicSubscriptionCallback callback, final MamaTransport transport, final MamaQueue queue, final String topic, final Object closure)
void createBasicWildCardSubscription(final MamaBasicWildCardSubscriptionCallback callback, final MamaTransport transport, final MamaQueue queue, final String source, final String topic, final Object closure)
Object getClosure()
long getPointerVal()
MamaSubscriptionState getState()
native void deallocate()
native void destroy()
native void destroyEx()
native String getSymbol()

Protected Functions

  Name
void finalize()

Public Functions Documentation

function MamaBasicSubscription

inline MamaBasicSubscription()

The constructor allocates the underlying C subscription.

function createBasicSubscription

inline void createBasicSubscription(
    final MamaBasicSubscriptionCallback callback,
    final MamaTransport transport,
    final MamaQueue queue,
    final String topic,
    final Object closure
)

Parameters:

  • callback The object implementing the callback functions.
  • transport The MamaTransport.
  • queue The MamaQueue.
  • topic The symbol name.
  • closure The closure will be passed to subsequent callback invocations for this subscription.

Create a basic subscription without marketdata semantics.

function createBasicWildCardSubscription

inline void createBasicWildCardSubscription(
    final MamaBasicWildCardSubscriptionCallback callback,
    final MamaTransport transport,
    final MamaQueue queue,
    final String source,
    final String topic,
    final Object closure
)

function getClosure

inline Object getClosure()

Return: The closure object.

This function returns the closure supplied to the createSubscription function.

function getPointerVal

inline long getPointerVal()

Return: The pointer.

This function returns the pointer to the underlying C subscription.

function getState

inline MamaSubscriptionState getState()

Return: The MamaSubscriptionState that represents the current state of the subscription.

This function returns the current state of the subscription as one of the MamaSubscriptionState instances, see this class for more information.

function deallocate

native void deallocate()

De-allocates the underlying C subscription. This can be used to reduce time during finalization.

function destroy

native void destroy()

This function will destroy the subscription, it must be called from the same thread that is processing the queue for the subscription. Use destroyEx to destroy the subscription from any thread. Note that the subscription will not be fully destroyed until the onDestroy callback is received.

function destroyEx

native void destroyEx()

This function will destroy the subscription and can be called from any thread. Note that the subscription will not be fully destroyed until the onDestroy callback is received. To destroy from the dispatching thread the destroy function should be used in preference.

function getSymbol

native String getSymbol()

Return: The symbol.

This function returns the symbol subscribed to.

Protected Functions Documentation

function finalize

inline void finalize()

Exceptions:

  • Throwable A MamaException will be thrown if the underlying subscription could not be de-allocated.

The finalizer deallocates the underlying C subscritpion.


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