Verastream© Bridge Integrator 4.1

Package com.attachmate.cicsbridge

Attachmate™ Verastream® Bridge Integrator


See:
          Description

Interface Summary
Attribute Field Attributes
BridgeAPI This is a modernized Verastream Bridge Integrator's BridgeAPI
FieldInformation Represents a field on the host
ScreenBase Base screen information object that doesn't include fields This interface is meant to be extended
ScreenInformation Information about the Screen including its fields
TraceConfiguration The ability to create a trace on the host
 

Class Summary
BridgeFactory This is the standard way to obtain an instance of the BridgeAPI
Diagnostics Utilities for Attachmate support
Dimension Utility class to represent x, y coordinates with a length
ModuleInformation Information about the specified module on the host
Position Utility class to represent x, y coordinates
 

Enum Summary
Color Represent field colors
FindFlag Flags to use in the FindString method on the BridgeAPI
Highlight Represents a field highlight
TerminalModelType Specifies the host terminal model type
 

Exception Summary
BridgeException Error information for the BridgeAPI
 

Package com.attachmate.cicsbridge Description

Attachmate™ Verastream® Bridge Integrator


Sample Usage

package com.attachmate.cicsbridge.sample;

import java.util.List;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.attachmate.cicsbridge.BridgeAPI;
import com.attachmate.cicsbridge.BridgeFactory;
import com.attachmate.cicsbridge.BridgeException;
import com.attachmate.cicsbridge.FieldInformation;
import com.attachmate.cicsbridge.ScreenInformation;
import com.attachmate.cicsbridge.TerminalModelType;
import com.attachmate.cicsbridge.test.TestConfig;

public class Sample
{
        public static void main(String[] args)
        {
                BridgeAPI wrapper = null;
                try
                {
                        //Set the logging level
                        Level level = Level.SEVERE;     //Change this
                        Logger logger = Logger.getLogger("com.attachmate.cicsbridge");
                        ConsoleHandler cHandler = new ConsoleHandler();                 
                        cHandler.setLevel(level);
                        logger.addHandler(cHandler);
                        logger.setLevel(level);
                        
                        //Inject it into the wrapper
                        wrapper = BridgeFactory.createBridgeAPI();
                        
                        //Connect to the host                   
                        TerminalModelType terminalType = TerminalModelType.Model2;
                        wrapper.connectBridge("host dotted IP", portNum, terminalType, "userID", "password, null);
                        
                        //Traverse to our screen and display information about the screen
                        ScreenInformation screen = wrapper.x3270Screen("tchp@E", (String)null, null);
                        
                        System.out.println("Screen Name: " + screen.getName());
                        //Display information about the fields
                        List fields = screen.getFields();
                        int i = 0;
                        for(FieldInformation field : fields)
                        {                               
                                System.out.println("Field #" + i + " name=" + field.getName() + " isProtected=" + field.getAttribute().isProtected());
                                i++;
                        }
                }
                catch(BridgeException e)
                {
                        System.out.println("There was some type of error: " + e.getLocalizedMessage());
                }
                finally
                {
                        //Make sure we clean up by disconnecting
                        if(null != wrapper)
                        {
                                try
                                {
                                        wrapper.disconnect();
                                }
                                catch (BridgeException e)
                                {
                                        //We don't care about disconnect errors, we are done
                                        e = null;
                                }
                        }
                }
        }
}



    


Verastream© Bridge Integrator 4.1