You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/02/08 13:30:44 UTC
cvs commit: jakarta-log4j/org/apache/log4j/net JMSAppender.java
ceki 01/02/08 04:30:44
Modified: org/apache/log4j/net JMSAppender.java
Log:
Documentation changes.
Revision Changes Path
1.6 +47 -4 jakarta-log4j/org/apache/log4j/net/JMSAppender.java
Index: JMSAppender.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/net/JMSAppender.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JMSAppender.java 2001/01/26 13:27:46 1.5
+++ JMSAppender.java 2001/02/08 12:30:41 1.6
@@ -33,10 +33,25 @@
TopicPublisher topicPublisher;
- static String TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION
+ /**
+ A string constant used in naming the topic connection factory
+ binding name option. output file. Current value of this string
+ constant is <b>TopicConnectionFactoryBindingName</b>.
+
+ <p>Note that all option keys are case sensitive.
+
+ */
+ public static final String TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION
= "TopicConnectionFactoryBindingName";
- static String TOPIC_BINDING_NAME_OPTION = "TopicBindingName";
+ /**
+ A string constant used in naming the topic binding name option.
+ Current value of this string constant is <b>TopicBindingName</b>.
+
+ <p>Note that all option keys are case sensitive.
+
+ */
+ public static final String TOPIC_BINDING_NAME_OPTION = "TopicBindingName";
String topicBindingName;
String tcfBindingName;
@@ -99,7 +114,9 @@
}
}
-
+ /**
+ Close this JMSAppender. Closing relases all resources used by the
+ appender. A closed appender cannot be re-opened. */
public
synchronized // avoid concurrent append and close operations
void close() {
@@ -123,6 +140,9 @@
topicConnection = null;
}
+ /**
+ This method called by {@link AppenderSkeleton#doAppend} method to
+ do most of the real appending work. */
public
void append(LoggingEvent event) {
if(!checkEntryConditions()) {
@@ -140,13 +160,36 @@
}
+ /**
+ Retuns the option names for this component, namely the string
+ array {{@link #{TOPIC_BINDING_NAME_OPTION}, {@link
+ #TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION}} in addition to
+ the options of its super class {@link AppenderSkeleton}.
+ */
+
public
String[] getOptionStrings() {
return OptionConverter.concatanateArrays(super.getOptionStrings(),
new String[] {TOPIC_BINDING_NAME_OPTION,
TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION});
}
-
+
+ /**
+ Set <code>JMSAppender</code> specific options.
+
+ The options of the super class {@link AppenderSkeleton} are also
+ recognized.
+
+ <p>The <b>TopicConnectionFactoryBindingName</b> option takes a
+ string value. Its value will be used to lookup the approprtate
+ <code>TopicConnectionFactory</code> fron the JNDI context.
+
+ <p>The <b>TopicBindingName</b> option takes a
+ string value. Its value will be used to lookup the approprtate
+ <code>Topic</code> fron the JNDI context.
+
+ */
+
public
void setOption(String key, String value) {
if(value == null) return;