Package com.kheops.jmap.server
Class JMapServer
java.lang.Object
com.kheops.jmap.server.JMapServer
- All Implemented Interfaces:
JMapServerConstants
,JMapServerEventListener
,EventListener
@ComponentScan({"com.kheops.jmap.server","com.k2.jmapcloud","com.k2.jmap.hibernate","com.k2.jmap.resources"})
public final class JMapServer
extends Object
implements JMapServerConstants, JMapServerEventListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class
final class
final class
-
Field Summary
Fields inherited from interface com.kheops.jmap.server.JMapServerConstants
APPLICATIONS_HOME, CUSTOM_PROJECTIONS_PATH, CUSTOM_STROKES_PATH, ICONS_HOME, JMAPADMIN_FILEBROWSER_ROOTS, JMAPADMIN_HOME, JMAPSRV_ALLOW_UPLOAD, JMAPSRV_API_KEY_BING, JMAPSRV_API_KEY_GOOGLE, JMAPSRV_API_KEY_MAPBOX, JMAPSRV_CACHEPATH_KEY, JMAPSRV_CONF_HOME, JMAPSRV_CONNECTIONPOOL_INACTIVE_ALL, JMAPSRV_DATABASE_CONNECTIONPOOL_INACTIVE, JMAPSRV_DATABASE_CONNECTIONPOOL_TIMEOUT, JMAPSRV_DBPATH_KEY, JMAPSRV_DISK_CACHE_SIZE_KEY, JMAPSRV_DOCUMENTS_PATH, JMAPSRV_EXTENSIONS_PATH, JMAPSRV_EXTENSIONS_PROPS_FILENAME, JMAPSRV_GEOWEBCACHE_PASSWORD_KEY, JMAPSRV_GEOWEBCACHE_URL_KEY, JMAPSRV_GEOWEBCACHE_USERNAME_KEY, JMAPSRV_HIBERNATE_SYSTEM_DIALECT, JMAPSRV_HOME, JMAPSRV_HTTPPROXY_HOST_KEY, JMAPSRV_HTTPPROXY_PASSWORD_KEY, JMAPSRV_HTTPPROXY_PORT_KEY, JMAPSRV_HTTPPROXY_USERNAME_KEY, JMAPSRV_HTTPS_CLIENT_AUTH, JMAPSRV_HTTPS_KEYSTORE_FILE, JMAPSRV_HTTPS_KEYSTORE_PASSWORD, JMAPSRV_HTTPS_KEYSTORE_PASSWORD_ENCRYPTED, JMAPSRV_HTTPS_KEYSTORE_TYPE, JMAPSRV_HTTPS_PORT, JMAPSRV_HTTPS_REDIRECT_ENABLED, JMAPSRV_HTTPS_SCHEME, JMAPSRV_HTTPS_SSL_ENABLED_PROTOCOLS, JMAPSRV_HTTPS_SSL_PROTOCOL, JMAPSRV_IMAGE_CACHE_SIZE_KEY, JMAPSRV_JMAPCLOUD_API_KEY, JMAPSRV_JMAPCLOUD_DEFAULT_OWNER, JMAPSRV_JMAPCLOUD_HOST, JMAPSRV_JMAPCLOUD_ORGANIZATION_ID, JMAPSRV_LOCAL_SERVER_POOLID, JMAPSRV_MAINLOGLEVEL_KEY, JMAPSRV_MAINLOGPATH_KEY, JMAPSRV_MAX_UPLOAD_FILE_SIZE, JMAPSRV_MEM_CACHE_SIZE_KEY, JMAPSRV_PREFERRED_EXTERNAL_ADDRESS, JMAPSRV_PREFERRED_LOCAL_ADDRESS, JMAPSRV_PROPS_FILENAME, JMAPSRV_REMOTE_CONNECTIONPOOL_INACTIVE, JMAPSRV_REMOTE_CONNECTIONPOOL_TIMEOUT, JMAPSRV_REMOTE_LAYER_CACHE_TIMEOUT, JMAPSRV_REMOTE_SDS_CACHE_TIMEOUT, JMAPSRV_REST_API_URL_KEY, JMAPSRV_RLS_CLIENT_ID_KEY, JMAPSRV_RLS_HOST_KEY, JMAPSRV_SDE_CONNECTIONPOOL_TIMEOUT, JMAPSRV_SERVER_DEFAULT_AVAILABLE_LANGUAGES_KEY, JMAPSRV_SERVER_DEFAULT_LANGUAGE_KEY, JMAPSRV_SERVER_TITLE_KEY, JMAPSRV_SERVER_VIEWPOOL_TIMEOUT, JMAPSRV_SERVERADDRESS_KEY, JMAPSRV_SERVERPORT_KEY, JMAPSRV_SESSIONLOGAGELIMIT_KEY, JMAPSRV_SMTPENCRYPTION_KEY, JMAPSRV_SMTPHOST_KEY, JMAPSRV_SMTPPASSWORD_KEY, JMAPSRV_SMTPPORT_KEY, JMAPSRV_SMTPUSERNAME_KEY, JMAPSRV_SPATIAL_DATA_SOURCE_INIT_TIMEOUT, JMAPSRV_STATE_RUNNING, JMAPSRV_STATE_SHUTDOWN, JMAPSRV_STATE_STARTING, JMAPSRV_STATE_STOPPED, JMAPSRV_STATISTIC_CONFIG_CRON, JMAPSRV_SYSDB_MAXUPDATINGTHREADS, JMAPSRV_SYSDBCONFFILE_KEY, JMAPSRV_SYSDBMAXPOOLSIZE_KEY, JMAPSRV_SYSDBPASSWD_KEY, JMAPSRV_SYSDBPOOL_NAME, JMAPSRV_SYSDBPOOLID, JMAPSRV_SYSDBPOOLSIZE_KEY, JMAPSRV_SYSDBRECYCLEPERIOD_KEY, JMAPSRV_SYSDBURL_KEY, JMAPSRV_SYSDBUSER_KEY, JMAPSRV_SYSTEMBACKUP_KEY, JMAPSRV_SYSTEMDATA_NAME, JMAPSRV_THREADPOOLSIZE_KEY, JMAPSRV_TOMCAT_ADDRESS_KEY, JMAPSRV_TOMCAT_AJP13PORT_KEY, JMAPSRV_TOMCAT_MAX_HEADER_SIZE_KEY, JMAPSRV_TOMCAT_MAX_POST_SIZE_KEY, JMAPSRV_TOMCAT_PORT_KEY, JMAPSRV_UPLOAD_ROOT_FOLDER, JMAPSRV_USERDB_NAME, JMAPSRV_USERMANAGER_KEY, JMAPSRV_USERMANAGER_SSO_CALLBACK_URL, JMAPSRV_USERMANAGER_SYNC_INTERVAL, JMAPSRV_USERMANAGER_SYNC_KEY, JMAPSRV_WEB_SERVER_SOCKET_EXTERNAL_URL, JMAPSRV_WEB_SERVER_SOCKET_LOCAL_ENABLED, JMAPSRV_WEB_SERVER_SOCKET_TYPE, JMAPSRV_WORK_PATH, JMAPSRV_WORKERSERVICE_INITIAL_SIZE, JMAPSRV_WORKERSERVICE_KEEP_ALIVE_TIME, JMAPSRV_WORKERSERVICE_MAXIMUM_SIZE, JMAPSRV_WORSPACES_PATH, LOGOS_HOME, MESSAGING_HOME, NO_CONNECTION_POOL, PATTERNS_HOME, PROJECTIONS_PATH, REPORT_ENGINE_HOME, REPORTS_HOME, STROKES_PATH, TOMCAT_APPLICATIONS_HOME, TOMCAT_HOME, TOMCAT_JMAPADMIN_HOME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new Connection Pool info and creates new SDEConnectionPool using the specified ConnPoolInfoaddSdeConnPool
(SdeConnectionPoolInfo info, SdeConnectionPool connPool) Adds the new connection pool info and the associated Connection Poolboolean
checkAdminPermission
(User user) void
void
deleteDatabaseConnectionPool
(int poolId) protected void
void
deleteRemoteConnectionPool
(int poolId) void
deleteSdeConnectionPool
(int id) void
enableExtensions
(String[] requestTypes, boolean isEnabled) protected void
fireStateChangeEvent
(int oldState, int newState) String[]
getAnnotatedClassNames
(Class<? extends Annotation> annotatedWith) String[]
getAnnotatedClassNames
(Class<? extends Annotation> annotatedWith, Class assignableFrom) static String
Returns the buildName that is contained in file 'version'.static String
Returns the build number that is contained in file 'version'.String[]
getDatabaseConfig
(String driverClassName, String url) Returns a DatabaseConfig object that contains the configuration for the specified driver class name.getDatabaseConfigFile
(String driverClassName, String url) Returns a reference to the XML file that contains the configuration for the specified driver class name.Returns all available DatabaseConfig objects which define all databases that can be used with JMap Server.getDBConnPool
(int id) getDBConnPool
(String name) String[]
getExtension
(String reqType) Returns the extension corresponding to the specified request type.Returns the table of registered extensions.static String
Returns the complete version information (eg.static String
Returns the hotfix number that is contained in file 'version'.getImageProducer
(int projectId) protected JMSImageProducer
getImageProducer
(JMapServerProject serverProject) static String
getJMapServerRemoteConnPool
(int id) final LicenseManager
Returns the license manager of this instance of JMap Server.static String
Returns the maintenance number that is contained in file 'version'.static String
Returns the major version string of JMap Server (ex: 2.1)protected List
<Notification> protected org.reflections.Reflections
getSdeConnPool
(int id) getSdeConnPool
(String name) Returns the serial number of this instance of JMap Server.getServerInfo
(long remoteTime) Returns a JMapServerInfo instance which contains information about this JMap Server.String[]
String[]
Deprecated.use server controllers to access and modify the system database.protected List
<UpdateDescriptor> static String
Returns the version number (eg.Hashtable
<?, ?> Hashtable
<?, ?> Returns the WorkSpaces manager.boolean
boolean
static void
void
reInitDatabaseConnectionPools
(int[] poolIds) void
reInitExtensions
(String[] requestTypes) Reinitialize the specified extensions.boolean
reInitSystemDatabase
(JMapServerSysParams newSysParams) boolean
void
void
removeImageProducer
(int projectId) void
boolean
boolean
saveSystemProperties
(Properties properties) Deprecated.useupdateSystemParams(JMapServerSysParams)
instead.void
void
setNoHttp
(boolean flag) Sets the flag that determines if the embedded http server must be started.void
setServerState
(int serverState) void
setUserManager
(UserManager userManager, boolean synchronizePermissions) Sets a new UserManager on JMap Server.void
setUserManagerSynchronization
(UserManagerSynchronizer.Period period, int interval) static void
void
boolean
updateSystemParams
(JMapServerSysParams systemParameters) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.kheops.jmap.server.JMapServerEventListener
afterInitDatabases, beforeInitDatabases
-
Method Details
-
getFullVersion
Returns the complete version information (eg. JMapServer version 4.0.0000).- Returns:
- the version information
-
getVersion
Returns the version number (eg. 4.0.0000).- Returns:
- the version information
-
getJMapHome
-
getBuildNumber
Returns the build number that is contained in file 'version'.- Returns:
- build number
-
getMaintenanceNumber
Returns the maintenance number that is contained in file 'version'.- Returns:
- maintenance number
-
getHotFixNumber
Returns the hotfix number that is contained in file 'version'.- Returns:
- hotfix number
-
getBuildName
Returns the buildName that is contained in file 'version'.- Returns:
- buildName
-
addListener
-
removeListener
-
fireStateChangeEvent
protected void fireStateChangeEvent(int oldState, int newState) -
setServerState
public void setServerState(int serverState) -
clientThreadPutToSleepOccurred
- Specified by:
clientThreadPutToSleepOccurred
in interfaceJMapServerEventListener
-
serverStateChangeOccurred
- Specified by:
serverStateChangeOccurred
in interfaceJMapServerEventListener
-
getDataManager
-
getPersonalDataManager
-
getSystemData
Deprecated.use server controllers to access and modify the system database.Returns an instance to the live configuration database.- Returns:
- an instance to the live configuration database.
-
updateSystemParams
-
getWorkerExecutorService
-
getCipher
-
getDBConnPool
-
getSdeConnPool
-
getSdeConnPool
-
getDBConnPool
-
getJMapServerRemoteConnPool
-
getJMapServerRemoteConnPool
-
getSdeConnPools
-
getExtension
Returns the extension corresponding to the specified request type.- Parameters:
reqType
- the request type
-
getExtensions
Returns the table of registered extensions. -
getUserManager
- Returns:
- The user manager currently in use by JMap Server
-
setUserManager
Sets a new UserManager on JMap Server.- Parameters:
userManager
- the UserManager that will be used to authenticate loginssynchronizePermissions
- a boolean that indicates whether permissions will be synchronized with the new UserManager.
-
setUserManagerSynchronization
-
synchronizeUserManager
public void synchronizeUserManager() -
getSessionManager
-
getSpatialReaders
-
getSpatialDataSources
-
getProjectionManager
-
getSessionLogger
-
getDocumentsManager
-
getContextsManager
-
getElementFactories
-
getDatabaseConfigFile
Returns a reference to the XML file that contains the configuration for the specified driver class name.- Parameters:
driverClassName
- a driver class name.- Returns:
- a reference to the XML file that contains the configuration for the specified driver class name.
-
getDatabaseConfig
Returns a DatabaseConfig object that contains the configuration for the specified driver class name.- Parameters:
driverClassName
- a driver class name.- Returns:
- a DatabaseConfig object that contains the configuration for the specified driver class name.
-
getDatabaseConfigs
Returns all available DatabaseConfig objects which define all databases that can be used with JMap Server.- Returns:
- all available DatabaseConfig objects which define all databases that can be used with JMap Server.
-
getMonitoringInfo
-
reInitSystemDatabase
- Throws:
Exception
-
reInitExtensions
Reinitialize the specified extensions. For each extension, the destroy method will be called followed by a call to the init method.- Parameters:
requestTypes
- the request types for the extensions to reinitialize
-
enableExtensions
-
initCustomSpatialDataSources
public boolean initCustomSpatialDataSources() -
reloadClassParameters
public boolean reloadClassParameters() -
reloadLicense
- Throws:
Exception
-
saveSystemProperties
public boolean saveSystemProperties() -
saveSystemProperties
Deprecated.useupdateSystemParams(JMapServerSysParams)
instead. -
getWorkSpaceManager
Returns the WorkSpaces manager.- Returns:
- WorkSpace manager
-
getMessagingController
-
getLicenseManager
Returns the license manager of this instance of JMap Server.- See Also:
-
getSerialNumber
Returns the serial number of this instance of JMap Server. -
reInitDatabaseConnectionPools
public void reInitDatabaseConnectionPools(int[] poolIds) -
addRemoteConnectionPool
public JMapServerRemoteConnectionPool addRemoteConnectionPool(JMapServerRemoteConnectionPoolInfo poolInfo) -
deleteRemoteConnectionPool
public void deleteRemoteConnectionPool(int poolId) -
addDatabaseConnPool
-
deleteDatabaseConnectionPool
public void deleteDatabaseConnectionPool(int poolId) -
addSdeConnPool
Adds a new Connection Pool info and creates new SDEConnectionPool using the specified ConnPoolInfo- Parameters:
info
- the SdeConnectionPoolInfo- Returns:
- the connection pool
-
addSdeConnPool
Adds the new connection pool info and the associated Connection Pool- Parameters:
info
- the SdeConnectionPoolInfoconnPool
- the specified SdeConnectionPool- Returns:
- the connection pool
-
deleteSdeConnectionPool
public void deleteSdeConnectionPool(int id) -
initRemoteServerConnection
-
setNoHttp
public void setNoHttp(boolean flag) Sets the flag that determines if the embedded http server must be started.- Parameters:
flag
- if true, http server will not be started.
-
checkAdminPermission
-
getWebAdminAllowedUsers
-
getWebAdminAllowedGroups
-
getWebEngine
-
removeImageProducer
public void removeImageProducer(int projectId) -
getImageProducer
-
getImageProducer
-
deleteImageProducers
protected void deleteImageProducers() -
getMajorVersion
Returns the major version string of JMap Server (ex: 2.1)- Returns:
- the major version
-
getServerInfo
Returns a JMapServerInfo instance which contains information about this JMap Server.- Returns:
- a JMapServerInfo instance.
-
getReflections
protected org.reflections.Reflections getReflections() -
getAnnotatedClassNames
-
getAnnotatedClassNames
public String[] getAnnotatedClassNames(Class<? extends Annotation> annotatedWith, Class assignableFrom) -
getCodedValuesProviders
-
getAddress
- Throws:
UnknownHostException
-
getGeoWebCacheManager
-
getUpdateDescriptors
-
getNotifications
-
shutdown
-
main
-