psmith 2003/12/18 20:19:14
Modified: . build.xml
Added: src/java/org/apache/log4j/net SocketHubReceiverBeanInfo.java
src/java/org/apache/log4j/chainsaw GeneratorBeanInfo.java
Log:
Added 2 example BeanInfo classes for everyone to review.
I have deliberately modified the build script so that these
classes do not polute the log4j core jar, but get bundled
with the chainsaw jar.
Be good to expose the properties that can be edited for all the
Plugins.
Revision Changes Path
1.1
jakarta-log4j/src/java/org/apache/log4j/net/SocketHubReceiverBeanInfo.java
Index: SocketHubReceiverBeanInfo.java
===================================================================
/*
*/
package org.apache.log4j.net;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
/**
* BeanInfo class for the SocketHubReceiver.
*
* @author Paul Smith <[EMAIL PROTECTED]>
*
*/
public class SocketHubReceiverBeanInfo extends SimpleBeanInfo {
/* (non-Javadoc)
* @see java.beans.BeanInfo#getPropertyDescriptors()
*/
public PropertyDescriptor[] getPropertyDescriptors() {
try {
return new PropertyDescriptor[] {
new PropertyDescriptor("host", SocketHubReceiver.class),
new PropertyDescriptor("port", SocketHubReceiver.class),
new PropertyDescriptor("threshold", SocketHubReceiver.class),
new PropertyDescriptor("reconnectionDelay",
SocketHubReceiver.class),
};
} catch (Exception e) {
}
return null;
}
}
1.86 +3 -1 jakarta-log4j/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/build.xml,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- build.xml 17 Dec 2003 01:59:01 -0000 1.85
+++ build.xml 19 Dec 2003 04:19:14 -0000 1.86
@@ -432,6 +432,7 @@
<!-- Need to fork to avoid problems -->
<java classname="org.apache.log4j.chainsaw.LogUI" fork="yes"
classpath="${jar.dest}/${log4j.jar};${jar.dest}/${log4j-chainsaw.jar};${ant.home}/lib/crimson.jar;${regexp.oro.jar}">
+ <sysproperty key="log4j.debug" value="${log4j.debug}"/>
</java>
</target>
@@ -472,7 +473,7 @@
${stem}/or/jms/*.class,
${stem}/plugins/*.class,
${stem}/config/*.class"
- excludes="**/UnitTest**">
+ excludes="**/UnitTest**, ${stem}/**/*BeanInfo.class">
<manifest>
<attribute name="Manifest-version" value="1.0"/>
@@ -511,6 +512,7 @@
includes="${stem}/chainsaw/*.class,
${stem}/varia/ExpressionFilter*.class,
${stem}/rule/*.class,
+ ${stem}/**/*BeanInfo.class,
${stem}/chainsaw/**/*.class,
${stem}/chainsaw/layout/*,
${stem}/chainsaw/icons/*.gif,
1.1
jakarta-log4j/src/java/org/apache/log4j/chainsaw/GeneratorBeanInfo.java
Index: GeneratorBeanInfo.java
===================================================================
/*
*/
package org.apache.log4j.chainsaw;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
/**
* A BeanInfo class to be used as meta-data about the
* Generator plugin
*
* @author Paul Smith <[EMAIL PROTECTED]>
*
*/
public class GeneratorBeanInfo extends SimpleBeanInfo {
/* (non-Javadoc)
* @see java.beans.BeanInfo#getPropertyDescriptors()
*/
public PropertyDescriptor[] getPropertyDescriptors() {
try {
return new PropertyDescriptor[] {
new PropertyDescriptor("name", Generator.class),
};
} catch (Exception e) {
}
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]