public abstract class SessionFactory
extends java.lang.Object
Session
.Session
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTENSIONS_AUTOLOAD_DIRECTORY_PROPERTY
Configuration property which identifies the autoload directory for extensions.
|
static java.lang.String |
NATIVE_LIBRARY_SUFFIX_PROPERTY
Configuration property which specifies the platform suffix for native libraries.
|
static java.lang.String |
SERVER_INSTALLATION_DIRECTORY_PROPERTY
Configuration property which identifies the installation directory of the local server.
|
Modifier | Constructor and Description |
---|---|
protected |
SessionFactory()
Default constructor used by sub-classes of SessionFactory.
|
Modifier and Type | Method and Description |
---|---|
abstract Session |
create(java.util.Locale locale)
Creates a new session using the specified locale.
|
abstract Session |
create(java.util.Locale locale,
ServerConnectionDescriptor serverDescriptor)
Creates a new session using the specified locale.
|
abstract Session |
create(java.util.Locale locale,
ServerConnectionDescriptor serverDescriptor,
RepositoryConnectionDescriptor repositoryDescriptor)
Creates a new session using the specified locale.
|
abstract Session |
create(java.util.Locale locale,
ServerConnectionDescriptor serverDescriptor,
RepositoryConnectionDescriptor repositoryDescriptor,
ASCredentialDescriptor asConnectionDescriptor)
Create a new sessio using the sepcified locale, The session is automatically
connected to the specified server
|
abstract AdministratorSession |
createAdministratorSession(java.util.Locale locale,
ServerConnectionDescriptor serverDescriptor)
Creates a new admin session using the specified locale.
|
abstract ServerConnectionDescriptor |
createServerConnectionDescriptor(java.lang.String hostName,
int port,
java.lang.String dataDirectory,
boolean useSSL,
boolean useSSO,
byte[] token)
Creates a new server connection descriptor using the supplied arguments.
|
abstract ServerConnectionDescriptor |
createServerConnectionDescriptor(java.lang.String hostName,
int port,
java.lang.String userName,
java.lang.String password,
java.lang.String domain,
java.lang.String dataDirectory)
Creates a new server connection descriptor using the supplied arguments.
|
abstract ServerConnectionDescriptor |
createServerConnectionDescriptor(java.lang.String hostName,
int port,
java.lang.String userName,
java.lang.String password,
java.lang.String domain,
java.lang.String dataDirectory,
boolean useSsl)
Creates a new server connection descriptor using the supplied arguments.
|
abstract ApplicationData |
getApplicationData()
Returns the application data.
|
static SessionFactory |
getInstance()
Creates the shared instance of the SessionFactory.
|
static java.lang.String |
getProperty(java.lang.String key)
Returns the value of the specified configuration property obtained from
one of the following sources, in order of precedence:
The value set by
setProperty(String, String)
The value of the corresponding Java system property
Returns null if the property has no value or if the system
property cannot be read for any reason. |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the value of the specified configuration property obtained from
one of the following sources, in order of precedence:
The value set by
setProperty(String, String)
The value of the corresponding Java system property
Returns the specified default value if the property has no value or
if the system property cannot be read for any reason. |
static Session |
getPSAPISession(SystemSession session)
Converts a system session to a full session.
|
abstract void |
notifyApplicationShutdown()
Called by the owner application to notify the SessionFactory that the application is shutting down.
|
abstract void |
notifyApplicationStartup()
Called by the owner application to notify the SessionFactory that the application has started up.
|
abstract void |
setApplicationData(ApplicationData applicationData)
Sets the application data.
|
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value of the specified configuration property.
|
public static final java.lang.String EXTENSIONS_AUTOLOAD_DIRECTORY_PROPERTY
public static final java.lang.String NATIVE_LIBRARY_SUFFIX_PROPERTY
Obsolete as of Modeler API 13.0 which no longer uses native libraries.
public static final java.lang.String SERVER_INSTALLATION_DIRECTORY_PROPERTY
protected SessionFactory()
public static SessionFactory getInstance() throws ObjectCreationException
ObjectCreationException
- if the SessionFactory instance cannot
be created.public abstract void notifyApplicationStartup()
public abstract void notifyApplicationShutdown()
public abstract void setApplicationData(ApplicationData applicationData)
applicationData
- the application datagetApplicationData()
public abstract ApplicationData getApplicationData()
setApplicationData(ApplicationData)
public abstract Session create(java.util.Locale locale) throws SessionException
locale
- the locale to be usedSession
SessionException
- if the session could not be created.create(Locale, ServerConnectionDescriptor)
,
Session
,
ServerConnectionDescriptor
public abstract Session create(java.util.Locale locale, ServerConnectionDescriptor serverDescriptor) throws SessionException, ServerConnectionException
locale
- the locale to be usedserverDescriptor
- the server that the Session should be connected toSession
SessionException
- if the session could not be created.ServerConnectionException
- if a connection to the specified server could
not be established.create(Locale)
,
Session
,
ServerConnectionDescriptor
public abstract Session create(java.util.Locale locale, ServerConnectionDescriptor serverDescriptor, RepositoryConnectionDescriptor repositoryDescriptor) throws SessionException, ServerConnectionException
locale
- the locale to be usedserverDescriptor
- the server that the Session should be connected torepositoryDescriptor
- the repository server that the Session should be connected toSession
SessionException
- if the session could not be created.ServerConnectionException
- if a connection to the specified server could
not be established.create(Locale)
,
Session
,
ServerConnectionDescriptor
public abstract Session create(java.util.Locale locale, ServerConnectionDescriptor serverDescriptor, RepositoryConnectionDescriptor repositoryDescriptor, ASCredentialDescriptor asConnectionDescriptor) throws SessionException, ServerConnectionException
locale
- locale the locale to be usedserverDescriptor
- serverDescriptor the server that the Session should be connected torepositoryDescriptor
- the repository server that the Session should be connected toasConnectionDescriptor
- the analytic server credential that the session should use to connect analytic serverSession
SessionException
- if the session could not be created.ServerConnectionException
- if a connection to the specified server could not be establishedcreate(Locale)
,
Session
,
ServerConnectionException
public abstract AdministratorSession createAdministratorSession(java.util.Locale locale, ServerConnectionDescriptor serverDescriptor) throws SessionException, ServerConnectionException, ServerAdministrationException
locale
- the locale to be usedserverDescriptor
- the server that the Session should be connected toSession
SessionException
- if the session could not be created.ServerConnectionException
- if a connection to the specified server could
not be established.ServerAdministrationException
create(Locale)
,
AdministratorSession
,
ServerConnectionDescriptor
public abstract ServerConnectionDescriptor createServerConnectionDescriptor(java.lang.String hostName, int port, java.lang.String userName, java.lang.String password, java.lang.String domain, java.lang.String dataDirectory)
hostName
- the host machine name to be usedport
- the port number to be useduserName
- the user name to be usedpassword
- the passworddomain
- the login domain name to be useddataDirectory
- the data directory to be usedServerConnectionDescriptor
create(Locale, ServerConnectionDescriptor)
,
ServerConnectionDescriptor
public abstract ServerConnectionDescriptor createServerConnectionDescriptor(java.lang.String hostName, int port, java.lang.String dataDirectory, boolean useSSL, boolean useSSO, byte[] token)
hostName
- the host machine name to be usedport
- the port number to be useddataDirectory
- the data directory to be useduseSSL
- true
to establish a secure connection using SSLuseSSO
- true
to establish a connection with SSOtoken
- the Kerberos token to be usedServerConnectionDescriptor
create(Locale, ServerConnectionDescriptor)
,
ServerConnectionDescriptor
public abstract ServerConnectionDescriptor createServerConnectionDescriptor(java.lang.String hostName, int port, java.lang.String userName, java.lang.String password, java.lang.String domain, java.lang.String dataDirectory, boolean useSsl)
hostName
- the host machine name to be usedport
- the port number to be useduserName
- the user name to be usedpassword
- the passworddomain
- the login domain name to be useddataDirectory
- the data directory to be useduseSsl
- true
to establish a secure connection using SSLServerConnectionDescriptor
create(Locale, ServerConnectionDescriptor)
,
ServerConnectionDescriptor
public static java.lang.String getProperty(java.lang.String key)
setProperty(String, String)
null
if the property has no value or if the system
property cannot be read for any reason.key
- the property namenull
if the property has no valueSystem.getProperty(String)
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
setProperty(String, String)
key
- the property namedefaultValue
- the value to return if the property has no valueSystem.getProperty(String)
public static void setProperty(java.lang.String key, java.lang.String value)
To be effective, configuration properties must be set before
the first call to getInstance()
.
key
- the property namevalue
- the property valuepublic static Session getPSAPISession(SystemSession session)
session
- Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.