Class AdempiereServer

java.lang.Object
org.compiere.server.AdempiereServer
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
AcctProcessor, AlertProcessor, ReplicationProcessor, RequestProcessor, Scheduler, WorkflowProcessor

public abstract class AdempiereServer extends Object implements Runnable
Adempiere Server Base
Version:
$Id: AdempiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $
Author:
Jorg Janke
  • Field Details

    • p_model

      protected volatile AdempiereProcessor p_model
      The Processor Model
    • 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 Details

    • AdempiereServer

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

    • 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
    • getModel

      public AdempiereProcessor getModel()
      Get Model
      Returns:
      Model
    • 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
    • getLogs

      public AdempiereProcessorLog[] getLogs()
      Get Processor Logs
      Returns:
      logs
    • isInterrupted

      protected boolean isInterrupted()
    • getName

      public String getName()
    • isOKtoRunOnIP

      public static boolean isOKtoRunOnIP(AdempiereProcessor model)