public interface SessionInfo extends Immutable
| Modifier and Type | Method and Description |
|---|---|
void |
applyProperties()
Applies the properties to this session info.
Sets user and password from properties, if given. |
void |
checkServerVersionInfo(Serializable serverVersionInfo)
Checks the version information (of the server).
|
void |
clearCloned()
Cleares the cloned flag.
|
void |
clearPassword()
Clears the password.
Will remove it from memory by overwriting each element in the character array. |
SessionInfo |
clone()
Clones a sessioninfo.
The password will be copied if not null. |
long |
getApplicationId()
Returns the application id.
|
String |
getApplicationName()
Gets the name of the application.
|
Serializable |
getClientVersionInfo()
Gets the client version info.
|
String |
getHostInfo()
Gets the host info.
|
Locale |
getLocale()
Gets the session's locale.
Returns the JVM's default locale if not set explicitly via setLocale(java.util.Locale). |
String |
getOsInfo()
Gets the operating system info.
|
char[] |
getPassword()
Gets the password.
|
String |
getPasswordAsString()
Gets the password as a string.
|
Properties |
getProperties()
Gets the connection properties.
The the properties are not set so far, the method will load the properties file by adding the extension ".properties"
to dbPropertiesName (if it does not contain an extension already).If there is no such file, the properties will be read as a resource according to the classpath. If all failes the db errorhandler will be invoked (which will usually terminate the application). |
String |
getPropertiesName()
Gets the name of the property file.
|
long |
getSince()
Gets the epochal time since when logged in.
|
TimeZone |
getTimeZone()
Gets the timezone.
|
int |
getUserClassId()
Gets the class id of the current user.
|
long |
getUserId()
Gets the user id.
|
String |
getUserName()
Gets the username.
|
String |
getVmInfo()
Gets the info string describing the JVM.
|
boolean |
isCloned()
Checks whether this UserInfo is cloned.
|
void |
setApplicationId(long applicationId)
Sets the application id.
Should be unique among the same application name. |
void |
setApplicationName(String name)
Sets the name of the application.
|
void |
setClientVersionInfo(Serializable clientVersionInfo)
Sets the client's version info.
|
void |
setHostInfo(String hostInfo)
Sets the host info.
|
void |
setLocale(Locale locale)
Sets the session's locale.
|
void |
setOsInfo(String osInfo)
Sets the operating system info.
|
void |
setPassword(char[] password)
Sets the password.
|
void |
setProperties(Properties properties)
Sets the connection properties.
|
void |
setPropertiesName(String propertiesName)
Sets the name of the property file.
(without the extension .properties) |
void |
setSince(long since)
Sets the epochal time since when logged in.
|
void |
setTimeZone(TimeZone timeZone)
Sets the timezone.
|
void |
setUserClassId(int userClassId)
Sets the class id of the current user.
|
void |
setUserId(long userId)
Sets the user id.
|
void |
setUserName(String userName)
Sets the username.
|
void |
setVmInfo(String vmInfo)
Sets the info string describing the JVM.
|
getImmutableLoggingLevel, isImmutable, setImmutable, setImmutableLoggingLevellong getUserId()
void setUserId(long userId)
userId - the object ID of the userint getUserClassId()
void setUserClassId(int userClassId)
userClassId - the class idString getUserName()
void setUserName(String userName)
userName - the name of the userchar[] getPassword()
void setPassword(char[] password)
password - the passwordvoid clearPassword()
String getPasswordAsString()
long getSince()
void setSince(long since)
since - logged in since, null if not logged inString getApplicationName()
void setApplicationName(String name)
name - the namevoid setApplicationId(long applicationId)
applicationId - the optional application idlong getApplicationId()
SessionInfo clone()
void clearCloned()
boolean isCloned()
void setClientVersionInfo(Serializable clientVersionInfo)
clientVersionInfo - the version infoSerializable getClientVersionInfo()
void setProperties(Properties properties)
properties - the connection properties.Properties getProperties()
".properties"
to dbPropertiesName (if it does not contain an extension already).String getPropertiesName()
void setPropertiesName(String propertiesName)
.properties)propertiesName - the filenamevoid applyProperties()
Locale getLocale()
setLocale(java.util.Locale).void setLocale(Locale locale)
locale - the locale, null to use JVM's localeString getVmInfo()
void setVmInfo(String vmInfo)
vmInfo - the jvm infoString getOsInfo()
void setOsInfo(String osInfo)
osInfo - the OS infoString getHostInfo()
void setHostInfo(String hostInfo)
hostInfo - the infoTimeZone getTimeZone()
void setTimeZone(TimeZone timeZone)
timeZone - the timezonevoid checkServerVersionInfo(Serializable serverVersionInfo) throws VersionInfoIncompatibleException
The default implementation does nothing.
serverVersionInfo - the server's version infoVersionInfoIncompatibleException - if versions are not compatibleTentackle - distributed, domain- and model-driven