attach()   - trillium_quality - 17.2

Trillium Director SDK Reference Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Version
17.2
Language
English
Product name
Trillium Quality
Title
Trillium Director SDK Reference Guide
Topic type
Administration
Overview
Installation
Reference
How Do I
Configuration
First publish date
2008
ft:lastEdition
2024-02-07
ft:lastPublication
2024-02-07T07:48:41.529641

The attach() method connects to a Director instance and establishes a communication path to a Director cleansing or matcher server.

The returned value is the communication path (handle) to the server. The handle must be used in subsequent API calls to exchange data with the server. (If the returned value is 0, see “Return Values” below.) 

Syntax

public int attach(char systemID,
                    java.lang.String serverName,
                    int retCode[]);

Parameters

Name

Type

Use

Length

Description

systemID

char

In

1

System ID of requested server.

serverName

string

In

1-8

Name of requested server.

retCode

int[]

Out

4

Error code that indicates status of method call.

Return Values

A returned value of 0 indicates a failed attempt to attach to a Director server, and the retCode will indicate the specific error. For a description of the contents of the retCode parameter, refer to Return Values.

Example

import java.util.*;
import java.io.*;
import java.lang.*;
import trillium.director.*;
class TestJNIClient
{
        public static void main(String[] args)
        {
        TrilTGenClient testClient = new TrilTGenClient();
        int handle = 0; // System and Server ID for attach()
        char systemID = 'G';
        String serverName = “Cleanser”; // Attach to G Cleanser
        handle = testClient.attach(systemID, serverName, retCode);
        //
        // Cleanse or match requests not shown for this example
        //
        if (retCode[0] == 0) { testClient.release(handle, retCode);
        }
}