Skip to content

Commit 7557c61

Browse files
committed
Add javadoc
1 parent c587fec commit 7557c61

18 files changed

Lines changed: 259 additions & 8 deletions

java/org/apache/catalina/AccessLog.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ public interface AccessLog {
8282
void setRequestAttributesEnabled(boolean requestAttributesEnabled);
8383

8484
/**
85+
* Checks if request attributes will be logged.
86+
*
8587
* @see #setRequestAttributesEnabled(boolean)
8688
*
8789
* @return <code>true</code> if the attributes will be logged, otherwise <code>false</code>

java/org/apache/catalina/Context.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
* <p>
6161
* The child containers attached to a Context are generally implementations of Wrapper (representing individual servlet
6262
* definitions).
63-
* <p>
6463
*/
6564
public interface Context extends Container, ContextBind {
6665

java/org/apache/catalina/JmxEnabled.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
public interface JmxEnabled extends MBeanRegistration {
2828

2929
/**
30+
* Returns the domain under which this component will be / has been registered.
31+
*
3032
* @return the domain under which this component will be / has been registered.
3133
*/
3234
String getDomain();
@@ -42,6 +44,8 @@ public interface JmxEnabled extends MBeanRegistration {
4244

4345

4446
/**
47+
* Returns the name under which this component has been registered with JMX.
48+
*
4549
* @return the name under which this component has been registered with JMX.
4650
*/
4751
ObjectName getObjectName();

java/org/apache/catalina/WebResource.java

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,23 @@
2626
*/
2727
public interface WebResource {
2828
/**
29+
* Returns the last modified time.
30+
*
2931
* @return {@link java.io.File#lastModified()}.
3032
*/
3133
long getLastModified();
3234

3335
/**
36+
* Returns the last modified time in HTTP format.
37+
*
3438
* @return the last modified time of this resource in the correct format for the HTTP Last-Modified header as
3539
* specified by RFC 2616.
3640
*/
3741
String getLastModifiedHttp();
3842

3943
/**
44+
* Checks if this resource exists.
45+
*
4046
* @return {@link java.io.File#exists()}.
4147
*/
4248
boolean exists();
@@ -51,48 +57,64 @@ public interface WebResource {
5157
boolean isVirtual();
5258

5359
/**
60+
* Checks if this resource is a directory.
61+
*
5462
* @return {@link java.io.File#isDirectory()}.
5563
*/
5664
boolean isDirectory();
5765

5866
/**
67+
* Checks if this resource is a file.
68+
*
5969
* @return {@link java.io.File#isFile()}.
6070
*/
6171
boolean isFile();
6272

6373
/**
74+
* Deletes this resource.
75+
*
6476
* @return {@link java.io.File#delete()}.
6577
*/
6678
boolean delete();
6779

6880
/**
81+
* Returns the name of this resource.
82+
*
6983
* @return {@link java.io.File#getName()}.
7084
*/
7185
String getName();
7286

7387
/**
88+
* Returns the content length of this resource.
89+
*
7490
* @return {@link java.io.File#length()}.
7591
*/
7692
long getContentLength();
7793

7894
/**
95+
* Returns the canonical path of this resource.
96+
*
7997
* @return {@link java.io.File#getCanonicalPath()}.
8098
*/
8199
String getCanonicalPath();
82100

83101
/**
102+
* Checks if this resource can be read.
103+
*
84104
* @return {@link java.io.File#canRead()}.
85105
*/
86106
boolean canRead();
87107

88108
/**
109+
* Returns the webapp path of this resource.
110+
*
89111
* @return The path of this resource relative to the web application root. If the resource is a directory, the
90112
* return value will end in '/'.
91113
*/
92114
String getWebappPath();
93115

94116
/**
95-
* Return the weak ETag calculated from the content length and last modified.
117+
* Returns the weak ETag calculated from the content length and last modified.
96118
*
97119
* @return The ETag for this resource
98120
*/
@@ -116,31 +138,39 @@ default String getStrongETag() {
116138
void setMimeType(String mimeType);
117139

118140
/**
141+
* Returns the MIME type for this Resource.
142+
*
119143
* @return the MIME type for this Resource.
120144
*/
121145
String getMimeType();
122146

123147
/**
124-
* Obtain an InputStream based on the contents of this resource.
148+
* Obtains an InputStream based on the contents of this resource.
125149
*
126150
* @return An InputStream based on the contents of this resource or <code>null</code> if the resource does not exist
127151
* or does not represent a file
128152
*/
129153
InputStream getInputStream();
130154

131155
/**
156+
* Returns the binary content of this resource.
157+
*
132158
* @return the binary content of this resource or {@code null} if it is not available in a byte[] because, for
133159
* example, it is too big.
134160
*/
135161
byte[] getContent();
136162

137163
/**
164+
* Returns the creation time of this resource.
165+
*
138166
* @return The time the file was created. If not available, the result of {@link #getLastModified()} will be
139167
* returned.
140168
*/
141169
long getCreation();
142170

143171
/**
172+
* Returns a URL to access this resource.
173+
*
144174
* @return a URL to access the resource or <code>null</code> if no such URL is available or if the resource does not
145175
* exist.
146176
*/
@@ -160,18 +190,24 @@ default URL getCodeBase() {
160190
}
161191

162192
/**
193+
* Returns a reference to the WebResourceRoot of which this WebResource is a part.
194+
*
163195
* @return a reference to the WebResourceRoot of which this WebResource is a part.
164196
*/
165197
WebResourceRoot getWebResourceRoot();
166198

167199
/**
200+
* Returns the certificates that were used to sign this resource to verify it.
201+
*
168202
* @return the certificates that were used to sign this resource to verify it or @null if none.
169203
*
170204
* @see java.util.jar.JarEntry#getCertificates()
171205
*/
172206
Certificate[] getCertificates();
173207

174208
/**
209+
* Returns the manifest associated with this resource.
210+
*
175211
* @return the manifest associated with this resource or @null if none.
176212
*
177213
* @see java.util.jar.JarFile#getManifest()

java/org/apache/catalina/WebResourceRoot.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ void createWebResourceSet(ResourceSetType type, String webAppMount, String base,
207207
void addPreResources(WebResourceSet webResourceSet);
208208

209209
/**
210+
* Returns the array of WebResourceSet configured to this web application as a 'Pre' resource.
211+
*
210212
* @return the array of WebResourceSet configured to this web application as a 'Pre' resource.
211213
*/
212214
WebResourceSet[] getPreResources();
@@ -219,6 +221,8 @@ void createWebResourceSet(ResourceSetType type, String webAppMount, String base,
219221
void addJarResources(WebResourceSet webResourceSet);
220222

221223
/**
224+
* Returns the array of WebResourceSet configured to this web application as a 'Jar' resource.
225+
*
222226
* @return the array of WebResourceSet configured to this web application as a 'Jar' resource.
223227
*/
224228
WebResourceSet[] getJarResources();
@@ -231,11 +235,15 @@ void createWebResourceSet(ResourceSetType type, String webAppMount, String base,
231235
void addPostResources(WebResourceSet webResourceSet);
232236

233237
/**
238+
* Returns the array of WebResourceSet configured to this web application as a 'Post' resource.
239+
*
234240
* @return the array of WebResourceSet configured to this web application as a 'Post' resource.
235241
*/
236242
WebResourceSet[] getPostResources();
237243

238244
/**
245+
* Returns the web application this WebResourceRoot is associated with.
246+
*
239247
* @return the web application this WebResourceRoot is associated with.
240248
*/
241249
Context getContext();
@@ -271,6 +279,8 @@ void createWebResourceSet(ResourceSetType type, String webAppMount, String base,
271279
void setCachingAllowed(boolean cachingAllowed);
272280

273281
/**
282+
* Checks if caching is permitted for this web application.
283+
*
274284
* @return <code>true</code> if caching is permitted for this web application.
275285
*/
276286
boolean isCachingAllowed();
@@ -428,6 +438,8 @@ default void setReadOnly(boolean readOnly) {
428438
}
429439

430440
/**
441+
* Checks if the main resources are read only.
442+
*
431443
* @return {@code true} if the main resources are read only, otherwise {@code false}. The default implementation
432444
* returns {@code false}.
433445
*/

java/org/apache/catalina/ant/AbstractCatalinaCommandTask.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,30 @@
2121

2222
import org.apache.tools.ant.BuildException;
2323

24+
/**
25+
* Abstract task for Catalina commands.
26+
*/
2427
public abstract class AbstractCatalinaCommandTask extends AbstractCatalinaTask {
2528

2629
/**
2730
* The context path of the web application we are managing.
2831
*/
2932
protected String path = null;
3033

34+
/**
35+
* Returns the path.
36+
*
37+
* @return the path
38+
*/
3139
public String getPath() {
3240
return this.path;
3341
}
3442

43+
/**
44+
* Sets the path.
45+
*
46+
* @param path The path to set
47+
*/
3548
public void setPath(String path) {
3649
this.path = path;
3750
}
@@ -41,10 +54,20 @@ public void setPath(String path) {
4154
*/
4255
protected String version = null;
4356

57+
/**
58+
* Returns the version.
59+
*
60+
* @return the version
61+
*/
4462
public String getVersion() {
4563
return this.version;
4664
}
4765

66+
/**
67+
* Sets the version.
68+
*
69+
* @param version The version to set
70+
*/
4871
public void setVersion(String version) {
4972
this.version = version;
5073
}

java/org/apache/catalina/ha/tcp/SendMessageData.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.apache.catalina.tribes.Member;
2020

2121
/**
22+
* Data about a message send operation.
23+
*
2224
* @param message The message that was sent
2325
* @param destination The destination of the message
2426
* @param exception The exception, if any, when attempting to send the message

java/org/apache/catalina/tribes/group/AbsoluteOrder.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,57 @@
4646
* @see org.apache.catalina.tribes.Member
4747
*/
4848
public class AbsoluteOrder {
49+
/**
50+
* The comparator for absolute order.
51+
*/
4952
public static final AbsoluteComparator comp = new AbsoluteComparator();
5053

54+
/**
55+
* Protected constructor.
56+
*/
5157
protected AbsoluteOrder() {
5258
super();
5359
}
5460

5561

62+
/**
63+
* Sort the members in absolute order.
64+
*
65+
* @param members The members to sort
66+
*/
5667
public static void absoluteOrder(Member[] members) {
5768
if (members == null || members.length <= 1) {
5869
return;
5970
}
6071
Arrays.sort(members, comp);
6172
}
6273

74+
/**
75+
* Sort the members in absolute order.
76+
*
77+
* @param members The members to sort
78+
*/
6379
public static void absoluteOrder(List<Member> members) {
6480
if (members == null || members.size() <= 1) {
6581
return;
6682
}
6783
members.sort(comp);
6884
}
6985

86+
/**
87+
* A comparator for absolute ordering of members.
88+
*/
7089
public static class AbsoluteComparator implements Comparator<Member>, Serializable {
7190

7291
@Serial
7392
private static final long serialVersionUID = 1L;
7493

94+
/**
95+
* Default constructor.
96+
*/
97+
public AbsoluteComparator() {
98+
}
99+
75100
@Override
76101
public int compare(Member m1, Member m2) {
77102
int result = compareIps(m1, m2);

java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
import org.apache.juli.logging.LogFactory;
5151

5252
/**
53+
* An abstract replicated map implementation.
54+
*
5355
* @param <K> The type of Key
5456
* @param <V> The type of Value
5557
*/

0 commit comments

Comments
 (0)