psdi.app.system

Class CrontaskInstance

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


    public class CrontaskInstance
    extends Mbo
    implements CrontaskInstanceRemote
    The MBO represent crontaskinstance. This is a system level object.

    The key attribute(s) in this object are crontaskname, instancename .

    The attributes in this object are as follows:

    Attribute NameDescription
    crontasknameThe name of the crontask.
    instancenameThe name of the instance.
    scheduleThe string to represent the crontask schedule.
    reloadreqtimeThe time stamp when a reload is needed.
    activeWhether the instance is active. Default is not active.
    descriptionDescription of the crontask instance.
    MBO for contaskdef record.
    • Constructor Detail

      • CrontaskInstance

        public CrontaskInstance(MboSet ms)
                         throws java.rmi.RemoteException
        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
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        An instance can only be removed if it is inactive.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        delete an instance will delete a
        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)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from class: Mbo
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • requestReloadAndFirstRunNow

        public void requestReloadAndFirstRunNow()
                                         throws MXException,
                                                java.rmi.RemoteException
        The action method to set the reloadreqtime timestamp and tells crontask manager to immediately run the first action of the crontask once the request is received.
        Specified by:
        requestReloadAndFirstRunNow in interface CrontaskInstanceRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.syste.CrontaskInstance#requestReloadAndFirstRunNow()
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Upon save, the request time has been modified, it will be updated to a new date that is close to the actual date of the datatase commit, and will be a little ahead to make sure the requset is picked on by the crontask manager in the next polling. If the NEXTRUNTMOVERWRITE time is the same as the request time, that indicates the request is to start the crontask right away, it will be set to the same time as to the new request time. If the NEXTRUNTMOVERWRITE is a future time, it will be kept if it will still be ahead of the new request time.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add(). Active flag will be defaulted to false, the crontask name will be set and the instance's description will be crontaskdef's description. Crontaskparameter will be added.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getCrontaskDef

        public CrontaskDefRemote getCrontaskDef()
                                         throws MXException,
                                                java.rmi.RemoteException
        Return the CrontaskDefRemote and also set its internal reference to the obtained CrontaskDefRemote if it hasn't been set.
        Specified by:
        getCrontaskDef in interface CrontaskInstanceRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.system.CrontaskInstance#CrontaskDefRemote
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        It calls parameter validation Mbo's validate if the mbo exists for the crontask.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException