Communications/Transactions Guide and Reference

AbtConnectionSpec protocol

An instance of AbtConnectionSpec is used by an application program to create new dialog objects without the need for the application program to know which underlying network system is being used.

The following example code shows how an instance of AbtConnectionSpec can be used to create new dialogs of different types.

dialog := AbtConnectionSpec newSimpleDialog.
dialog := AbtConnectionSpec newMultiReceiveDialog.
dialog := AbtConnectionSpec newMultiSendDialog.

The AbtConnectionSpec class is responsible for selecting the correct class to implement the chosen dialog (AbtSimpleDialog, AbtMultiSendDialog, or AbtMultiReceiveDialog), for creating a new instance of the chosen dialog class, and for initializing the instance with the parameters needed to send and receive messages from the remote component.

In addition to the message protocol, which is network-independent, the AbtConnectionSpec objects have a network-dependent protocol for setting the parameters for a network connection. The two approaches for dealing with this network-dependent protocol are as follows:

The following sections provide examples of how to create a protocol-specific instance of the AbtConnectionSpec class.

APPC ConnectionSpec

The following example code shows the creation and initialization of an AbtConnectionSpec for an APPC conversation through its network-specific interface.

aConnectionSpec:=
    AbtAPPCConnectionSpec new
        partnerTPName: 'prog1';
        partnerLUAlias: 'remoteLU'.

CICS ConnectionSpec

The following example code shows the creation and initialization of an AbtConnectionSpec for a CICS conversation through its network-specific interface.

aConnectionSpec :=
    AbtCICSConnectionSpec new
        programName: 'prog1';
        transactionId: 'TEST';
        userId: 'USERID';
        password: 'PASSWORD'.

MQI ConnectionSpec

The following example code shows the creation and initialization of an AbtConnectionSpec for an MQI conversation through its network-specific interface.

aConnectionSpec:=
    AbtMQSeriesConnectionSpec new
        queueManagerName: 'TEST';
        replyQueueName: 'TEST.VAQUEUE1';
        requestQueueName: 'TEST.VAQUEUE2;
        server: False
        syncPoint: False.

RPC ConnectionSpec

The following example code shows the creation and initialization of an AbtConnectionSpec for a RPC conversation through its network-specific interface.

aConnectionSpec :=
    AbtRPCConnectionSpec new
        programNumber: 16r30099999;
        programVersion: 1;
        serverName: 'Lancelot';
        netWorkType: 'TCP'.

TCP/IP ConnectionSpec

The following example code shows the creation and initialization of an AbtConnectionSpec for a TCP/IP conversation through its network-specific interface.

aConnectionSpec :=
    AbtTCPConnectionSpec new
        hostId: 'Lancelot';
        port: 7.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]