public interface WandoraToolLogger extends TopicMapLogger
WandoraTool
classes.Modifier and Type | Field and Description |
---|---|
static int |
CLOSE
Constant defines logger state.
|
static int |
EXECUTE
Constant defines logger state.
|
static int |
INVISIBLE
Constant defines logger state.
|
static int |
VISIBLE
Constant defines logger state.
|
static int |
WAIT
Constant defines logger state.
|
Modifier and Type | Method and Description |
---|---|
boolean |
forceStop()
Logger should have a mechanism to receive user interruption.
|
java.lang.String |
getHistory()
Returns all collected logs as a string.
|
int |
getState()
Returns logger's current state.
|
void |
hlog(java.lang.String message)
Logs given string but doesn't add the string to logger history.
|
void |
lockLog(boolean lock)
Should the logger change current log message? If true, the log should
keep the current message visible although new log data is generated.
|
void |
log(java.lang.Error e)
Logs given error.
|
void |
log(java.lang.Exception e)
Logs given exception.
|
void |
log(java.lang.String message)
Logs given string and adds the string to log history.
|
void |
log(java.lang.String message,
java.lang.Exception e)
Logs given string and exception.
|
void |
setLogTitle(java.lang.String title)
Logging system may have a title.
|
void |
setProgress(int n)
Logger may view progress information for operation.
|
void |
setProgressMax(int maxn)
Set the progress point where operation is ready.
|
void |
setState(int state)
Sets logger's current state.
|
static final int EXECUTE
static final int WAIT
static final int CLOSE
static final int INVISIBLE
static final int VISIBLE
void hlog(java.lang.String message)
hlog
in interface TopicMapLogger
message
- is the logged text.void log(java.lang.String message)
log
in interface TopicMapLogger
message
- is the logged string message.void log(java.lang.String message, java.lang.Exception e)
log
in interface TopicMapLogger
message
- is the logged message.e
- is the exception to be logged.void log(java.lang.Exception e)
log
in interface TopicMapLogger
e
- is the logged exception.void log(java.lang.Error e)
e
- is the logged error.void setProgress(int n)
setProgressMax
.setProgress
in interface TopicMapLogger
n
- is integer value representing the state of current progress.void setProgressMax(int maxn)
setProgressMax
in interface TopicMapLogger
maxn
- is integer value representing progress when the task is ready.void setLogTitle(java.lang.String title)
setLogTitle
in interface TopicMapLogger
title
- is a string viewed as a title of logger window.void lockLog(boolean lock)
lock
- boolean variable that locks or unlocks logger.java.lang.String getHistory()
void setState(int state)
state
- of logger.int getState()
boolean forceStop()
Logger should have a mechanism to receive user interruption. Typically this
is realized with a Cancel or Stop button. Whenever the user interrupts the
operation the logger should return true as the return code of forceStop
method.
forceStop
mechanism relies that the tool using the logger polls
forceStop
method frequently and cancels the operation as soon as
true is returned.
forceStop
in interface TopicMapLogger
Copyright 2004-2015 Wandora Team