TIBCO FTL®

Typedefs | Functions
conmatch.h File Reference

Content matchers filter messages based on their content. More...

## Typedefs
typedef struct __tibContentMatcher * | tibContentMatcher
| A content matcher object filters messages based on their content. More...

## Functions
TIB_API tibContentMatcher | tibContentMatcher_Create (tibEx e, tibRealm realm, const char *matchString)
| Create a content matcher object. More...
TIB_API void | tibContentMatcher_Destroy (tibEx e, tibContentMatcher matcher)

## Detailed Description

Content matchers filter messages based on their content.

## Typedef Documentation

## ◆ tibContentMatcher

typedef struct __tibContentMatcher* tibContentMatcher

A content matcher object filters messages based on their content.

Programs may supply a content matcher object to tibSubscriber_Create.

## Function Documentation

## ◆ tibContentMatcher_Create()

TIB_API tibContentMatcher tibContentMatcher_Create | ( | tibEx | e,
|  | tibRealm | realm,
|  | const char * | matchString
| ) |  |

Create a content matcher object.

An application can create a matcher to register interest in a stream of messages.

Content matcher objects are not thread-safe.

Match Syntax:

`{` "fieldname1" ``: value1 ``, ... ``, "fieldnameN" ``: valueN `}`

- Enclose the list of field:value pairs in curly braces.
- Separate field:value pairs with commas.
- Enclose field names in double-quote characters. Precede quote characters with an escape character, as needed.
- Do not enclose boolean tokens in double-quote characters.
- Each field name can appear at most once.
- Values can be long integers or strings – or the special boolean tokens `true` or `false`.
- When value is a string, its maximum length is 256 characters.
- Whitespace is ignored (except within double-quote characters).

Match Semantics:

- If the match string specifies a field with boolean token `true`, that field must be present in the message in order to match.
- If the match string specifies a field with boolean token `false`, that field must be absent from the message in order to match.
- If the match string specifies a field with either a string or long integer value, that field must be present in the message with that value.
- When comparing a field name or a value, all comparisons must be exact. Matching does not support wildcards nor regular expressions.

Parameters

  e | The exception object captures information about failures.
  realm | The realm object is the source of configuration information about the application and formats.
  matchString | This string determines message interest.

Returns
  On success, this call returns a new content matcher object.
  On failure, this call returns `NULL`.

## ◆ tibContentMatcher_Destroy()

TIB_API void tibContentMatcher_Destroy | ( | tibEx | e,
|  | tibContentMatcher | matcher
| ) |  |

Destroy a content matcher object.

An application can destroy a content matcher object to reclaim its resources. Destroying a matcher does not invalidate objects created with the matcher. (For example, the subscriber creation call copies its matcher argument into the new subscriber.)

Parameters

  e | The exception object captures information about failures.
  matcher | The call destroys this content matcher object.

Returns
  void