• 沒有找到結果。

tibasMemberDef_Free()

在文檔中 TIBCO ActiveSpaces (頁 126-141)

Frees a specified connection definition (memberDef).

Declaration

tibas_status tibasMemberDef_Free (tibasMemberDef* memberDef)

Parameters

Parameter Description

memberDef The TIBCO ActiveSpaces entity on which the function is invoked.

Remarks

Use the tibasMemberDef_Free() function to free the resources used by a specified connection definition.

See Also

tibasMemberDef_Create()

tibasMemberDef_SetMemberName()

Sets the name for a specified member.

Declaration

tibas_status tibasMemberDef_SetMemberName(

tibasMemberDef memberDef, const char** name)

Parameters

Parameter Description

memberDef The memberDef object for the member for which you want to set a name.

name The name to set for the member.

Remarks

Use the tibasMemberDef_SetMemberName() function to specify a name for a specified memberDef.

See Also

tibasMemberDef_Create(), tibasMemberDef_GetMemberName(),

tibasMemberDef_SetRemoteDiscovery(), tibasMemberDef_SetListen(), tibasMemberDef_SetDiscovery()

tibasMemberDef_SetDataStore()

Specifies the directory path for the data store used when you implement shared-nothing persistence.

Declaration

tibas_status tibasMemberDef_SetDataStore(

tibasMemberDef memberDef, const char* dataStore)

Parameters

Parameter Description

memberDef Specify the memberDef object that defines the member for which you are implementing shared-nothing persistence.

dataStore Specifies a string that sets the directory path to the directory that holds the data store for shared-nothing persistence.

Remarks

If you are implementing shared-nothing persistence, use the tibasMemberDef_SetDataStore() function to specify the directory where the data store for persisted data is located.

See Also

tibasMemberDef_GetDataStore()

tibasMemberDef_SetWorkerThreadCount()

Specifies the number of worker threads for a specified space number.

Declaration

tibas_status tibasMemberDef_SetWorkerThreadCount(

tibasMemberDef memberDef, tibas_int count);

Parameters

Parameter Description

memberDef Specifies the member definition for the space for which you want to set the number of worker threads.

count Specifies the number of worker threads.

Remarks

Use the tibasMemberDef_SetWorkerThreadCount() function to specify the number of worker threads used with a specified space member.

See Also

tibasMemberDef_GetWorkerThreadCount()

tibasMemberDef_GetWorkerThreadCount()

Returns the number of worker threads for a specified space number.

Declaration

tibas_status tibasMemberDef_GetWorkerThreadCount(

tibasMemberDef memberDef, tibas_int *count);

Parameters

Parameter Description

memberDef Specifies the member definition for the space for which you want to return the number of worker threads.

count Returns the number of worker threads set for the member.

Remarks

Use the tibasMemberDef_GetWorkerThreadCount() function to return the number of worker threads used with a specified space member.

See Also

tibasMemberDef_SetWorkerThreadCount()

tibasMemberDef_GetMemberName()

Returns the name for a specified member.

Declaration

tibas_status tibasMemberDef_GetMemberName(

tibasMemberDef memberDef, const char** name)

Parameters

Parameter Description

memberDef The memberDef object for the member for which you want to return the name.

name The name of the member that is returned.

Remarks

Use the tibasMemberDef_GetMemberName() function to return the name of a specified space member.

See Also

tibasMemberDef_Create(), tibasMemberDef_SetMemberName(),

tibasMemberDef_SetRemoteDiscovery(), tibasMemberDef_SetListen(), tibasMemberDef_SetDiscovery()

tibasMemberDef_GetDataStore()

Returns the directory path for data store files, if shared-nothing persistence is implemented.

Declaration

tibas_status tibasMemberDef_GetDataStore(

tibasMemberDef memberDef, const char** dataStore)

Parameters

Parameter Description

memberDef Specify the memberDef object that defines the member for which you are implementing shared-nothing persistence.

dataStore Returns a string that indicates the directory path to the directory that holds the data store for shared-nothing persistence.

Remarks

If you have implemented shared-nothing persistence, use the tibasMemberDef_GetDataStore() function to return the directory path for the directory where the persisted data store is stored.

See Also

tibasMemberDef_SetDataStore()

tibasMemberDef_SetRemoteDiscovery()

Sets the discovery URL for a remote member.

Declaration

tibas_status tibasMemberDef_SetRemoteDiscovery(

tibasMemberDef memberDef, const char* remote)

Parameters

Parameter Description

memberDef The memberDef object that identifies the remote member.

remote The discovery URL for the remote member.

Remarks

Use the tibasMemberDef_SetRemote() function to specify the discovery URL for a remote space member.

See Also

tibasMemberDef_GetRemoteDiscovery()

tibasMemberDef_GetRemoteDiscovery()

Gets the discovery URL for a specified remote member.

Declaration

tibas_status tibasMemberDef_GetRemoteDiscovery(

tibasMemberDef memberDef, const char** remoteDiscovery)

Parameters

Parameter Description

memberDef The memberDef object that identifies the remote member.

remoteDiscovery Returns the remote discovery URL for the specified member.

Remarks

Use the tibasMemberDef_GetRemoteDiscovery() function to return the name for a remote space member.

See Also

tibasMemberDef_SetRemoteDiscovery()

tibasMemberDef_SetRemoteListen()

Specifies a listen URL for a specified remote member.

Declaration

tibas_status tibasMemberDef_SetRemoteListen(

tibasMemberDef memberDef, const char* remoteListen

Parameters

Parameter Description

memberDef The memberDef object that identifies the remote member.

remoteListen Specifies the remote listen URL to be set for the specified member.

Remarks

Use the tibasMemberDef_SetRemoteListen() function to specify the remote listen URL for a remote space member.

See Also

tibasMemberDef_SetRemoteDiscovery()

tibasMemberDef_SetListen()

Sets the listen attribute for a specified memberDef.

Declaration

tibas_status tibasMemberDef_SetListen (tibasMemberDef* memberDef,

const char* listen)

Parameters

Parameter Description

memberDef The memberDef for which you want to set the listen attribute.

listen The listen attribute set by the function.

Remarks

Use the tibasMemberDef_SetListen() function to specify the listen attribute for a specified memberDef.

Specifically, the listen attribute specifies the interface and port that the member uses to listen for incoming connections from new members in the metaspace.

For information on the format for the listen attribute, see the TIBCO ActiveSpaces Developer’s Guide.

See Also

tibasMemberDef_Create(), tibasMemberDef_SetMemberName(),

tibasMemberDef_SetRemoteDiscovery(), tibasMemberDef_SetDiscovery(), tibasMemberDef_GetListen(), tibasMemberDef_SetDiscovery()

tibasMemberDef_SetDiscovery()

Sets the discovery attribute of the specified MemberDef object.

Declaration

tibas_status tibasMemberDef_SetDiscovery (tibasMemberDef memberDef,

const char* discovery)

Parameters

Parameter Description

memberDef The memberDef for which you want to set the discovery attribute.

discovery The discovery attribute set by the function.

Remarks

Use the tibasMemberDef_SetDiscovery() function to set the discovery attribute for a specified MemberDef.

The discovery attribute specifies the discovery protocol and URL used to discover the other members of the metaspace on the network.

You can use one of the following discovery protocols:

PGM (Pragmatic General Multicast) Discovery

A reliable multicast protocol based on RFC 32 that provides ordered or unordered, duplicate-free, multicast data.

For information on the URL format for PGM, see the TIBCO ActiveSpaces Developer’s Guide.

PGM is the recommended discovery method.

TCP Discovery

When usage of multicast discovery is not desirable or possible, pure TCP discovery can be used. In this case, a number of metaspace members are designated as the “well known” members of the metaspace, and all metaspace members must specify this exact same list of well known members in their discovery URL

For information on the URL format for PGM, see the TIBCO ActiveSpaces Developer’s Guide.

All members of a metaspace must use compatible discovery URLs. If two metaspace members attempt to connect to the same metaspace using different discovery protocols, two different metaspaces are created and the two members are in different metaspaces.

See Also

tibasMemberDef_Create(), tibasMemberDef_GetDiscovery(), tibasMemberDef_SetListen(), tibasMemberDef_GetListen()

tibasMemberDef_GetListen()

Gets the listen attribute of the connection definition.

Declaration

tibas_status tibasMemberDef_GetListen (tibasMemberDef memberDef,

const char** listen)

Parameters

Parameter Description

memberDef The memberDef for which you want to return the listen attribute.

listen The listen attribute for the memberDef.

Remarks

Use the tibasMemberDef_GetListen() function to return the listen attribute for a specified memberDef.

See Also

tibasMemberDef_Create(), tibasMemberDef_SetMemberName(),

tibasMemberDef_SetRemoteDiscovery(), tibasMemberDef_SetDiscovery(), tibasMemberDef_GetListen(), tibasMemberDef_SetDiscovery()

tibasMemberDef_GetDiscovery()

Returns the discovery attribute for a specified memberDef.

Declaration

tibas_status tibasMemberDef_GetDiscovery (tibasMemberDef memberDef,

const char** discovery)

Parameters

Parameter Description

memberDef The memberDef for which you want to return the discovery attribute.

discovery The discovery attribute returned by the function.

Remarks

Use the tibasMemberDef_GetDiscovery() function to return the discovery URL for a specified memberDef.

See Also

tibasMemberDef_SetDiscovery(), tibasMemberDef_SetListen(), tibasMemberDef_GetListen()

tibasMemberDef_GetContext()

Used to retrieve a context tuple. Returns the context tuple associated with the MemberDef.

Declaration

tibas_status tibasMemberDef_GetContext

(tibasMemberDef memberDef, tibasTuple context)

Parameters

Parameter Description

memberDef Specify the memberDef for which to specify context information.

context A tuple that contains context information for the member definition.

tibasMemberDef_SetContext()

Used to set a context tuple. Specifies a tuple that contains context information for a specified memberDef.

Declaration

tibas_status tibasMemberDef_SetContext(

tibasMemberDef memberDef, tibasTuple context);

Parameters

Parameter Description

memberDef Specify the memberDef for which to specify context information.

context A tuple that contains context information.

Remarks

Use the tibasMemberDef_SetContext() function to specify a tuple that contains data that is unique for a specified member.

For example, you might want to specify the name of an application that the member is associated with.

You can place this information in a tuple and include it in the memberDef for the member so that it can be referenced by your application.

See Also

tibasMember_GetContext()

tibasMemberDef_GetSecurityPolicyFile()

Returns the location and filename for the policy file that is in effect for a specified member.

Declaration

tibas_status tibasMemberDef_GetSecurityPolicyFile(

tibasMemberDef memberDef, const char** policyFile)

Parameters

Parameter Description

memberDef Specify the memberDef object that identifies the member for which you want to retrieve the security policy file.

policyFile Specify a pointer to a NULL-terminated string buffer that will hold the contents of the policy file that is returned.

Remarks

Use the tibasMemberDef_GetSecurityPolicyFile() function to return the policy file that is in effect for a specified space member that is acting as a security domain controller.

If the member is not functioning as a security domain controller then it is a security domain requestor and will not have a security policy file; instead it will have a security token file. You can use the tibasMemberDef_GetSecurityTokenFile() function to return the location and filename for the security policy file.

See Also

tibasMemberDef_SetSecurityPolicyFile(), tibasMemberDef_GetSecurityTokenFile()

tibasMemberDef_GetSecurityTokenFile()

Returns the directory path and filename for the security token file that is in effect for a specified member.

Declaration

tibas_status tibasMemberDef_GetSecurityTokenFile(

tibasMemberDef memberDef, const char** tokenFile

Parameters

Parameter Description

memberDef Specify the memberDef object that identifies the member for which you want to retrieve the security token file.

tokenFile Specify a pointer to a NULL-terminated string buffer that will hold the security token file information that is returned.

Remarks

Use the tibasMemberDef_GetSecurityTokenFile() function to return the directory path and filename for the security token file that is used by a specified member.

If the member is acting as a security domain controller, then there is not a security token file associated with the member; instead, there is a security policy file. You can use the

tibasMemberDef_GetSecurityPolicyFile() function to return information about the security policy file.

See Also

tibasMemberDef_SetSecurityTokenFile(), tibasMemberDef_GetSecurityPolicyFile()

tibasMemberDef_GetAuthenticationCallback()

Returns the authentication callback setting for a specified memberDef, if the callback function has been specified.

Declaration

tibas_status tibasMemberDef_GetAuthenticationCallback(

tibasMemberDef memberDef,

tibasMetaspace_AuthenticationCallback* callback)

Parameters

Parameter Description

memberDef Specify the memberDef object that identifies the member for which you want to return the callback function name.b

callback Returns a pointer to the callback function, if one exists.

Remarks

Use the tibasMemberDef_GetAuthenticationCallback() function to return a pointer to the

authentication callback function that has been specified for a specified member, if a callback function has been specified.

See Also

tibasMemberDef_SetAuthenticationCallback()

tibasMemberDef_SetSecurityPolicyFile()

Sets the directory path and filename for the security policy file for a specified member.

Declaration

tibas_status tibasMemberDef_SetSecurityPolicyFile(

tibasMemberDef memberDef, const char* policyFile)

Parameters

Parameter Description

memberDef Specify the memberDef object that identifies the member for which you want to set the security policy file.

policyFile A string that specifies that directory path and filename for the security policy file.

For example, c:/tibco/as/<version>/lib/mypolicyfile.txt.

Remarks

Use the tibasMemberDef_SetSecurityPolicyFile() function to specify the security policy file for a specified member that will function as a security domain controller.

If the member is a security domain requestor, a policy file is not required; instead you must specify a security token file. You can use the tibasMemberDef_SetSecurityTokenFile() to specify the directory path and filename for the security token file.

See Also

tibasMemberDef_SetSecurityTokenFile(), tibasMemberDef_GetSecurityPolicyFile()

tibasMemberDef_SetSecurityTokenFile()

Specifies the directory path and security token filename for a specified member.

Declaration

memberDef Specify the memberDef object that identifies the member for which you want to set the security token file.

tokenFile A string that specifies that directory path and filename for the security token file.

For example, c:/tibco/as/<version>/lib/mytokenfile.txt.

Remarks

Use the tibasMemberDef_SetSecurityTokenFile() function to specify the security token file for a specified member that will function as a security domain requestor.

If the member is a security domain controller, a security token file is not required; instead you must specify a security policy file. You can use the tibasMemberDef_SetSecurityPolicyFile() to specify the directory path and filename for the security policy file.

See Also

tibasMemberDef_GetSecurityTokenFile(), tibasMemberDef_SetSecurityPolicyFile()

tibasMemberDef_SetAuthenticationCallback()

Specifies a callback routine that allows you to customize how user authentication information is retrieved for users.

If you invoke tibasMemberDef_SetAuthenticationCallback() to specify a callback routine for your application and the security policy file for the domain that controls the metaspace which your application is joining specifies user password or X509v3 authentication, then the callback routine is called when users try to connect to the domain.

If there is no callback routine, ActiveSpaces provides a default mechanism, which prompts the user for the required information on the default console. In such a case, passwords are never echoed on the console.

Declaration

tibas_status tibasMemberDef_SetAuthenticationCallback(

tibasMemberDef memberDef,

tibasMetaspace_AuthenticationCallback callback, void* closure)

Parameters

Parameter Description

memberDef Specify the memberDef object that identifies the member for which you want to set the authentication callback.

callback Specifies the name of the callback function used to process authentication information

closure A pointer to a closure value that is returned to your application when the authentication callback function completes. This can be a text string, or any information that your application needs to keep track of during the

authentication process.

Remarks

Use the tibasMemberDef_SetAuthenticationCallback() function to specify the name of a callback function that is used to retrieve authentication credentials for users requesting connection to a specified member.

The authentication callback routine must conform to the following function prototype, which is defined in the security.h header file:

tibas_status TIBAS_COMMON_API tibasMemberDef memberDef,

tibasMetaspace_AuthenticationCallback callback, void* closure);

The authentication callback routine takes one argument—a tibasAuthenticationInfo struct that is defined in the security.h header file as follows:

typedef struct _tibasAuthenticationInfo {

tibas_authenticationMethod authenticationMethod;

const char* metaspaceName;

tibasUserCredential* credential;

const char* authHint;

} tibasAuthenticationInfo;

The tibasAuthenticationInfo structure includes the following members:

authenticationMethod

Based on the value assigned to the authentication setting in the security policy file that the security domain is using, ActiveSpaces assigns one of the following values to the authenticationMethod data type:

AUTH_USERPWD - ActiveSpaces sets the authentication method to this value is set when the security policy file specifies authentication=userpwd.

AUTH_X509V3 - ActiveSpaces sets the authentication method to this value when the security policy file specifies authentication=x509.

metaspaceName

The currently connected metaspace is assigned.

credential

A pointer to a tibasUserCredential structure that is used to process the authentication information.

authHint

ActiveSpaces populates this element with the authorization hint that is provided in the security policy file that the active security domain is using the hint keyword, for example,

hint=SystemLoginInformation.

Using the Credential Member

The credential member is a tibasUserCredential structure. This structure contains a set of members that the callback function uses to store authentication information that is passed to it, such as authentication domains, usernames, and passwords.

The tibasUserCredential is defined in the security.h header file. It has the following definition:

typedef struct _tibasUserCredential

You use the members of the credential structure to pass to ActiveSpaces the authentication information provided by users requesting access to security domains. The elements are defined as follows:

domain

Passes authentication domain information to ActiveSpaces, if applicable (for example, for Windows systems)

username

Passes the username for authentication.

keyfile

If X509 authentication is used, passes either the account or keyfile password.

password

Passes the user password.

Example

For a code example showing how to use an authentication callback function, see the reference article on the ASUserAuthentication example program in the TIBCO ActiveSpaces Developers Guide.

See Also

tibasMemberDef_GetAuthenticationCallback()

tibasMemberDef_SetTimeout()

Specifies a timeout interval for a specified memberDef.

Declaration

memberDef Specify the memberDef object for which you want to specify a timeout interval.

Parameter Description

timeout The timeout interval, in milliseconds.

Remarks

Use the tibasMemberDef_SetTimeout() function to specify a timeout value for space operations on a specified space member.

The default timeout for a space operation is 60 seconds. After the timeout interval expires, a space operation times out and does not complete, unless it has already completed. You can use

tibasMemberDef_SetTimeout() to change the default timeout value.

See Also

tibasMemberDef_Create()

FieldDef

Field definitions describe the format of the data that will be stored in the space.

A valid space definition must contain at least one field definition. Field definitions are created by the factory object and can be put (or taken) from space definitions.

Field definitions can also be re-used and put into as many space definitions as needed (for example when using some fields as foreign keys to correlate tuples stored in different spaces).

在文檔中 TIBCO ActiveSpaces (頁 126-141)

相關文件