Interface EntityConnectionProvider

    • Method Detail

      • entities

        Entities entities()
        Returns the domain entities this connection is based on
        Returns:
        the underlying domain entities
      • connection

        EntityConnection connection()
        Provides a EntityConnection object, is responsible for returning a healthy EntityConnection object, that is, it must reconnect an invalid connection whether remotely or locally
        Returns:
        a EntityConnection instance
      • connectionType

        String connectionType()
        Returns a String specifying the type of connection provided by this connection provider
        Returns:
        a String specifying the type of connection, e.g. "local" or "remote"
      • description

        String description()
        Returns:
        a short description of the database provider
      • isConnected

        boolean isConnected()
        Returns:
        true if a connection has been established, note that this does not check if the actual connection is valid, only that one has been established.
        See Also:
        isConnectionValid()
      • isConnectionValid

        boolean isConnectionValid()
        Returns:
        true if a connection has been establised and the connection is in a valid state
      • addOnConnectListener

        void addOnConnectListener​(EventDataListener<EntityConnection> listener)
        Adds a listener notified each time this connection provider establishes a connection to the database
        Parameters:
        listener - a listener notified when a connection is established
      • removeOnConnectListener

        void removeOnConnectListener​(EventDataListener<EntityConnection> listener)
        Removes the given listener
        Parameters:
        listener - the listener to remove
      • close

        void close()
        Logs out, disconnects and performs cleanup if required
        Specified by:
        close in interface AutoCloseable
      • user

        User user()
        Returns:
        the user used by this connection provider
      • domainClassName

        String domainClassName()
        Returns:
        the domain model classname
      • clientId

        UUID clientId()
        Returns:
        the UUID identifying this client connection
      • clientTypeId

        String clientTypeId()
        Returns:
        the String identifying the client type for this connection provider
      • clientVersion

        Version clientVersion()
        Returns:
        the client version