TIBCO FTL®
Typedefs | Functions
props.h File Reference

Properties objects represent a set of configuration properties (name/value pairs). More...

Typedefs

typedef struct __tibProperties * tibProperties
 Properties objects hold name/value pairs. More...
 

Functions

TIB_API tibProperties tibProperties_Copy (tibEx e, tibProperties properties)
 
TIB_API tibProperties tibProperties_Create (tibEx e)
 Create an empty property list object without any default values. More...
 
TIB_API void tibProperties_Destroy (tibEx e, tibProperties properties)
 Destroy a property list object. More...
 
TIB_API tibbool_t tibProperties_Exists (tibEx e, tibProperties properties, const char *name)
 Check whether a property exists. More...
 
TIB_API tibbool_t tibProperties_GetBoolean (tibEx e, tibProperties properties, const char *name)
 Get a boolean property. More...
 
TIB_API tibdouble_t tibProperties_GetDouble (tibEx e, tibProperties properties, const char *name)
 Get a double property. More...
 
TIB_API tibint32_t tibProperties_GetInt (tibEx e, tibProperties properties, const char *name)
 Get an integer property. More...
 
TIB_API tibint64_t tibProperties_GetLong (tibEx e, tibProperties properties, const char *name)
 Get a long integer property. More...
 
TIB_API const tibMessage tibProperties_GetMessage (tibEx e, tibProperties properties, const char *name)
 Get a tibMessage property. More...
 
TIB_API const char * tibProperties_GetString (tibEx e, tibProperties properties, const char *name)
 Get a string property. More...
 
TIB_API tibbool_t tibProperties_Remove (tibEx e, tibProperties properties, const char *name)
 Remove a property. More...
 
TIB_API void tibProperties_SetBoolean (tibEx e, tibProperties properties, const char *name, tibbool_t value)
 Set a boolean property. More...
 
TIB_API void tibProperties_SetDouble (tibEx e, tibProperties properties, const char *name, tibdouble_t value)
 Set a double property. More...
 
TIB_API void tibProperties_SetInt (tibEx e, tibProperties properties, const char *name, tibint32_t value)
 Set an integer property. More...
 
TIB_API void tibProperties_SetLong (tibEx e, tibProperties properties, const char *name, tibint64_t value)
 Set a long integer property. More...
 
TIB_API void tibProperties_SetMessage (tibEx e, tibProperties properties, const char *name, const tibMessage value)
 Set a tibMessage property. More...
 
TIB_API void tibProperties_SetString (tibEx e, tibProperties properties, const char *name, const char *value)
 Set a string property. More...
 

Detailed Description

Properties objects represent a set of configuration properties (name/value pairs).

This file defines properties objects and calls that manipulate them.

Typedef Documentation

typedef struct __tibProperties* tibProperties

Properties objects hold name/value pairs.

Programs pass properties to FTL object creation calls.

Many property names include an indication of the required datatype for the value. For example, TIB_EVENTQUEUE_PROPERTY_INT_DISCARD_POLICY requires an integer value.

Properties objects are not thread-safe.

Function Documentation

TIB_API tibProperties tibProperties_Copy ( tibEx  e,
tibProperties  properties 
)
TIB_API tibProperties tibProperties_Create ( tibEx  e)

Create an empty property list object without any default values.

As a mechanism for configuring objects, some FTL creation calls accept a properties object, which contains paired property names and values.

Properties objects are not thread-safe.

Parameters
eThe exception object captures information about failures.
Returns
On success, this call returns a new properties object.
On failure, this call returns NULL.
TIB_API void tibProperties_Destroy ( tibEx  e,
tibProperties  properties 
)

Destroy a property list object.

An application can destroy a properties object to reclaim its resources. Destroying a properties object does not invalidate objects created with it. (For example, the queue creation call copies property values into the new queue.)

Parameters
eThe exception object captures information about failures.
propertiesThe call destroys this properties object.
Returns
void
TIB_API tibbool_t tibProperties_Exists ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Check whether a property exists.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call checks for this property.
Returns
tibtrue if the property exists, tibfalse otherwise.
TIB_API tibbool_t tibProperties_GetBoolean ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get a boolean property.

Return the boolean value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
a boolean property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API tibdouble_t tibProperties_GetDouble ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get a double property.

Return the double value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
a double property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API tibint32_t tibProperties_GetInt ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get an integer property.

Return the integer value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
an integer property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API tibint64_t tibProperties_GetLong ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get a long integer property.

Return the long integer value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
a long integer property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API const tibMessage tibProperties_GetMessage ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get a tibMessage property.

Return the tibMessage value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
a read-only tibMessage property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API const char* tibProperties_GetString ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Get a string property.

Return the string value of property name.

Parameters
eThe exception object captures information about failures.
propertiesThe call searches this properties object.
nameThe call gets the value of this property.
Returns
a string property value
Exceptions
TIB_NOT_FOUNDindicates the property does not exist.
TIB_ILLEGAL_STATEindicates the property exists, but its value has a different type.
TIB_API tibbool_t tibProperties_Remove ( tibEx  e,
tibProperties  properties,
const char *  name 
)

Remove a property.

Remove the property name from properties.

Parameters
eThe exception object captures information about failures.
propertiesThe call removes the property from this properties object.
nameThe call removes this property.
Returns
tibtrue indicates the call removed the property.
tibfalse indicates the property did not exist.
TIB_API void tibProperties_SetBoolean ( tibEx  e,
tibProperties  properties,
const char *  name,
tibbool_t  value 
)

Set a boolean property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.
TIB_API void tibProperties_SetDouble ( tibEx  e,
tibProperties  properties,
const char *  name,
tibdouble_t  value 
)

Set a double property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.
TIB_API void tibProperties_SetInt ( tibEx  e,
tibProperties  properties,
const char *  name,
tibint32_t  value 
)

Set an integer property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.
TIB_API void tibProperties_SetLong ( tibEx  e,
tibProperties  properties,
const char *  name,
tibint64_t  value 
)

Set a long integer property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.
TIB_API void tibProperties_SetMessage ( tibEx  e,
tibProperties  properties,
const char *  name,
const tibMessage  value 
)

Set a tibMessage property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Note
The call copies the value, so you may re-use the tibMessage storage after this call returns.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.
TIB_API void tibProperties_SetString ( tibEx  e,
tibProperties  properties,
const char *  name,
const char *  value 
)

Set a string property.

  • If name is not yet in the properties object, this call adds the name and value pair.
  • If name is already in the properties object, this call changes its value.
Parameters
eThe exception object captures information about failures.
propertiesThe call modifies this properties object.
nameThe call sets this property.
valueThe call sets the property to this value.
Note
The call copies the value, so you may re-use the string storage after this call returns.
Exceptions
TIB_ILLEGAL_STATEindicates the property already exists, but its value has a different type.