public class HelloWorld extends JAddIn
{
	// Class constructor without command arguments, e.g. "Load RunJava AddInName".
	public HelloWorld()
	{
		super();
	}
	
	// Class constructor with command arguments, e.g. "Load RunJava AddInName xxxxxxxx". As a minimum, you must call "super(args)"
	// to save the passed command line arguments. They may be retrieved later thru the method "getStartArguments()".
	public HelloWorld(String[] args)
	{
		super(args);
	}
	
	// This callback method runs as a separate thread to avoid any processing delays of the Domino message queue. All main
	// processing should be done here.
	void addInStart(String[] args)
	{
		try
		{
			logMessage("HelloWorld started - Running on " + getSession().getNotesVersion());
		
			while (true)
			{
				logMessage("User code is running...");
				Thread.sleep(5000L);
			}
		}
		catch (Exception e)
		{
			logMessage("Unexpected error: " + e.getMessage());
		}
	}

	// This callback method is executed when the command "Quit" or "Exit" is entered or during Domino server shutdown.
	void addInStop()
	{
		logMessage("Termination in progress");
	}
	
	// This callback method is executed for commands entered at the Domino console, e.g. "Tell AddInName xxxxxxxx".
	void addInCommand(String command)
	{
		logMessage("You have entered the command <" + command + ">");
	}
}

