Class DataConnectionConfig

    • Constructor Detail

      • DataConnectionConfig

        public DataConnectionConfig()
      • DataConnectionConfig

        public DataConnectionConfig​(java.lang.String name)
    • Method Detail

      • setName

        public DataConnectionConfig setName​(java.lang.String name)
        Sets the name of this data connection, the name must be unique.
        Specified by:
        setName in interface NamedConfig
        Returns:
        this DataConnectionConfig
      • getName

        public java.lang.String getName()
        Returns the name of this data connection.
        Specified by:
        getName in interface NamedConfig
        Returns:
        the name of this data connection
      • getType

        public java.lang.String getType()
        Returns the type of the DataConnection
      • isShared

        public boolean isShared()
        true if an instance of the data connection will be reused. false when on each usage the data connection instance should be created. The default is true
        Returns:
        if the data connection instance should be reused
      • setShared

        public DataConnectionConfig setShared​(boolean shared)
        true if an instance of the data connection will be reused. false when on each usage the data connection instance should be created
        Parameters:
        shared - if the data connection instance should be reused
        Returns:
        this DataConnectionConfig
      • getProperties

        public java.util.Properties getProperties()
        Returns all the properties of a data connection
        Returns:
        all the properties of a data connection
      • getProperty

        @Nullable
        public java.lang.String getProperty​(java.lang.String key)
        Returns a single property of a data connection
        Parameters:
        key - the property key of a data connection
        Returns:
        property value or null if the given key doesn't exist
      • getProperty

        @Nullable
        public java.lang.String getProperty​(java.lang.String key,
                                            java.lang.String defaultValue)
        Returns a single property of a data connection
        Parameters:
        key - the property key of a data connection
        Returns:
        property value or default value if the given key doesn't exist
      • setProperty

        public DataConnectionConfig setProperty​(java.lang.String key,
                                                java.lang.String value)
        Sets a single property. See setProperties(Properties)
        Parameters:
        key - the property key
        value - the property value
        Returns:
        this DataConnectionConfig
      • setProperties

        public DataConnectionConfig setProperties​(java.util.Properties properties)
        Sets the properties of a data connection. See implementations of DataConnection for supported values
        Parameters:
        properties - the properties to be set
        Returns:
        this DataConnectionConfig
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
      • readData

        public void readData​(ObjectDataInput in)
                      throws java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.