alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback Class Reference

Inheritance diagram for alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void acsLogConnConnecting ()
synchronized void acsLogConnEstablished ()
void acsLogConnDisconnected ()
synchronized void acsLogConnLost ()
void reportStatus (String status)
void logEntryReceived (ILogEntry logEntry)
void acsLogConnSuspended ()
void acsLogsDelay ()

Package Functions

 MyRemoteResponseCallback (DelayQueue< DelayedLogEntry > logDelayQueue, ArrayList< String > statusReports)
boolean awaitConnection (long timeout, TimeUnit unit) throws InterruptedException
boolean isVerbose ()
void setVerbose (boolean verbose)
void setDelayMillis (long newDelayMillis)

Private Attributes

boolean verbose = false
final ArrayList< String > statusReports
final DelayQueue< DelayedLogEntrylogDelayQueue
long delayMillis = 20000
boolean isConnected = false
CountDownLatch connectSync

Detailed Description

Callback class that receives log data from LCEngine.


Constructor & Destructor Documentation

alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::MyRemoteResponseCallback ( DelayQueue< DelayedLogEntry logDelayQueue,
ArrayList< String >  statusReports 
) [inline, package]

Member Function Documentation

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::acsLogConnConnecting (  )  [inline]

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

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

References verbose.

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::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 isConnected, and verbose.

synchronized void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::acsLogConnEstablished (  )  [inline]

Notify that the connection with ACS NC has been established

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

References connectSync, isConnected, and verbose.

synchronized void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::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 delayMillis, isConnected, logDelayQueue, and verbose.

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::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::engine::LogReceiver::MyRemoteResponseCallback::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.

boolean alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::awaitConnection ( long  timeout,
TimeUnit  unit 
) throws InterruptedException [inline, package]

References connectSync, and isConnected.

boolean alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::isVerbose (  )  [inline, package]

References verbose.

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::logEntryReceived ( ILogEntry  logEntry  )  [inline]

The method is executed when a new log arrives from the NC

Parameters:
logEntry The new log just read from the NC

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

References delayMillis, logDelayQueue, and verbose.

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::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.

References verbose.

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::setDelayMillis ( long  newDelayMillis  )  [inline, package]

Sets the delay for log entries in the queue.

Parameters:
newDelayMillis 
See also:
DelayedLogEntry::DelayedLogEntry(ILogEntry, long)

References delayMillis.

Referenced by alma::acs::logging::engine::LogReceiver::setDelayMillis().

void alma::acs::logging::engine::LogReceiver::MyRemoteResponseCallback::setVerbose ( boolean  verbose  )  [inline, package]

Member Data Documentation

Referenced by acsLogConnLost(), and logEntryReceived().


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

Generated by  doxygen 1.6.2