Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
LogWriter(LogQueue logQueue,
DataAccessManager dataAccessManager)
Constructor accepting a queue of logs.
|
Modifier and Type | Method and Description |
---|---|
void |
addLog(String resourcePath,
String userName,
int action,
String actionData)
Adds log record to queue
|
LogQueue |
getLogQueue()
Obtains the queue for holding and retrieving logs.
|
boolean |
isCanWriteLogs() |
void |
logWrite() |
void |
run()
The main business logic.
|
void |
setCanWriteLogs(boolean canWriteLogs) |
void |
setLogQueue(LogQueue logQueue)
Sets the queue for holding and retrieving logs.
|
void |
start()
Starts writing logs.
|
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, stop, stop, suspend, toString, yield
public LogWriter(LogQueue logQueue, DataAccessManager dataAccessManager)
logQueue
- the queue of logs.dataAccessManager
- the manager class that can be used to obtain access to the back-end
database.public boolean isCanWriteLogs()
public void setCanWriteLogs(boolean canWriteLogs)
public void setLogQueue(LogQueue logQueue)
logQueue
- the queue for holding and retrieving logs.public LogQueue getLogQueue()
public void run()
public void logWrite()
public void addLog(String resourcePath, String userName, int action, String actionData) throws RegistryException
resourcePath
- the resource path.userName
- the name of the user who performed the action on the resource.action
- an identifier of the action that happened.actionData
- the data for further information.RegistryException
- if the operation failed.Copyright © 2015 WSO2 Inc. All Rights Reserved.