Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::logging::engine::ACS::ACSListenersDispatcher Class Reference

List of all members.

Public Member Functions

void addLogListener (ACSRemoteLogListener listener)
void addErrorListener (ACSRemoteErrorListener listener)
void addRawLogListener (ACSRemoteRawLogListener listener)
void addLogConnectionListener (ACSLogConnectionListener listener)
void publishReport (String message)
void publishError (String error)
void publishConnected (boolean connected)
void publishConnectionLost ()
void publishConnecting ()
void publishLog (ILogEntry newLog)
void publishRawLog (String xmlStr)
void publishSuspended ()
void publishDiscarding ()
boolean removeLogListener (ACSRemoteLogListener listener)
boolean removeErrorListener (ACSRemoteErrorListener listener)
boolean removeRawLogListener (ACSRemoteRawLogListener listener)
boolean removeConnectionListener (ACSRemoteLogListener listener)
boolean hasLogListeners ()
boolean hasRawLogListeners ()
boolean hasConnectionListeners ()

Private Attributes

Vector< ACSRemoteLogListenerlogListeners = new Vector<ACSRemoteLogListener>()
volatile int logListenersNum = 0
Vector< ACSLogConnectionListenerconnectionListeners = new Vector<ACSLogConnectionListener>()
volatile int connListenersNum = 0
Vector< ACSRemoteRawLogListenerrawLogListeners = new Vector<ACSRemoteRawLogListener>()
volatile int rawLogListenersNum = 0
Vector< ACSRemoteErrorListenererrorListeners = new Vector<ACSRemoteErrorListener>()
volatile int errorListenersNum = 0

Detailed Description

Dispatches messages to listeners.

At least one error listener must be present.

Author:
acaproni


Member Function Documentation

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addErrorListener ACSRemoteErrorListener  listener  )  [inline]
 

Add an error listener

Parameters:
listener The listener to add

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogConnectionListener ACSLogConnectionListener  listener  )  [inline]
 

Add a RAW log listener

Parameters:
listener The listener to add

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogListener ACSRemoteLogListener  listener  )  [inline]
 

Add a log listener

Parameters:
listener The listener to add

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addRawLogListener ACSRemoteRawLogListener  listener  )  [inline]
 

Add a RAW log listener

Parameters:
listener The listener to add

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::hasConnectionListeners  )  [inline]
 

Returns:
true is there are registerd connection listeners

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::hasLogListeners  )  [inline]
 

Returns:
true is there are registerd log listeners

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::hasRawLogListeners  )  [inline]
 

Returns:
true is there are registerd raw log listeners

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishConnected boolean  connected  )  [inline]
 

Publish the connection status to the listeners The connection status means connected/disconnected

Parameters:
connected 

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishConnecting  )  [inline]
 

Notify the listeners that an attempt to connect is in progress

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishConnectionLost  )  [inline]
 

Notify the listeners that the connection has been lost

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishDiscarding  )  [inline]
 

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishError String  error  )  [inline]
 

Notify the listener that an error happened parsing a log. If there are no listeners then prints a message in the stderr

Parameters:
error The string that generated the error

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishLog ILogEntry  newLog  )  [inline]
 

Publish a log to the listeners (if any)

Parameters:
newLog The log to send to the listeners

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishRawLog String  xmlStr  )  [inline]
 

Publish a RAW log to the listeners (if any)

Parameters:
newLog The XML string to send to the listeners

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishReport String  message  )  [inline]
 

Publish a report string to the listeners (if any)

Parameters:
message The message to publish

void com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishSuspended  )  [inline]
 

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::removeConnectionListener ACSRemoteLogListener  listener  )  [inline]
 

Remove a connection status listener

Parameters:
listener The listener to remove
Returns:
true if the listener has been effectively removed

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::removeErrorListener ACSRemoteErrorListener  listener  )  [inline]
 

Remove an error listener.

Parameters:
listener The listener to remove
Returns:
true if the listener has been effectively removed

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::removeLogListener ACSRemoteLogListener  listener  )  [inline]
 

Remove a connection status listener

Parameters:
listener The listener to remove
Returns:
true if the listener has been effectively removed

boolean com::cosylab::logging::engine::ACS::ACSListenersDispatcher::removeRawLogListener ACSRemoteRawLogListener  listener  )  [inline]
 

Remove a connection status listener

Parameters:
listener The listener to remove
Returns:
true if the listener has been effectively removed


Member Data Documentation

Vector<ACSLogConnectionListener> com::cosylab::logging::engine::ACS::ACSListenersDispatcher::connectionListeners = new Vector<ACSLogConnectionListener>() [private]
 

The listeners of the status of the connection and report messages

volatile int com::cosylab::logging::engine::ACS::ACSListenersDispatcher::connListenersNum = 0 [private]
 

Vector<ACSRemoteErrorListener> com::cosylab::logging::engine::ACS::ACSListenersDispatcher::errorListeners = new Vector<ACSRemoteErrorListener>() [private]
 

The listeners for the errors generated when a generating logs (parsing an XML or building a log from a cache string)

volatile int com::cosylab::logging::engine::ACS::ACSListenersDispatcher::errorListenersNum = 0 [private]
 

Vector<ACSRemoteLogListener> com::cosylab::logging::engine::ACS::ACSListenersDispatcher::logListeners = new Vector<ACSRemoteLogListener>() [private]
 

The log listeners for this connection

volatile int com::cosylab::logging::engine::ACS::ACSListenersDispatcher::logListenersNum = 0 [private]
 

Vector<ACSRemoteRawLogListener> com::cosylab::logging::engine::ACS::ACSListenersDispatcher::rawLogListeners = new Vector<ACSRemoteRawLogListener>() [private]
 

The listeners of the XML strings representing a log

volatile int com::cosylab::logging::engine::ACS::ACSListenersDispatcher::rawLogListenersNum = 0 [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:13:07 2009 for ACS Java API by doxygen 1.3.8