Class ZosConnectionFactory


  • public class ZosConnectionFactory
    extends Object
    Factory class for creating ZosConnection objects with different authentication types
    Version:
    4.0
    Author:
    Frank Giordano
    • Method Detail

      • createBasicConnection

        public static ZosConnection createBasicConnection​(String host,
                                                          String port,
                                                          String user,
                                                          String password)
        Creates a ZosConnection with basic authentication
        Parameters:
        host - Host address of the z/OSMF server
        port - Port number of the z/OSMF server
        user - Username for authentication
        password - Password for authentication
        Returns:
        ZosConnection configured for basic authentication
      • createTokenConnection

        public static ZosConnection createTokenConnection​(String host,
                                                          String port,
                                                          kong.unirest.core.Cookie token)
        Creates a ZosConnection with token authentication
        Parameters:
        host - Host address of the z/OSMF server
        port - Port number of the z/OSMF server
        token - Authentication token cookie
        Returns:
        ZosConnection configured for token authentication
      • createSslConnection

        public static ZosConnection createSslConnection​(String host,
                                                        String port,
                                                        String certFilePath,
                                                        String certPassword)
        Creates a ZosConnection with SSL certificate authentication
        Parameters:
        host - Host address of the z/OSMF server
        port - Port number of the z/OSMF server
        certFilePath - Path to the certificate file (.p12)
        certPassword - Password for the certificate
        Returns:
        ZosConnection configured for SSL authentication
      • createSslConnection

        public static ZosConnection createSslConnection​(String host,
                                                        String port,
                                                        String certFilePath,
                                                        String certPassword,
                                                        boolean isSecure)
        Creates a ZosConnection with SSL certificate authentication with isSecure
        Parameters:
        host - Host address of the z/OSMF server
        port - Port number of the z/OSMF server
        certFilePath - Path to the certificate file (.p12)
        certPassword - Password for the certificate
        isSecure - Flag indicating to verify the authenticity of the server's certificate
        Returns:
        ZosConnection configured for SSL authentication