Skip to content

Commit 05448f5

Browse files
committed
Refine and clean up Javadoc
Signed-off-by: Mark Chesney <[email protected]>
1 parent 402fc67 commit 05448f5

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

logback-core/src/main/java/ch/qos/logback/core/status/StatusManager.java

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Logback: the reliable, generic, fast and flexible logging framework.
3-
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
3+
* Copyright (C) 1999-2024, QOS.ch. All rights reserved.
44
*
55
* This program and the accompanying materials are dual-licensed under
66
* either the terms of the Eclipse Public License v1.0 as published by
@@ -16,71 +16,75 @@
1616
import java.util.List;
1717

1818
/**
19-
* Internal error messages (statii) are managed by instances of this interface.
20-
*
19+
* A component which accepts status events and notifies registered listeners.
20+
* Maintains event statistics, an event buffer, and a listener registry.
21+
*
2122
* @author Ceki G&uuml;lc&uuml;
23+
* @author Mark Chesney
2224
*/
2325
public interface StatusManager {
2426

2527
/**
26-
* Add a new status message.
27-
*
28-
* @param status
28+
* Notifies registered listeners of the specified status event and adds it to
29+
* the end of the event buffer.
30+
*
31+
* @param status a status event
2932
*/
3033
void add(Status status);
3134

3235
/**
33-
* Obtain a copy of the status list maintained by this StatusManager.
34-
*
35-
* @return
36+
* Returns a point-in-time snapshot of the event buffer.
37+
*
38+
* @return a snapshot of the event buffer
3639
*/
3740
List<Status> getCopyOfStatusList();
3841

3942
/**
40-
* Return the highest level of all the statii.
41-
*
42-
* @return
43+
* Returns the highest level of statuses seen since instantiation.
44+
*
45+
* @return the highest level of statuses seen
4346
*/
4447
// int getLevel();
4548

4649
/**
47-
* Return the number of status entries.
48-
*
49-
* @return
50+
* Returns the number of events processed since instantiation or the last reset.
51+
*
52+
* @return the number of events processed
5053
*/
5154
int getCount();
5255

5356
/**
54-
* Add a status listener.
55-
*
56-
* @param listener
57-
*/
58-
59-
/**
60-
* Add a status listener. The StatusManager may decide to skip installation if
61-
* an earlier instance was already installed.
62-
*
63-
* @param listener
64-
* @return true if actually added, false if skipped
57+
* Registers the specified listener.
58+
* <p>
59+
* Returns {@code true} if the registered listeners changed, and {@code false}
60+
* if the specified listener is already registered, and the implementation does
61+
* not permit duplicates.
62+
*
63+
* @param listener the listener to register
64+
* @return {@code true} if the registered listeners changed, {@code false}
65+
* otherwise
6566
*/
6667
boolean add(StatusListener listener);
6768

6869
/**
69-
* ); Remove a status listener.
70-
*
71-
* @param listener
70+
* Deregisters the specified listener, if registered.
71+
* <p>
72+
* If the implementation permits duplicates, only the first occurrence is
73+
* deregistered.
74+
*
75+
* @param listener the listener to deregister
7276
*/
7377
void remove(StatusListener listener);
7478

7579
/**
76-
* Clear the list of status messages.
80+
* Resets event statistics and empties the event buffer.
7781
*/
7882
void clear();
7983

8084
/**
81-
* Obtain a copy of the status listener list maintained by this StatusManager
82-
*
83-
* @return
85+
* Returns a point-in-time snapshot of the registered listeners.
86+
*
87+
* @return a snapshot of the registered listeners
8488
*/
8589
List<StatusListener> getCopyOfStatusListenerList();
8690

0 commit comments

Comments
 (0)