Importing an SNA Custom Handshake Class

To Import an SNA Custom Handshake Class

To import an SNA custom handshake class, follow the instructions below:

  1. On the Enterprise Designer’s Inbound SNA Connectivity Map, double-click the SNA Adapter icon.

    Inbound Connectivity Map

    The SNA Adapter Properties window appears, displaying the default properties for the Inbound Adapter.

    Inbound Connectivity Map Properties
  2. Edit the Custom Handshake Class Name property in the Inbound Properties window. For the sample code provided with the Adapter, enter com.stc.connector.snalu62.api.SNACustomerHandshakeImplSampleAccept.

  3. On the Enterprise Designer’s Outbound SNA Connectivity Map, double-click the SNA Adapter icon.

    Outbound Connectivity Map

    The SNA Adapter Properties window appears, displaying the default properties for the Oubound Adapter.

    Outbound Connectivity Map Properties
  4. Edit the Custom Handshake Class Name property in the Outbound Properties window. For the sample code provided with the Adapter, enter com.stc.connector.snalu62.api.SNACustomerHandshakeImplSampleInitialize.

  5. Redeploy your project.

Steps when Building your own Class:

  1. Prepare a JAR file that includes your built class.

  2. From the Project Explorer, right-click the sample Project and select Import > File from the shortcut menu.

    Importing JAR File

    The Import Files window appears.

    Importing Files Window
  3. Locate your JAR file and click Select. Your selected JAR file appears in the Selected Import Files pane at the bottom of the Import Files window.

  4. Click Import. Your selected JAR file appears in your sample Project’s folder in the left pane of the Enterprise Designer.

  5. Click the Import JAR file button on the Business Rules toolbar in the right pane of Enterprise Designer.

    Importing JAR File – Collaboration

    The Add/Remove JAR Files window appears.

    Add/Remove JAR Files
  6. Locate your JAR file and click Add. Your selected JAR file appears in the Imported JAR Files pane.

  7. Click Close. Your selected JAR file appears under your sample Project’s Collaboration in the left pane of the Enterprise Designer.


    Note –

    If you make any changes to the class, repeat steps 2 through 7.


The Java Collaboration can handle the SNA connection completely using the sample Class (com.stc.connector.snalu62.api.SNACustomerHandshakeImplSampleDummy). This class has been implemented in the SNA Adapter. The sample code for this custom class is as follows:


package com.stc.connector.snalu62.api;

import com.stc.connector.logging.LogFactory;
import com.stc.connector.logging.Logger;
import com.stc.connector.snalu62.exception.SNAApplicationException;

/**
 * This is a sample class to implement the interface SNACustomerHandshake.
 * It implements a dummy handshake. That is, the method startConversation()
 does not perform a function.
 * No SNA conversation is established inside this implementation class.
You should establish the SNA conversation manually
(e.g. in the java Collaboration).
*/

public class SNACustomerHandshakeImplSampleDummy implements SNACustomerHandshake {
    public static final String version = "cvs $Revision: 1.1.2.2 $   
$Date: 2005/11/10 21:40:15 $";
    private Logger logger = LogFactory.getLogger
("STC.eWay.SNALU62." + getClass().getName());

    /**
     * Constructor
     *
     */
    public SNACustomerHandshakeImplSampleDummy() {
        super();
    }

    /**
     * @see com.stc.connector.snalu62.api.SNACustomerHandshake#startConversation
(com.stc.connector.snalu62.api.SNACPICCalls)
     */
    public void startConversation(SNACPICCalls cpic) throws SNAApplicationException {
        logger.info("SNACustomerHandshakeImplSampleDummy.startConversation():
Done nothing here.");

    }

}