Establishing a Host Connection
With the Attachmate e-Vantage Airlines SDK objects, you always access a host using the same steps, regardless of which application or development tool you are using. This topic includes the procedure, and, most importantly, introduces you to the objects essential for connecting to a host: the SessionLoader object, and the Screen object specific to your host type.
||Prior to creating your server-based custom application, you may want to install e-Vantage Host Access Server (HAS) Management and create a configuration and WebView for your application to use. For more detailed information see Defining a Configuration and WebView.
Two Attachmate e-Vantage Airlines SDK objects are required to connect to a host:
- The SessionLoader object instantiates a fully configured Screen object, using the configuration and WebView you have previously defined in e-Vantage HAS Management.
- The Screen object provides access to the host session. There is a screen type package for each type of host: ScreenAlc, ScreenTn3270, ScreenTn5250, ScreenT27, ScreenUts, and ScreenVt. These screen type packages are documented in the Attachmate e-Vantage Airlines SDK Javadoc.
|To establish a connection to a host from within your application
- Reference the Attachmate e-Vantage Airlines SDK objects from your application development tool.
For instructions on referencing objects from several popular development tools, see the appropriate section available from Development Tools Supported.
- From within your application:
- Create an instance of the SessionLoader object.
- Request a Screen object for the specific WebView you are using. Remember, the Screen object is specific to the host type with which you want to interact.
Refer to the code examples provided for the requestScreen and requestScreenEx methods of the SessionLoader object for examples of how you can complete these two tasks within your application.
- Once you have instantiated the SessionLoader object and obtained a Screen object, you can interact with the host session using any of the methods provided by that Screen object.
See the Attachmate e-Vantage Airlines SDK Javadoc for details about the available Screen object methods. Many of the methods contain multiple code examples for supported programming languages; those with only one example work similarly in all languages.