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:
  • Constructor Details

    • JAddin

      public JAddin()
      This constructor is called by the HCL Domino RunJava task if no arguments are specified. ("Load RunJava JAddin").
    • JAddin

      public JAddin(String[] args)
      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

      public final int createAddinStatusLine(String name)
      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

      public final void deleteDominoStatistic(String addinName, String statsName)
      Delete 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 package
      statsName - Name of statistics
    • 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

      public final void logDebug(String addinName, String message)
      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-in
      message - Message to be displayed
    • logMessage

      public final void logMessage(String addinName, String message)
      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-in
      message - Message to be displayed
    • runNotes

      public final void runNotes()
      This method is called by the Domino RunJava task as the main entry point.
      Overrides:
      runNotes in class lotus.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

      public final void setAddinState(int id, String message)
      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 id
      message - 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

      public final void setDominoStatistic(String addinName, String statsName, Double value)
      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 package
      statsName - Name of statistics
      value - Statistics value
    • setDominoStatistic

      public final void setDominoStatistic(String addinName, String statsName, String text)
      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 package
      statsName - Name of statistics
      text - 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