Skip to content

Commit 4d0ffb5

Browse files
committed
Refine and clean up Javadoc
Signed-off-by: Mark Chesney <[email protected]>
1 parent 42caff8 commit 4d0ffb5

File tree

1 file changed

+34
-37
lines changed

1 file changed

+34
-37
lines changed

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

Lines changed: 34 additions & 37 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,68 @@
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-
*/
44-
// int getLevel();
45-
46-
/**
47-
* Return the number of status entries.
48-
*
49-
* @return
43+
* Returns the number of events processed since instantiation or the last reset.
44+
*
45+
* @return the number of events processed
5046
*/
5147
int getCount();
5248

5349
/**
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
50+
* Registers the specified listener.
51+
* <p>
52+
* Returns {@code true} if the registered listeners changed, and {@code false}
53+
* if the specified listener is already registered, and the implementation does
54+
* not permit duplicates.
55+
*
56+
* @param listener the listener to register
57+
* @return {@code true} if the registered listeners changed, {@code false}
58+
* otherwise
6559
*/
6660
boolean add(StatusListener listener);
6761

6862
/**
69-
* ); Remove a status listener.
70-
*
71-
* @param listener
63+
* Deregisters the specified listener, if registered.
64+
* <p>
65+
* If the implementation permits duplicates, only the first occurrence is
66+
* deregistered.
67+
*
68+
* @param listener the listener to deregister
7269
*/
7370
void remove(StatusListener listener);
7471

7572
/**
76-
* Clear the list of status messages.
73+
* Resets event statistics and empties the event buffer.
7774
*/
7875
void clear();
7976

8077
/**
81-
* Obtain a copy of the status listener list maintained by this StatusManager
82-
*
83-
* @return
78+
* Returns a point-in-time snapshot of the registered listeners.
79+
*
80+
* @return a snapshot of the registered listeners
8481
*/
8582
List<StatusListener> getCopyOfStatusListenerList();
8683

0 commit comments

Comments
 (0)