Interface EntityServerConfiguration

    • Field Detail

      • LOG

        static final org.slf4j.Logger LOG
      • DEFAULT_SERVER_CONNECTION_LIMIT

        static final int DEFAULT_SERVER_CONNECTION_LIMIT
        See Also:
        Constant Field Values
      • SERVER_CONNECTION_LIMIT

        static final PropertyValue<Integer> SERVER_CONNECTION_LIMIT
        Specifies maximum number of concurrent connections the server accepts
        -1 indicates no limit and 0 indicates a closed server. Value type: Integer
        Default value: -1
      • SERVER_CONNECTION_POOL_FACTORY_CLASS

        static final PropertyValue<String> SERVER_CONNECTION_POOL_FACTORY_CLASS
        Specifies the class name of the connection pool factory to user.
        Value type: String
        Default value: none
        See Also:
        ConnectionPoolFactory
      • SERVER_CLIENT_CONNECTION_TIMEOUT

        static final PropertyValue<String> SERVER_CLIENT_CONNECTION_TIMEOUT
        Specifies the default client connection timeout (ms) in a comma separated list. Example: is.codion.demos.empdept.client.ui.EmpDeptAppPanel:60000,is.codion.demos.chinook.ui.ChinookAppPanel:120000 Value type: String
        Default value: none
      • SERVER_CLIENT_LOGGING_ENABLED

        static final PropertyValue<Boolean> SERVER_CLIENT_LOGGING_ENABLED
        The initial connection logging status on the server, either true (on) or false (off)
        Value type: Boolean
        Default value: false
      • SERVER_CONNECTION_POOLING_STARTUP_POOL_USERS

        static final PropertyValue<String> SERVER_CONNECTION_POOLING_STARTUP_POOL_USERS
        Specifies a comma separated list of username:password combinations for which to create connection pools on startup Example: scott:tiger,john:foo,paul:bar
      • SERVER_DOMAIN_MODEL_CLASSES

        static final PropertyValue<String> SERVER_DOMAIN_MODEL_CLASSES
        Specifies a comma separated list of domain model class names, these classes must be available on the server classpath
    • Method Detail

      • getDatabase

        Database getDatabase()
        Returns:
        the Database implementation
      • getAdminUser

        User getAdminUser()
        Returns:
        the admin user
      • getConnectionLimit

        Integer getConnectionLimit()
        Returns:
        the maximum number of concurrent connections, -1 for no limit
      • getClientLoggingEnabled

        Boolean getClientLoggingEnabled()
        Returns:
        true if client logging should be enabled on startup
      • getConnectionTimeout

        Integer getConnectionTimeout()
        Returns:
        the idle connection timeout
      • getConnectionPoolProvider

        String getConnectionPoolProvider()
        Returns:
        the connection pool provider classname
      • getDomainModelClassNames

        Collection<String> getDomainModelClassNames()
        Returns:
        the domain model classes to load on startup
      • getStartupPoolUsers

        Collection<User> getStartupPoolUsers()
        Returns:
        the users for which to initialize connection pools on startup
      • getClientSpecificConnectionTimeouts

        Map<String,​Integer> getClientSpecificConnectionTimeouts()
        Returns:
        client specific connection timeouts, mapped to clientTypeId
      • setDatabase

        void setDatabase​(Database database)
        Parameters:
        database - the Database implementation
      • setAdminUser

        void setAdminUser​(User adminUser)
        Parameters:
        adminUser - the admin user
      • setConnectionLimit

        void setConnectionLimit​(Integer connectionLimit)
        Parameters:
        connectionLimit - the maximum number of concurrent connections, -1 for no limit
      • setClientLoggingEnabled

        void setClientLoggingEnabled​(Boolean clientLoggingEnabled)
        Parameters:
        clientLoggingEnabled - if true then client logging is enabled on startup
      • setConnectionTimeout

        void setConnectionTimeout​(Integer connectionTimeout)
        Parameters:
        connectionTimeout - the idle connection timeout
      • setConnectionPoolProvider

        void setConnectionPoolProvider​(String connectionPoolProvider)
        Parameters:
        connectionPoolProvider - the connection pool provider classname
      • setDomainModelClassNames

        void setDomainModelClassNames​(Collection<String> domainModelClassNames)
        Parameters:
        domainModelClassNames - the domain model classes to load on startup
      • setStartupPoolUsers

        void setStartupPoolUsers​(Collection<User> startupPoolUsers)
        Parameters:
        startupPoolUsers - the users for which to initialize connection pools on startup
      • setClientSpecificConnectionTimeouts

        void setClientSpecificConnectionTimeouts​(Map<String,​Integer> clientSpecificConnectionTimeouts)
        Parameters:
        clientSpecificConnectionTimeouts - client specific connection timeouts, mapped to clientTypeId
      • configuration

        static EntityServerConfiguration configuration​(int serverPort,
                                                       int registryPort)
        Parameters:
        serverPort - the server port
        registryPort - the registry port
        Returns:
        a default entity connection server configuration
      • fromSystemProperties

        static EntityServerConfiguration fromSystemProperties()
        Parses configuration from system properties.
        Returns:
        the server configuration according to system properties