public abstract class AsyncJobHandler extends java.lang.Object implements AsyncJobHandlerInterface, FixedLoggers
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
AsyncJobHandler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
asyncProcess(MXServer server,
java.lang.String jobName,
java.lang.String jobQueueNum,
java.lang.String Object,
UserInfo ui,
java.lang.String whereClause,
java.util.HashMap<java.lang.String,MaxType> params)
This method performs the Asynchronous operation.
|
static void |
logSql(java.lang.String sql,
java.sql.Connection con)
Convenient method to log the sql
|
static void |
sendAsyncJobEmail(MXServer server,
java.lang.String emailAddress,
UserInfo ui,
java.lang.String level,
java.lang.String jobName,
java.lang.String jobNum,
java.lang.String message) |
static void |
writeAsyncJobMsg(MXServer server,
boolean email,
java.lang.String emailAddress,
UserInfo ui,
java.lang.String jobName,
java.lang.String jobQNum,
java.lang.String msgLevel,
MXException e)
Compose the message of the exception based on the user info and write as the message for this job.
|
static void |
writeAsyncJobMsg(MXServer server,
boolean sendEmail,
java.lang.String emailAddress,
UserInfo ui,
java.lang.String jobName,
java.lang.String jobQNum,
java.lang.String msgLevel,
java.lang.String message)
Write the message to the message table for the passed in asynchronous job.
|
static void |
writeAsyncJobMsg(MXServer server,
boolean email,
java.lang.String emailAddress,
UserInfo ui,
java.lang.String jobName,
java.lang.String jobQNum,
java.lang.String msgLevel,
java.lang.String msgGrp,
java.lang.String msgKey,
java.lang.Object[] params)
Compose the message of the message group and key based on the user info and write as the message for this job.
|
public abstract void asyncProcess(MXServer server, java.lang.String jobName, java.lang.String jobQueueNum, java.lang.String Object, UserInfo ui, java.lang.String whereClause, java.util.HashMap<java.lang.String,MaxType> params) throws MXException, java.rmi.RemoteException
AsyncJobHandlerInterface
asyncProcess
in interface AsyncJobHandlerInterface
jobName
- The name of the job.jobQueueNum
- The identifier of the job in the job queue.Object
- The name of the main object that the async process is performed on.whereClause
- The where clause applied on the main objects to identify one or more objects that the
async process is performed on.params
- A hash map of all the other parameters need to run the async job. The keys are the parameter names
and the values are the MaxTypeObjectMXException
java.rmi.RemoteException
public static void writeAsyncJobMsg(MXServer server, boolean sendEmail, java.lang.String emailAddress, UserInfo ui, java.lang.String jobName, java.lang.String jobQNum, java.lang.String msgLevel, java.lang.String message) throws MXException, java.rmi.RemoteException
server
- jobName
- jobQNum
- msgLevel
- message
- MXException
java.rmi.RemoteException
public static void logSql(java.lang.String sql, java.sql.Connection con) throws java.rmi.RemoteException, MXException
sql
- con
- java.rmi.RemoteException
MXException
public static void writeAsyncJobMsg(MXServer server, boolean email, java.lang.String emailAddress, UserInfo ui, java.lang.String jobName, java.lang.String jobQNum, java.lang.String msgLevel, MXException e) throws MXException, java.rmi.RemoteException
server
- ui
- jobName
- jobQNum
- msgLevel
- e
- MXException
java.rmi.RemoteException
public static void sendAsyncJobEmail(MXServer server, java.lang.String emailAddress, UserInfo ui, java.lang.String level, java.lang.String jobName, java.lang.String jobNum, java.lang.String message)
public static void writeAsyncJobMsg(MXServer server, boolean email, java.lang.String emailAddress, UserInfo ui, java.lang.String jobName, java.lang.String jobQNum, java.lang.String msgLevel, java.lang.String msgGrp, java.lang.String msgKey, java.lang.Object[] params) throws MXException, java.rmi.RemoteException
server
- ui
- jobName
- jobQNum
- msgLevel
- msgGrp
- msgKey
- params
- MXException
java.rmi.RemoteException