public abstract class GateWorker
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
protected java.sql.Connection |
con |
protected Gate |
gate |
protected java.lang.StringBuilder |
gateErrors |
protected GateType |
gateType |
protected java.util.Map<java.lang.Integer,GateType> |
gateTypeMap |
protected org.apache.log4j.Logger |
log |
protected int |
mid |
protected java.util.Map<java.lang.Integer,RuleType> |
ruleTypeMap |
protected java.util.List<UserStatus> |
statusList |
Constructor and Description |
---|
GateWorker() |
Modifier and Type | Method and Description |
---|---|
void |
addUserStatus(int contractId,
int status,
RuleType ruleType,
GateType gateType,
UserGateRule rule,
int mid) |
void |
doParentSync() |
protected abstract void |
doSync() |
Gate |
getGate() |
java.lang.String |
getGateErrors() |
void |
init(Gate gate,
java.util.Map<java.lang.Integer,RuleType> ruleTypeMap,
java.util.Map<java.lang.Integer,GateType> gateTypeMap,
int mid) |
boolean |
isWorking() |
void |
parentSync(Gate child,
GateWorker childWorker) |
void |
run() |
protected void |
runSync() |
void |
setGateErrors(java.lang.StringBuilder gateErrors) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected int mid
protected Gate gate
protected final org.apache.log4j.Logger log
protected java.sql.Connection con
protected java.lang.StringBuilder gateErrors
protected java.util.List<UserStatus> statusList
protected java.util.Map<java.lang.Integer,RuleType> ruleTypeMap
protected java.util.Map<java.lang.Integer,GateType> gateTypeMap
protected GateType gateType
public void init(Gate gate, java.util.Map<java.lang.Integer,RuleType> ruleTypeMap, java.util.Map<java.lang.Integer,GateType> gateTypeMap, int mid)
public void addUserStatus(int contractId, int status, RuleType ruleType, GateType gateType, UserGateRule rule, int mid)
public java.lang.String getGateErrors()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void runSync() throws bsh.EvalError, java.io.IOException
bsh.EvalError
java.io.IOException
public boolean isWorking()
protected abstract void doSync()
public Gate getGate()
public void doParentSync() throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, bsh.EvalError, java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
bsh.EvalError
java.io.IOException
public void parentSync(Gate child, GateWorker childWorker)
public void setGateErrors(java.lang.StringBuilder gateErrors)