com.ibm.as400.access

Class JDDataSourceURL

  • All Implemented Interfaces:
    Serializable


    public class JDDataSourceURL
    extends Object
    implements Serializable

    A class representing a URL specifying an IBM i system data source. This is needed to connect before accessing data. The supported syntaxes for the DB2 for IBM i database URL are documented in the comments for AS400JDBCDriver.

    See Also:
    Serialized Form
    • Constructor Detail

      • JDDataSourceURL

        public JDDataSourceURL(String url)
        Constructor.
        Parameters:
        url - The URL to parse.
    • Method Detail

      • getSchema

        public String getSchema()
                         throws SQLException
        Validate and return the schema as it was parsed from the URL. We do validation here since the system does not do any - which results in errors happening later that are difficult to debug.
        Returns:
        URL schema, or null if it is invalid.
        Throws:
        SQLException
      • getServerName

        public String getServerName()
        Get the system name as it was parsed from the URL.
        Returns:
        System name.
      • isPortSpecified

        public boolean isPortSpecified()
        Was a port specified in the URL?
        Returns:
        true if a port was specified.
      • isValid

        public boolean isValid()
        Is the URL valid for access by this JDBC driver?
        Returns:
        true if valid.
      • toString

        public String toString()
        Return the URL as a String.
        Overrides:
        toString in class Object
        Returns:
        The URL as a String.