Class JAddin
java.lang.Object
java.lang.Thread
lotus.domino.NotesThread
lotus.notes.addins.JavaServerAddin
JAddin
- All Implemented Interfaces:
Runnable
public final class JAddin
extends lotus.notes.addins.JavaServerAddin
This JAddin class - together with the JAddinThread class - is a framework used to create HCL Domino
server add-in programs.
Notes: The code running in this main thread should avoid any long-running or blocking code to prohibit
delays in processing the HCL Domino message queue. Some of the methods in this class are also
called by the JAddinThread and the user add-in class.
- Author:
- andy.brunner@k43.ch
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class lotus.notes.addins.JavaServerAddin
LOG_AUTO_CLEARS, LOG_DONT_CREATE_DDM_ENTRY, LOG_TO_EVENT_NO_CONSOLE, MSG_Q_PREFIX, NOERROR, ST_ADDITIVE, ST_UNIQUE, VT_LONG, VT_NUMBER, VT_TEXT, VT_TIMEDATEFields inherited from class lotus.domino.NotesThread
dummyObj, isLoadedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcreateAddinStatusLine(String name) Create the Domino task status line which is shown in"show tasks"command.final voiddeleteAddinStatusLine(int id) Delete the Domino task status line.final voiddeleteDominoStatistic(String addinName, String statsName) Delete the server statistic which is shown in command"Show Stat".final booleanReturn the debug state Note: This method is also called by the JAddinThread and the user add-infinal voidWrite a debug message to the Domino console.final voidlogMessage(String addinName, String message) Write a log message to the Domino console.final voidrunNotes()This method is called by the Domino RunJava task as the main entry point.final voidSend Quit command to the Domino message queue to signal termination.final voidsetAddinState(int id, String message) Set the text of the add-in which is shown in command"show tasks".final voidsetDebugState(boolean debugFlag) Set the debug flag Note: This method is also called by the JAddinThread and the user add-infinal voidsetDominoStatistic(String addinName, String statsName, Double value) Set the server statistic which is shown in command"Show Stat".final voidsetDominoStatistic(String addinName, String statsName, String text) Set the server statistic which is shown in command"Show Stat".final voidwaitMilliSeconds(long sleepTime) Delay the execution of the current thread.Methods inherited from class lotus.notes.addins.JavaServerAddin
AddInLogErrorText, AddInLogErrorText, LogDDMEvent, shouldTerminate, StatDelete, stopAddinMethods inherited from class lotus.domino.NotesThread
finalize, initThread, run, sDisablePerThreadTracking, sDisablePerThreadTracking, sDumpPerThreadInitTermStacks, sEnablePerThreadTracking, sEnablePerThreadTracking, sGetPerThreadCount, sGetPerThreadCount, sinitThread, stermThread, termThreadMethods inherited from class java.lang.Thread
activeCount, checkAccess, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield
-
Constructor Details
-
JAddin
public JAddin()This constructor is called by the HCL Domino RunJava task if no arguments are specified. ("Load RunJava JAddin"). -
JAddin
This constructor is called by the HCL Domino RunJava task if any command line arguments is specified. ("Load RunJava JAddin HelloWorld").- Parameters:
args- [] Passed arguments in the command line
-
-
Method Details
-
createAddinStatusLine
Create the Domino task status line which is shown in"show tasks"command. Note: This method is also called by the JAddinThread and the user add-in- Parameters:
name- Name of task- Returns:
- Domino task ID
-
deleteAddinStatusLine
public final void deleteAddinStatusLine(int id) Delete the Domino task status line. Note: This method is also called by the JAddinThread and the user add-in- Parameters:
id- Domino task id
-
deleteDominoStatistic
-
getDebugState
public final boolean getDebugState()Return the debug state Note: This method is also called by the JAddinThread and the user add-in- Returns:
- Debug state
-
logDebug
Write a debug message to the Domino console. The message string will be prefixed with the add-in name and the location in the source code issuing the call e.g."DEBUG: AddinName.MethodName(LineNumber): xxxxxxxx". Note: This method is also called by the JAddinThread and the user add-in- Parameters:
addinName- Name of Add-inmessage- Message to be displayed
-
logMessage
Write a log message to the Domino console. The message string will be prefixed with the add-in name followed by a column, e.g."AddinName: xxxxxxxx"Note: This method is also called by the JAddinThread and the user add-in- Parameters:
addinName- Name of add-inmessage- Message to be displayed
-
runNotes
public final void runNotes()This method is called by the Domino RunJava task as the main entry point.- Overrides:
runNotesin classlotus.domino.NotesThread
-
sendQuitCommand
public final void sendQuitCommand()Send Quit command to the Domino message queue to signal termination. Note: This method is also called by the JAddinThread and the user add-in -
setAddinState
Set the text of the add-in which is shown in command"show tasks". Note: This method is also called by the JAddinThread and the user add-in- Parameters:
id- Domino task idmessage- Text to be set
-
setDebugState
public final void setDebugState(boolean debugFlag) Set the debug flag Note: This method is also called by the JAddinThread and the user add-in- Parameters:
debugFlag- Enable or disable the debug logging
-
setDominoStatistic
Set the server statistic which is shown in command"Show Stat". Note: This method is also called by the JAddinThread and the user add-in- Parameters:
addinName- Name of statistics packagestatsName- Name of statisticsvalue- Statistics value
-
setDominoStatistic
Set the server statistic which is shown in command"Show Stat". Note: This method is also called by the JAddinThread and the user add-in- Parameters:
addinName- Name of statistics packagestatsName- Name of statisticstext- Statistics string
-
waitMilliSeconds
public final void waitMilliSeconds(long sleepTime) Delay the execution of the current thread. Note: This method is also called by the JAddinThread and the user add-in- Parameters:
sleepTime- Delay time in milliseconds
-