Class AdempiereServer

    • Field Detail

      • m_sleepMS

        protected long m_sleepMS
        Milliseconds to sleep - 0 Sec default
      • m_start

        protected long m_start
        Server start time
      • p_runCount

        protected int p_runCount
        Number of Work executions
      • p_startWork

        protected long p_startWork
        Tine start of work
      • log

        protected transient CLogger log
        Logger
      • p_system

        protected static volatile MSystem p_system
        System
      • p_client

        protected MClient p_client
        Client
    • Constructor Detail

      • AdempiereServer

        protected AdempiereServer​(AdempiereProcessor model,
                                  int initialNap)
        Server Base Class
        Parameters:
        model - model
        initialNap - delay time running in sec
    • Method Detail

      • getCtx

        public Properties getCtx()
        Get Server Context
        Returns:
        context
      • recalculateSleepMS

        public void recalculateSleepMS()
      • getSleepMS

        public long getSleepMS()
        Returns:
        Returns the sleepMS.
      • getInitialNap

        public long getInitialNap()
      • runNow

        public void runNow()
      • doRunNow

        public void doRunNow()
        Run Now
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • doRun

        protected void doRun()
        Run async
      • getStatistics

        public String getStatistics()
        Get Run Statistics
        Returns:
        Statistic info
      • doWork

        protected abstract void doWork()
        Do the actual Work
      • getServerInfo

        public abstract String getServerInfo()
        Get Server Info
        Returns:
        info
      • getServerID

        public String getServerID()
        Get Unique ID
        Returns:
        Unique ID
      • getDateNextRun

        public Timestamp getDateNextRun​(boolean requery)
        Get the date Next run
        Parameters:
        requery - requery database
        Returns:
        date next run
      • getDateLastRun

        public Timestamp getDateLastRun()
        Get the date Last run
        Returns:
        date lext run
      • getDescription

        public String getDescription()
        Get Description
        Returns:
        Description
      • isSleeping

        public boolean isSleeping()
        Is Sleeping
        Returns:
        sleeping
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class Object
        Returns:
        info
      • getSecondsAlive

        public int getSecondsAlive()
        Get Seconds Alive
        Returns:
        seconds alive
      • getStartTime

        public Timestamp getStartTime()
        Get Start Time
        Returns:
        start time
      • isInterrupted

        protected boolean isInterrupted()
      • getName

        public String getName()