Interface IZOSHost

  • All Superinterfaces:
    IHost

    public interface IZOSHost
    extends IHost
    A z/OS host is used to create connections to a z/OS host.

    z/OS hosts can be created using the HostFactory class.

    Note: If using the HostFactory in a plug-in running in a Topaz Workbench installation, the protocol and timeout parameters will be overridden by any matching host configured in the Topaz Workbench client.

    When creating plug-ins to be ran in a Topaz Workbench installation, it is suggested that you obtain z/OS hosts defined in the Topaz Workbench client using the com.compuware.api.topaz.eclipse.hosts.HostManager class from the com.compuware.api.topaz.eclipse plug-in.

    Examples:
    When using the Topaz API outside of a Topaz Workbench installation, implementations of the IZOSHost interface can be created using the HostFactory class.

    To create an instance of a z/OS host:

     String host = ...
     int port = ...
     Protocol protocol = ...
     int timeoutSeconds = ...
     
     IZOSHost zosHost = HostFactory.createZOSHost(host, port, protocol, timeoutSeconds);
     
    When using the Topaz API in a plug-in running in a Topaz Workbench installation, it is suggested to retrieve IZOSHost instances using the HostManager class from the com.compuware.api.topaz.eclipse plug-in.

    To retrieve a list of all z/OS hosts defined in the Topaz Workbench client:

     // get an IHostManager
     IHostManager hostManager = HostManager.getInstance();
     
     // get all defined hosts, an empty list is returned if none are defined
     List<IZOSHost> zosHostList = hostManager.getZOSHosts();
     
    To retrieve a single z/OS host defined in the Topaz Workbench client:
     String host = ...
     int port = ...
     
     // get an IHostManager
     IHostManager hostManager = HostManager.getInstance();
     
     // find z/OS host, null is returned if this host is not defined
     IZOSHost zosHost = hostManager.findZOSHost(host, port);
     
    For examples on how to connect to a host with an IZOSHostConnection see IZOSHostConnection.
    For examples on how to work with a z/OS user program using an IZOSUserProgramConnection see IZOSUserProgramConnection.
    Since:
    1.0.0
    Version:
    2.0.0
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • getPort

        int getPort()
        Returns the port of this host as specified in its definition.
        Returns:
        the port
        Since:
        1.0.0
      • createZOSUserProgramConnection

        IZOSUserProgramConnection createZOSUserProgramConnection()
        Creates a z/OS user program connection to be used for connecting to this z/OS host.

        The IZOSUserProgramConnection returned is not initially connected to this z/OS host. A connection will be established when IZOSUserProgramConnection.launchUserProgram(IZOSCredentials, String, String) is called.

        The IZOSUserProgramConnection is meant to be used for launching and communicating with a z/OS user program.

        Returns:
        a z/OS user program connection
        Since:
        1.0.0