psdi.app.signature

Class MAXSession

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, MboConstants, MboRemote, MaxRemoteProxy


    public class MAXSession
    extends Mbo
    implements MboRemote
    Mbo object to represent MAXSession. A row where IsSystem is False represents an active client connection to MXServer. A row where IsSystem is True represents MXServer's active connection to the database.

    This mbo contains non-persistent attributes.

    See Signature Package description.

    This is a system level object.

    The key attribute for this object is MAXSessionUID.

    The attributes in this object are as follows:

    Attribute NameDescription
    ActiveIdentifies whether the session is active (in SecurityService cache). If SecurityService has timed it out, the session will be inactive.
    AdminLogoutIndicates that a session has been administratively logged out. Administrative logout will set this flag to true. Security Service User Monitor will read this flag, and mark the user's Profile so that further requests to Profile will throw MXAdminLogoutException. Note, even though AdminLogout may be applied to one session, if the user has multiple sessions, they all share the same Profile and will get MXAdminLogoutException. Eventually, the UserMonitor will remove the row from the database.
    ApplicationThis field can be set by external systems such as ERP, MEA, and MS Project when they are connecting.
    ClientAddrAddress of the user's client, from getRemoteAddr.
    ClientHostName of the user's client, from getRemoteHost.
    DisplayNameUser's display name from the Person record.
    IsSystemTrue if this is the session that MXServer connects to the database with. False for all other sessions.
    LastActivityThe timestamp of the last user activity for this session (when issystem = False). This is a persistent attribute that is updated periodically by UserMonitor.
    LoginDateTimeLogin date and time.
    LogOutNon-persistent attribute. True indicates that the session will be terminated upon save of MboSet.
    LogOutAndBlockNon-persistent attribute. True indicates that the session will be terminated and the user Blocked upon save of MboSet.
    MAXSessionUIDIdentifier for this session's connection to MXServer.
    ReloadCacheFor the system session (issystem = True), this indicates the names of any caches that need to be reloaded into memory. After cache has been reloaded, this field is cleared. See MaxSessionThread.
    ServerHostHost name or IP Address of the MXServer for this session.
    ServerNameMXServer name.
    ServerTimestampIf this is the system session (issystem = True), this timestamp is updated periodically to indicate that MXServer is up and running. See MaxSessionThread, mxServerIsUp.
    SystemIdleTimeNon-persistent attribute. HHH:MM:SS representing the elapsed time since the last user activity for this session.
    UserIDUser identifier. Foreign key to MaxUser.
    See Also:
    MaxUser
    • Constructor Detail

      • MAXSession

        public MAXSession(MboSet ms)
                   throws java.rmi.RemoteException
        Construct the MAXSession object
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a mbo, defaulting the attributes shown below.
        Attribute NameAttribute Value
        ActiveTrue
        DisplayNameIf owner is MaxUser, equals Person's displayname
        IsSystemFalse
        LoginDateTimecurrent datetime
        LogOutFalse
        LogOutAndBlockFalse
        ServerHostMXServer.getServerHost
        ServerNameMXServer.getName
        SystemIdleTime00:00:00
        UserIDIf owner is MaxUser, equals owner's UserID
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • toBeSaved

        public boolean toBeSaved()
                          throws java.rmi.RemoteException
        If "logout" or "logoutandblock" is True, then return true, else call super.
        Specified by:
        toBeSaved in interface MboRemote
        Overrides:
        toBeSaved in class Mbo
        Throws:
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)