tibasMetaspace_Listen()

Attaches a listener to a space for receiving space events.

Declaration

tibas_status tibasMetaspace_Listen
(tibasMetaspace   metaspace,
const char*       spaceName,
tibasListener     listener,
tibasListenerDef  listenerDef,
const char*       filter)

Parameters

Parameter Description
metaspace The TIBCO ActiveSpaces entity on which the function is invoked.
spaceName The name of the space on which to attach the listener.
listener The listener.
listenerDef The listener definition.
filter A filter string to apply to the listener or NULL.

Remarks

Use the tibasMetaspace_Listen() function to attach a listener to a specified space in a specified metaspace. You do not have to be joined to the space to call the function.

Before you can attach a listener to a space, there must be:

  • A listener object created by a call to the tibasListener_Create() function.

    Specify this object with the listener parameter.

  • A ListenerDef object that specifies the characteristics of the listener.

    Specify this object with the listenerDef parameter.

Calling tibasMetaspace_Listen() may cause the space to be automatically joined with a distribution role of TIBAS_DISTRIBUTION_ROLE_LEECH if not already joined.

Prior to calling tibasMetaspace_Listen(), you must create a tibasListenerDef object by calling the tibasListenerDef_Create() function or the tibasListenerDef_CreateEx() function and specify the attributes of the listener, such as the time scope and distribution scope for the listener.