alma::acs::logging::dialogs::main::LogFrame Class Reference

Inheritance diagram for alma::acs::logging::dialogs::main::LogFrame:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::dialogs::main::LogFrame:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LogFrame (File filterFile, File engineFilterFile, String logFileName, LogTypeHelper discardLevel, boolean doNotConnect, boolean unlimited, AudienceInfo audienceInfo)
void windowActivated (java.awt.event.WindowEvent e)
void windowOpened (java.awt.event.WindowEvent e)
void windowClosed (java.awt.event.WindowEvent e)
void windowDeactivated (java.awt.event.WindowEvent e)
void windowDeiconified (java.awt.event.WindowEvent e)
void windowIconified (java.awt.event.WindowEvent e)
void windowClosing (java.awt.event.WindowEvent e)
void closeApplication ()
void voidSetWorkingMode (boolean mode)
void acsLogConnConnecting ()
void acsLogConnDisconnected ()
void acsLogConnEstablished ()
void acsLogConnLost ()
void acsLogConnSuspended ()
void acsLogsDelay ()
void reportStatus (String status)

Static Public Member Functions

static void main (java.lang.String[] args)

Private Member Functions

void initialize (LogTypeHelper discardLevel, boolean unlimited, AudienceInfo aInfo)
void initShutdownHook ()

Private Attributes

volatile boolean closing = false
LoggingClient loggingClient
Logger logger
ShutdownHook shutdownHook

Static Private Attributes

static final String online = "LoggingClient - Online"
static final String offline = "LoggingClient - Offline"
static final String connecting = "LoggingClient - Connecting..."

Detailed Description

The window with all the controls of the main GUI:

Author:
acaproni

Constructor & Destructor Documentation

alma::acs::logging::dialogs::main::LogFrame::LogFrame ( File  filterFile,
File  engineFilterFile,
String  logFileName,
LogTypeHelper  discardLevel,
boolean  doNotConnect,
boolean  unlimited,
AudienceInfo  audienceInfo 
) [inline]

Constructor: creates the main window and setup the panel with the controls.

Parameters:
filterFile A file of filters to load It can be null if there are no filters to load
engineFilterFile A file of filters to set in the engine It can be null if there are no filters to load in the engine
logFile A file of logs to load It can be null if there are no logs to load
discardLevel The discard level to set in the engine; If null the level in the engine is not set and the default is used
doNotConnect If true do not try to connect to ACS (i.e. start offline)
unlimited If true the number of logs in memory is unlimited, otherwise the default is used
audienceInfo The audience. It can be null if there is no audience to set at startup

References com::cosylab::logging::LoggingClient::connect(), com::cosylab::logging::LoggingClient::getEngine(), com::cosylab::logging::LoggingClient::getLCModel1(), com::cosylab::logging::LoggingClient::getLogEntryTable(), initialize(), initShutdownHook(), com::cosylab::logging::engine::FiltersVector::loadFilters(), logger, loggingClient, offline, and alma::acs::logging::table::LogEntryTable::setFilters().

Referenced by main().


Member Function Documentation

void alma::acs::logging::dialogs::main::LogFrame::acsLogConnConnecting (  )  [inline]

Notify that an attempt to connect to ACS NC is in progress

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

References connecting.

void alma::acs::logging::dialogs::main::LogFrame::acsLogConnDisconnected (  )  [inline]

Notify that the connection with ACS NC has been disconnected It can happen as a consequence of an error as well as as consequence of a request

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

References offline.

void alma::acs::logging::dialogs::main::LogFrame::acsLogConnEstablished (  )  [inline]

Notify that the connection with ACS NC has been established

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

References online.

void alma::acs::logging::dialogs::main::LogFrame::acsLogConnLost (  )  [inline]

Notify that the connection with ACS NC has been lost (it means an error or something abnormal).

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

References offline.

void alma::acs::logging::dialogs::main::LogFrame::acsLogConnSuspended (  )  [inline]

Notify that the service is supended (i.e. it is connected to the NC and receiving logs but the logs are discarded instead of being sent to the listeners) Note: the suspension of the service is not a malfunctioning but a status requested by the user

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::logging::dialogs::main::LogFrame::acsLogsDelay (  )  [inline]

Notify that for some internal reason the service is not able to follow the flow of the incoming logs and is queueing the messages to be inserted later, when flow will decrease and enough CPU time is availbale

This method is not executed each time a log is queued but once when the situation begins. When the temporary problem has been fixed, the status will revert to connected

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::logging::dialogs::main::LogFrame::closeApplication (  )  [inline]

Close the application

References closing, loggingClient, and com::cosylab::logging::LoggingClient::stop().

Referenced by windowClosing().

void alma::acs::logging::dialogs::main::LogFrame::initialize ( LogTypeHelper  discardLevel,
boolean  unlimited,
AudienceInfo  aInfo 
) [inline, private]

Initialize the content of the frame

Parameters:
discardLevel The discard level
unlimited If true the number of logs in memory is unlimited, otherwise the default is used
aInfo The audience

References loggingClient.

Referenced by LogFrame().

void alma::acs::logging::dialogs::main::LogFrame::initShutdownHook (  )  [inline, private]

Init the shutdown hook that intercept CTRL+C events and cleanly terminates the application

References logger, and shutdownHook.

Referenced by LogFrame().

static void alma::acs::logging::dialogs::main::LogFrame::main ( java.lang.String[]  args  )  [inline, static]

Starts the application.

Parameters:
args an array of command-line arguments

If it is not null then the user specified a file name in the command line

If it is not null then the user specified a filter file name in the command line

If it is not null then the user specified an engine filter file name in the command line

true if the user do not want the logging client tries to connect to ACS at startup

true if the user does not want to limit the number of logs to keep in memory

The audience set in the command line.

null if the user did not set the audience in the command line.

The initial discard level. If it not set in the command line, the logging client starts with the default discard level

References alma::acs::logging::dialogs::main::CommandLineParser::getAudience(), alma::acs::logging::dialogs::main::CommandLineParser::getDiscardLevel(), alma::acs::logging::dialogs::main::CommandLineParser::getEngineFilterFileName(), alma::acs::logging::dialogs::main::CommandLineParser::getFileToLoad(), alma::acs::logging::dialogs::main::CommandLineParser::getFilterFileName(), alma::acs::logging::dialogs::main::CommandLineParser::getHelp(), alma::acs::logging::dialogs::main::CommandLineParser::isDoNotConnect(), alma::acs::logging::dialogs::main::CommandLineParser::isUnlimited(), LogFrame(), and offline.

void alma::acs::logging::dialogs::main::LogFrame::reportStatus ( String  status  )  [inline]

Send a report string with the current status of the connection

Parameters:
status The status string

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::logging::dialogs::main::LogFrame::voidSetWorkingMode ( boolean  mode  )  [inline]

Set the title of the frame online/offline

Parameters:
mode true if running online

References offline, and online.

void alma::acs::logging::dialogs::main::LogFrame::windowActivated ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener
void alma::acs::logging::dialogs::main::LogFrame::windowClosed ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener

References loggingClient.

void alma::acs::logging::dialogs::main::LogFrame::windowClosing ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener

References closeApplication(), and closing.

void alma::acs::logging::dialogs::main::LogFrame::windowDeactivated ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener
void alma::acs::logging::dialogs::main::LogFrame::windowDeiconified ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener
void alma::acs::logging::dialogs::main::LogFrame::windowIconified ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener
void alma::acs::logging::dialogs::main::LogFrame::windowOpened ( java.awt.event.WindowEvent  e  )  [inline]
See also:
WindowListener

Member Data Documentation

volatile boolean alma::acs::logging::dialogs::main::LogFrame::closing = false [private]

A boolean to signal that the application is closing

Referenced by closeApplication(), and windowClosing().

final String alma::acs::logging::dialogs::main::LogFrame::connecting = "LoggingClient - Connecting..." [static, private]

Shown in the title bar while trying to connect to the logging NC

Referenced by acsLogConnConnecting().

The logger

Referenced by initShutdownHook(), and LogFrame().

The GUI showed into the frame

Referenced by closeApplication(), initialize(), LogFrame(), and windowClosed().

final String alma::acs::logging::dialogs::main::LogFrame::offline = "LoggingClient - Offline" [static, private]

Shown in the title bar while working offline

Referenced by acsLogConnDisconnected(), acsLogConnLost(), LogFrame(), main(), and voidSetWorkingMode().

final String alma::acs::logging::dialogs::main::LogFrame::online = "LoggingClient - Online" [static, private]

Shown in the title bar while working online

Referenced by acsLogConnEstablished(), and voidSetWorkingMode().

The Shutdown hook

Referenced by initShutdownHook().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2