Package org.compiere.server
Class AdempiereServer
java.lang.Object
org.compiere.server.AdempiereServer
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AcctProcessor
,AlertProcessor
,ReplicationProcessor
,RequestProcessor
,Scheduler
,WorkflowProcessor
Adempiere Server Base
- Version:
- $Id: AdempiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionprotected CLogger
Loggerprotected long
Milliseconds to sleep - 0 Sec defaultprotected long
Server start timeprotected MClient
Clientprotected AdempiereProcessor
The Processor Modelprotected int
Number of Work executionsprotected long
Tine start of workprotected static MSystem
System -
Constructor Summary
ModifierConstructorDescriptionprotected
AdempiereServer
(AdempiereProcessor model, int initialNap) Server Base Class -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doRun()
Run asyncvoid
doRunNow()
Run Nowprotected abstract void
doWork()
Do the actual WorkgetCtx()
Get Server ContextGet the date Last rungetDateNextRun
(boolean requery) Get the date Next runGet Descriptionlong
getLogs()
Get Processor LogsgetModel()
Get ModelgetName()
int
Get Seconds AliveGet Unique IDabstract String
Get Server Infolong
Get Start TimeGet Run Statisticsprotected boolean
static boolean
isOKtoRunOnIP
(AdempiereProcessor model) boolean
Is Sleepingvoid
void
run()
void
runNow()
toString()
String Representation
-
Field Details
-
p_model
The Processor Model -
m_sleepMS
protected long m_sleepMSMilliseconds to sleep - 0 Sec default -
m_start
protected long m_startServer start time -
p_runCount
protected int p_runCountNumber of Work executions -
p_startWork
protected long p_startWorkTine start of work -
log
Logger -
p_system
System -
p_client
Client
-
-
Constructor Details
-
AdempiereServer
Server Base Class- Parameters:
model
- modelinitialNap
- delay time running in sec
-
-
Method Details
-
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() -
doRun
protected void doRun()Run async -
getStatistics
Get Run Statistics- Returns:
- Statistic info
-
doWork
protected abstract void doWork()Do the actual Work -
getServerInfo
Get Server Info- Returns:
- info
-
getServerID
Get Unique ID- Returns:
- Unique ID
-
getDateNextRun
Get the date Next run- Parameters:
requery
- requery database- Returns:
- date next run
-
getDateLastRun
Get the date Last run- Returns:
- date lext run
-
getDescription
Get Description- Returns:
- Description
-
getModel
Get Model- Returns:
- Model
-
isSleeping
public boolean isSleeping()Is Sleeping- Returns:
- sleeping
-
toString
String Representation -
getSecondsAlive
public int getSecondsAlive()Get Seconds Alive- Returns:
- seconds alive
-
getStartTime
Get Start Time- Returns:
- start time
-
getLogs
Get Processor Logs- Returns:
- logs
-
isInterrupted
protected boolean isInterrupted() -
getName
-
isOKtoRunOnIP
-