Issue #1661 - yajsw will now log to both the console and log file indefinitely
- yajsw can now be built from source on-demand - the console debug parameter set by start.sh will now be passed to the jvm Change-Id: I6146cbcb29887b462d9bda53bd3803b5775031d0 Former-commit-id:a6cd17feeb
[formerlyc55efaadb0
[formerly 96edb01711d6c0f33cff0bfb03bb8c681884c1b3]] Former-commit-id:c55efaadb0
Former-commit-id:541d096faf
This commit is contained in:
parent
a43becec4f
commit
27aa8b21f4
634 changed files with 128722 additions and 2 deletions
|
@ -94,7 +94,7 @@ export AMQP_SPEC=$awips_home/python/share/amqp/amqp.0-10.xml
|
|||
#read and interpret the command line arguments
|
||||
#-------------------------------------------------------------------------
|
||||
CONSOLE_FLAG=on
|
||||
CONSOLE_LOGLEVEL=INFO
|
||||
CONSOLE_LOGLEVEL=DEBUG
|
||||
DEBUG_FLAG=off
|
||||
PROFILE_FLAG=off
|
||||
HIGH_MEM_FLAG=off
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -181,7 +181,7 @@ wrapper.trigger.action=RESTART
|
|||
wrapper.console.format=M
|
||||
|
||||
# Log Level for console output. (See docs for log levels)
|
||||
wrapper.console.loglevel=DEBUG
|
||||
wrapper.console.loglevel=${CONSOLE_LOGLEVEL}
|
||||
|
||||
# Log file to use for wrapper output logging.
|
||||
wrapper.logfile=${EDEX_HOME}/logs/edex-${EDEX_RUN_MODE}-YYYYMMDD.log
|
||||
|
|
Binary file not shown.
46
javaUtilities/yajsw/.classpath
Normal file
46
javaUtilities/yajsw/.classpath
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/ahessian"/>
|
||||
<classpathentry kind="src" path="src/app/java"/>
|
||||
<classpathentry kind="src" path="src/build/java"/>
|
||||
<classpathentry kind="src" path="src/hessian"/>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/srvmgr/java"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" path="src/ws/java"/>
|
||||
<classpathentry kind="lib" path="build/gradle/gradle/wrapper/gradle-wrapper.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-cli-2-SNAPSHOT.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-collections-3.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-configuration-1.8.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-io-1.3.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-lang-2.4.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-logging-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/commons/commons-vfs2-2.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/groovy/groovy-all-1.8.6.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/jna/jna-3.4.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/jna/platform-3.4.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/netty/netty-3.5.1.Final.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/regex/jrexx-1.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/core/yajsw/ahessian.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/abeille/formsrt.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/commons/commons-codec-1.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/commons/commons-httpclient-3.0.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/commons/commons-net-1.4.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/glazedlists/commons-beanutils-1.8.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/glazedlists/glazedlists-1.8.0_java15.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/jgoodies/forms-1.2.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/quartz/quartz-1.8.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/velocity/velocity-1.6.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/vfs-webdav/slf4j-api-1.5.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/vfs-webdav/xercesImpl.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/yajsw/hessian4.jar"/>
|
||||
<classpathentry kind="lib" path="lib/extended/yajsw/srvmgr.jar"/>
|
||||
<classpathentry kind="lib" path="lib/groovy/joda/joda-time-1.6.jar"/>
|
||||
<classpathentry kind="lib" path="lib/groovy/mail/activation.jar"/>
|
||||
<classpathentry kind="lib" path="lib/groovy/mail/mail.jar"/>
|
||||
<classpathentry kind="lib" path="lib/groovy/snmp/SNMP4J.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
17
javaUtilities/yajsw/.project
Normal file
17
javaUtilities/yajsw/.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>yajsw</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
36
javaUtilities/yajsw/build.xml
Normal file
36
javaUtilities/yajsw/build.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<project name="Build YAJSW" default="main" basedir=".">
|
||||
<!-- The location that the built jar files should be copied to. -->
|
||||
<property name="destination.directory"
|
||||
value="/tmp" />
|
||||
|
||||
<property name="gradle.directory"
|
||||
value="${basedir}/build/gradle" />
|
||||
<property name="gradle.build.script"
|
||||
value="${gradle.directory}/gradlew.sh" />
|
||||
|
||||
<target name="main" depends="clean">
|
||||
<echo message="Building 'Yet Another Java Service Wrapper' ..." />
|
||||
<exec executable="/bin/bash" dir="${gradle.directory}">
|
||||
<arg value="${gradle.build.script}" />
|
||||
</exec>
|
||||
|
||||
<echo message="" />
|
||||
|
||||
<echo message="Copying Built Jars To Destination ... ${destination.directory}" />
|
||||
<copy file="${gradle.directory}/wrapper/build/libs/wrapper.jar"
|
||||
todir="${destination.directory}" />
|
||||
<copy file="${gradle.directory}/wrapper-app/build/libs/wrapperApp.jar"
|
||||
todir="${destination.directory}" />
|
||||
|
||||
<echo message="" />
|
||||
|
||||
<antcall target="clean" />
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<exec executable="/bin/bash" dir="${gradle.directory}">
|
||||
<arg value="${gradle.build.script}" />
|
||||
<arg value="clean" />
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
50
javaUtilities/yajsw/build/MANIFEST.MF
Normal file
50
javaUtilities/yajsw/build/MANIFEST.MF
Normal file
|
@ -0,0 +1,50 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path-Wrapper-Core:
|
||||
./wrapperApp.jar
|
||||
./lib/core/yajsw/ahessian.jar
|
||||
./lib/core/netty/netty-3.5.1.Final.jar
|
||||
./lib/core/jna/jna-3.4.1.jar
|
||||
./lib/core/jna/platform-3.4.1.jar
|
||||
./lib/core/commons/commons-configuration-1.8.jar
|
||||
./lib/core/commons/commons-vfs2-2.0.jar
|
||||
./lib/core/groovy/groovy-all-1.8.6.jar
|
||||
./lib/core/commons/commons-collections-3.2.jar
|
||||
./lib/core/commons/commons-io-1.3.1.jar
|
||||
./lib/core/commons/commons-lang-2.4.jar
|
||||
./lib/core/commons/commons-logging-1.1.jar
|
||||
./lib/core/commons/commons-cli-2-SNAPSHOT.jar
|
||||
./lib/core/regex/jrexx-1.1.1.jar
|
||||
|
||||
Class-Path-Wrapper-Extended:
|
||||
./lib/extended/commons/commons-httpclient-3.0.1.jar
|
||||
./lib/extended/commons/commons-codec-1.3.jar
|
||||
./lib/extended/yajsw/hessian4.jar
|
||||
./lib/extended/hessian/hessian-4.0.2.jar
|
||||
./lib/extended/hessian/servlet-api.jar
|
||||
./lib/extended/glazedlists/glazedlists-1.8.0_java15.jar
|
||||
./lib/extended/glazedlists/commons-beanutils-1.8.2.jar
|
||||
./lib/extended/quartz/quartz-1.8.0.jar
|
||||
./lib/extended/quartz/jta-spec1_0_1.jar
|
||||
./lib/extended/velocity/velocity-1.6.3.jar
|
||||
./lib/extended/jgoodies/forms-1.2.0.jar
|
||||
./lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar
|
||||
./lib/extended/vfs-webdav/xercesImpl.jar
|
||||
./lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar
|
||||
./lib/extended/vfs-webdav/slf4j-api-1.5.0.jar
|
||||
./lib/extended/srvmgr-client/commons-beanutils-1.8.2.jar
|
||||
./lib/extended/srvmgr-client/glazedlists-1.8.0_java15.jar
|
||||
./lib/extended/abeille/formsrt.jar
|
||||
|
||||
Class-Path-App:
|
||||
./wrapper.jar
|
||||
./lib/core/netty/netty-3.5.1.Final.jar
|
||||
./lib/core/commons/commons-configuration-1.8.jar
|
||||
./lib/core/commons/commons-vfs2-2.0.jar
|
||||
./lib/core/groovy/groovy-all-1.8.6.jar
|
||||
./lib/core/commons/commons-collections-3.2.jar
|
||||
./lib/core/commons/commons-io-1.3.1.jar
|
||||
./lib/core/commons/commons-lang-2.4.jar
|
||||
./lib/core/commons/commons-logging-1.1.jar
|
||||
|
||||
Main-Class: org.rzo.yajsw.boot.WrapperExeBooter
|
||||
|
15
javaUtilities/yajsw/build/ReadMe.txt
Normal file
15
javaUtilities/yajsw/build/ReadMe.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
The manifest in this folder should be added to wrapper.jar and wrapperApp.jar
|
||||
It assumes that the relative folder structure of the jar files is not changed.
|
||||
If you would like to change the folder structure you should adapt the manifest accordingly.
|
||||
|
||||
A build script is included in the subfolder gradle.
|
||||
|
||||
Building SNAPSHOT jars is not included in this build. Please use the following subversion
|
||||
revisions to build them:
|
||||
|
||||
commons-vfs-2.0-SNAPSHOT.jar 784083
|
||||
commons-cli-2-SNAPSHOT.jar 647073
|
||||
commons-configuration-1.7-SNAPSHOT.jar 784085
|
||||
|
||||
NOTE: the above projects have not had new releases for years, but have been commiting new features which are used here.
|
4527
javaUtilities/yajsw/build/abeille/ConsoleForm.xml
Normal file
4527
javaUtilities/yajsw/build/abeille/ConsoleForm.xml
Normal file
File diff suppressed because it is too large
Load diff
4
javaUtilities/yajsw/build/abeille/ReadMe.txt
Normal file
4
javaUtilities/yajsw/build/abeille/ReadMe.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
These files have been created with abeille gui designer
|
||||
https://abeille.dev.java.net/
|
||||
|
||||
They are used to generate the according gui classes.
|
1642
javaUtilities/yajsw/build/abeille/WSForm.xml
Normal file
1642
javaUtilities/yajsw/build/abeille/WSForm.xml
Normal file
File diff suppressed because it is too large
Load diff
771
javaUtilities/yajsw/build/abeille/srvmgr_install_dialog.xml
Normal file
771
javaUtilities/yajsw/build/abeille/srvmgr_install_dialog.xml
Normal file
|
@ -0,0 +1,771 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<object classname="com.jeta.forms.store.memento.FormPackage">
|
||||
<at name="fileversion">
|
||||
<object classname="com.jeta.forms.store.memento.FormsVersion2">
|
||||
<at name="major">2</at>
|
||||
<at name="minor">0</at>
|
||||
<at name="sub">0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="form">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">1</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">Z:\dev\forms\abeille-2.1.0_M2\examples\forms\srvmgr_install_dialog.xml</at>
|
||||
<at name="path">forms\srvmgr_install_dialog.xml</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:111PX:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:12DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:143PX:NONE,FILL:249PX:NONE,FILL:DEFAULT:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">7</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">YAJSW Configuration</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">118</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">9</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">embedded.13305839</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:308PX:NONE,FILL:89PX:NONE,FILL:22PX:NONE,FILL:87PX:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">CLOSE</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">83</at>
|
||||
<at name="name">CANCEL_BUTTON</at>
|
||||
<at name="actionCommand">Cancel</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">INSTALL</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">85</at>
|
||||
<at name="name">OK_BUTTON</at>
|
||||
<at name="actionCommand">OK</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"/>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="1">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="4"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">2</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="horizontalAlignment">0</at>
|
||||
<at name="text">Install/Reinstall YAJSW Service</at>
|
||||
<at name="height">15</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">12</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">516</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">7</at>
|
||||
<at name="colspan">2</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JComboBox</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JComboBox</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">20</at>
|
||||
<at name="requestFocusEnabled">false</at>
|
||||
<at name="items">
|
||||
<object classname="com.jeta.forms.store.properties.ItemsProperty">
|
||||
<at name="name">items</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentCount">3</at>
|
||||
<at name="width">388</at>
|
||||
<at name="name">CONFIGURATION</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="editable">true</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">10</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">12</at>
|
||||
<at name="width">516</at>
|
||||
<at name="name">MESSAGE</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">2</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JList</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JList</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="scrollableTracksViewportWidth">true</at>
|
||||
<at name="height">123</at>
|
||||
<at name="items">
|
||||
<object classname="com.jeta.forms.store.properties.ItemsProperty">
|
||||
<at name="name">items</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">137</at>
|
||||
<at name="name">HOSTS_LIST</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">20</at>
|
||||
<at name="horizontalpolicy">30</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scrollableTracksViewportHeight">true</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Hosts</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">118</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"/>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="11">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="1">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="2">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="3">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="4">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="5">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="6">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="7">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="8">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="9">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="10">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
725
javaUtilities/yajsw/build/abeille/srvmgr_newHostDialog.xml
Normal file
725
javaUtilities/yajsw/build/abeille/srvmgr_newHostDialog.xml
Normal file
|
@ -0,0 +1,725 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<object classname="com.jeta.forms.store.memento.FormPackage">
|
||||
<at name="fileversion">
|
||||
<object classname="com.jeta.forms.store.memento.FormsVersion2">
|
||||
<at name="major">2</at>
|
||||
<at name="minor">0</at>
|
||||
<at name="sub">0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="form">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">1</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">Z:\dev\forms\abeille-2.1.0_M2\examples\forms\newHostDialog.xml</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:12DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:143PX:NONE,FILL:120PX:NONE,FILL:DEFAULT:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">6</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Port</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">26</at>
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">2</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="horizontalAlignment">0</at>
|
||||
<at name="text">Add Host</at>
|
||||
<at name="height">15</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">12</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">295</at>
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Host</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">26</at>
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">2</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JTextField</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JTextField</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">20</at>
|
||||
<at name="width">259</at>
|
||||
<at name="name">HOST</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">9</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">12</at>
|
||||
<at name="width">295</at>
|
||||
<at name="name">MESSAGE</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">6</at>
|
||||
<at name="colspan">2</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JTextField</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JTextField</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">20</at>
|
||||
<at name="width">259</at>
|
||||
<at name="name">PORT</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">8</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">embedded.7021349</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:93PX:NONE,FILL:89PX:NONE,FILL:22PX:NONE,FILL:87PX:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">CANCEL</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">83</at>
|
||||
<at name="name">CANCEL_BUTTON</at>
|
||||
<at name="actionCommand">Cancel</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">ADD HOST</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">85</at>
|
||||
<at name="name">OK_BUTTON</at>
|
||||
<at name="actionCommand">OK</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="1">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="4"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"/>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="10">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="1">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="2">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="3">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="4">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="5">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="6">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="7">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="8">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="9">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
|
@ -0,0 +1,734 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<object classname="com.jeta.forms.store.memento.FormPackage">
|
||||
<at name="fileversion">
|
||||
<object classname="com.jeta.forms.store.memento.FormsVersion2">
|
||||
<at name="major">2</at>
|
||||
<at name="minor">0</at>
|
||||
<at name="sub">0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="form">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">1</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">Z:\dev\forms\abeille-2.1.0_M2\examples\forms\srvmgr_reload_console.xml</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:12DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:143PX:NONE,FILL:249PX:NONE,FILL:DEFAULT:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">6</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">YAJSW Configuration</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">118</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">8</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">embedded.31326333</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:308PX:NONE,FILL:89PX:NONE,FILL:22PX:NONE,FILL:87PX:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">CLOSE</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">83</at>
|
||||
<at name="name">CANCEL_BUTTON</at>
|
||||
<at name="actionCommand">Cancel</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">INSTALL</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">85</at>
|
||||
<at name="name">OK_BUTTON</at>
|
||||
<at name="actionCommand">OK</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"/>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="1">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="4"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">2</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="horizontalAlignment">0</at>
|
||||
<at name="text">Reload YAJSW Console Application</at>
|
||||
<at name="height">15</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">12</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">516</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">6</at>
|
||||
<at name="colspan">2</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JComboBox</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JComboBox</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">20</at>
|
||||
<at name="requestFocusEnabled">false</at>
|
||||
<at name="items">
|
||||
<object classname="com.jeta.forms.store.properties.ItemsProperty">
|
||||
<at name="name">items</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentCount">3</at>
|
||||
<at name="width">388</at>
|
||||
<at name="name">CONFIGURATION</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="editable">true</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Console</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="name"/>
|
||||
<at name="width">118</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JTextField</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JTextField</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="enabled">false</at>
|
||||
<at name="height">20</at>
|
||||
<at name="width">139</at>
|
||||
<at name="name">SERVICE</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">9</at>
|
||||
<at name="colspan">4</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="height">12</at>
|
||||
<at name="width">516</at>
|
||||
<at name="name">MESSAGE</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"/>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="10">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="1">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="2">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="3">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="4">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="5">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="6">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="7">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="8">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
<at name="item" index="9">
|
||||
<object classname="[Ljava.lang.Object;" size="6"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
508
javaUtilities/yajsw/build/abeille/srvmgr_uninstall_dialog.xml
Normal file
508
javaUtilities/yajsw/build/abeille/srvmgr_uninstall_dialog.xml
Normal file
|
@ -0,0 +1,508 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<object classname="com.jeta.forms.store.memento.FormPackage">
|
||||
<at name="fileversion">
|
||||
<object classname="com.jeta.forms.store.memento.FormsVersion2">
|
||||
<at name="major">2</at>
|
||||
<at name="minor">0</at>
|
||||
<at name="sub">0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="form">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">1</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">6.Do, Dez 3, 2009 - 10:23:25</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:8DLU:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">4</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">The following services will be removed. Note: only YAJSW can be removed</at>
|
||||
<at name="height">14</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">11</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">415</at>
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">6</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Host/service name, Host/Service name</at>
|
||||
<at name="height">14</at>
|
||||
<at name="width">415</at>
|
||||
<at name="name">SERVICES</at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.FormMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">8</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
|
||||
</super>
|
||||
<at name="id">embedded.8.Do, Dez 3, 2009 - 10:26:04</at>
|
||||
<at name="rowspecs">CENTER:DEFAULT:NONE</at>
|
||||
<at name="colspecs">FILL:280PX:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at>
|
||||
<at name="components">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">4</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">Cancel</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">64</at>
|
||||
<at name="name">CANCEL_BUTTON</at>
|
||||
<at name="actionCommand">Cancel</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">1</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">javax.swing.JButton</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">javax.swing.JButton</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="text">OK</at>
|
||||
<at name="height">22</at>
|
||||
<at name="width">46</at>
|
||||
<at name="name">OK_BUTTON</at>
|
||||
<at name="actionCommand">OK</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="1">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="4"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
||||
<super classname="com.jeta.forms.store.memento.ComponentMemento">
|
||||
<at name="cellconstraints">
|
||||
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
|
||||
<at name="column">2</at>
|
||||
<at name="row">2</at>
|
||||
<at name="colspan">1</at>
|
||||
<at name="rowspan">1</at>
|
||||
<at name="halign">default</at>
|
||||
<at name="valign">default</at>
|
||||
<at name="insets" object="insets">0,0,0,0</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
|
||||
</super>
|
||||
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
|
||||
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="beanproperties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="horizontalAlignment">0</at>
|
||||
<at name="text">Uninstall Services</at>
|
||||
<at name="height">15</at>
|
||||
<at name="font">
|
||||
<object classname="com.jeta.forms.store.properties.FontProperty">
|
||||
<at name="family">Tahoma</at>
|
||||
<at name="style">1</at>
|
||||
<at name="size">12</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="width">415</at>
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList">
|
||||
<item >
|
||||
<at name="value">
|
||||
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</item>
|
||||
</object>
|
||||
</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.memento.PropertiesMemento">
|
||||
<at name="classname">com.jeta.forms.gui.form.GridView</at>
|
||||
<at name="properties">
|
||||
<object classname="com.jeta.forms.store.support.PropertyMap">
|
||||
<at name="name"></at>
|
||||
<at name="fill">
|
||||
<object classname="com.jeta.forms.store.properties.effects.PaintProperty">
|
||||
<at name="name">fill</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="scollBars">
|
||||
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
|
||||
<at name="name">scollBars</at>
|
||||
<at name="verticalpolicy">21</at>
|
||||
<at name="horizontalpolicy">31</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="border">
|
||||
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
|
||||
<super classname="com.jeta.forms.store.properties.BorderProperty">
|
||||
<at name="name">border</at>
|
||||
</super>
|
||||
<at name="borders">
|
||||
<object classname="java.util.LinkedList"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="cellpainters">
|
||||
<object classname="com.jeta.forms.store.support.Matrix">
|
||||
<at name="rows">
|
||||
<object classname="[Ljava.lang.Object;" size="9">
|
||||
<at name="item" index="0">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="1">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="2">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="3">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="4">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="5">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="6">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="7">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
<at name="item" index="8">
|
||||
<object classname="[Ljava.lang.Object;" size="3"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="rowgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
<at name="colgroups">
|
||||
<object classname="com.jeta.forms.store.memento.FormGroupSet">
|
||||
<at name="groups">
|
||||
<object classname="java.util.HashMap"/>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
||||
</at>
|
||||
</object>
|
1354
javaUtilities/yajsw/build/abeille/srvmgr_window.xml
Normal file
1354
javaUtilities/yajsw/build/abeille/srvmgr_window.xml
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
#Tue Feb 19 12:06:40 CST 2013
|
18
javaUtilities/yajsw/build/gradle/ahessian/build.gradle
Normal file
18
javaUtilities/yajsw/build/gradle/ahessian/build.gradle
Normal file
|
@ -0,0 +1,18 @@
|
|||
projectHome = '../../..'
|
||||
|
||||
sourceSets.main.java.srcDirs = ["$projectHome/src/ahessian"]
|
||||
|
||||
// this project uses the ahessian sub-project
|
||||
dependencies {
|
||||
compile project(':hessian4')
|
||||
compile group: 'netty', name: 'netty', version: "$netty_version"
|
||||
}
|
||||
|
||||
println '---------------------------'
|
||||
println 'dependency jars:'
|
||||
println '---------------------------'
|
||||
configurations.compile.each { File file -> println file.absolutePath }
|
||||
println '---------------------------'
|
||||
|
||||
jar.baseName = 'ahessian'
|
||||
|
69
javaUtilities/yajsw/build/gradle/build.gradle
Normal file
69
javaUtilities/yajsw/build/gradle/build.gradle
Normal file
|
@ -0,0 +1,69 @@
|
|||
task createWrapper(type: Wrapper) {
|
||||
gradleVersion = '0.9.2'
|
||||
}
|
||||
|
||||
projectHome = '../..'
|
||||
defaultTasks 'clean', 'build'
|
||||
|
||||
// common settings for all sub-projects
|
||||
subprojects {
|
||||
|
||||
apply plugin: 'java'
|
||||
defaultTasks 'clean', 'build'
|
||||
|
||||
coreLibsDir = "$projectHome/lib/core"
|
||||
extendedLibsDir = "$projectHome/lib/extended"
|
||||
|
||||
// dependency versions
|
||||
|
||||
commons_cli_version = '2-SNAPSHOT'
|
||||
commons_collections_version = '3.2'
|
||||
commons_configuration_version = '1.8'
|
||||
commons_io_version = '1.3.1'
|
||||
commons_lang_version = '2.4'
|
||||
commons_logging_version = '1.1'
|
||||
commons_vfs2_version = '2.0'
|
||||
groovy_all_version = '1.8.6'
|
||||
jna_version = '3.4.1'
|
||||
platform_version = '3.4.1'
|
||||
netty_version = '3.5.1.Final'
|
||||
jrexx_version = '1.1.1'
|
||||
quartz_version = '1.8.0'
|
||||
formsrt_version = ''
|
||||
forms_version = '1.2.0'
|
||||
velocity_version = '1.6.3'
|
||||
glazedlists_version = '1.8.0_java15'
|
||||
commons_beanutils_version = '1.8.2'
|
||||
|
||||
|
||||
|
||||
|
||||
// for simplicity and to avoid dependency issues which arise due to the usage of SNAPSHOT libs
|
||||
// we use libs from local disk instead of public repository
|
||||
repositories {
|
||||
flatDir name: 'localRepository',
|
||||
dirs: [
|
||||
"$coreLibsDir/commons",
|
||||
"$coreLibsDir/groovy",
|
||||
"$coreLibsDir/jna",
|
||||
"$coreLibsDir/netty",
|
||||
"$coreLibsDir/regex",
|
||||
"$coreLibsDir/yajsw",
|
||||
"$extendedLibsDir/quartz",
|
||||
"$extendedLibsDir/abeille",
|
||||
"$extendedLibsDir/jgoodies",
|
||||
"$extendedLibsDir/glazedlists",
|
||||
"$extendedLibsDir/velocity"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
version = ''
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
BIN
javaUtilities/yajsw/build/gradle/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
javaUtilities/yajsw/build/gradle/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
javaUtilities/yajsw/build/gradle/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
javaUtilities/yajsw/build/gradle/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
#Thu Feb 10 17:06:13 CET 2011
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=gradle-0.9.2-bin.zip
|
84
javaUtilities/yajsw/build/gradle/gradlew.bat
vendored
Normal file
84
javaUtilities/yajsw/build/gradle/gradlew.bat
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem ##
|
||||
@rem Gradle startup script for Windows ##
|
||||
@rem ##
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=srvproxy.init-ka.lan -Dhttp.proxyPort=8080
|
||||
|
||||
@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
|
||||
@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
|
||||
@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.\
|
||||
|
||||
@rem Find java.exe
|
||||
set JAVA_EXE=java.exe
|
||||
if not defined JAVA_HOME goto init
|
||||
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo.
|
||||
goto end
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
|
||||
set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
|
||||
|
||||
set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
|
||||
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
|
||||
exit /b "%ERRORLEVEL%"
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
169
javaUtilities/yajsw/build/gradle/gradlew.sh
Normal file
169
javaUtilities/yajsw/build/gradle/gradlew.sh
Normal file
|
@ -0,0 +1,169 @@
|
|||
#!/bin/bash
|
||||
|
||||
##############################################################################
|
||||
## ##
|
||||
## Gradle wrapper script for UN*X ##
|
||||
## ##
|
||||
##############################################################################
|
||||
|
||||
# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
|
||||
# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
|
||||
# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
|
||||
JAVA_OPTS="$JAVA_OPTS -Dhttp.pxoyPort=80 -Dhttp.proxyHost=http://proxy.ext.ray.com"
|
||||
|
||||
GRADLE_APP_NAME=Gradle
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set JAVA_HOME if it's not already set.
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if $darwin ; then
|
||||
[ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
|
||||
[ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
|
||||
else
|
||||
javaExecutable="`which javac`"
|
||||
[ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
[ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
export JAVA_HOME="$javaHome"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
|
||||
CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
|
||||
WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
fi
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
warn "JAVA_HOME environment variable is not set"
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
|
||||
if $darwin; then
|
||||
JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
|
||||
# we may also want to set -Xdock:image
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
GRADLE_APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
|
||||
-Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
|
||||
$STARTER_MAIN_CLASS \
|
||||
"$@"
|
16
javaUtilities/yajsw/build/gradle/hessian4/build.gradle
Normal file
16
javaUtilities/yajsw/build/gradle/hessian4/build.gradle
Normal file
|
@ -0,0 +1,16 @@
|
|||
projectHome = '../../..'
|
||||
|
||||
sourceSets.main.java.srcDirs = ["$projectHome/src/hessian"]
|
||||
|
||||
dependencies {
|
||||
compile group: 'netty', name: 'netty', version: "$netty_version"
|
||||
}
|
||||
|
||||
println '---------------------------'
|
||||
println 'dependency jars:'
|
||||
println '---------------------------'
|
||||
configurations.compile.each { File file -> println file.absolutePath }
|
||||
println '---------------------------'
|
||||
|
||||
jar.baseName = 'hessian4'
|
||||
|
25
javaUtilities/yajsw/build/gradle/readMe.txt
Normal file
25
javaUtilities/yajsw/build/gradle/readMe.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
YAJSW uses gradle as build tool:
|
||||
|
||||
http://www.gradle.org/
|
||||
|
||||
The build is a multi project script. Gradle requires per project a build folder.
|
||||
The following build folders are used:
|
||||
|
||||
wrapper -> wrapper.jar main yajsw jar
|
||||
wrapper-app -> wrapperApp.jar wraps the application
|
||||
ahessian -> ahessian.jar netty/hessian based asynch communication between wrapper and system tray icon. hessian packages renamed to avoid conflict with existing hessian libs
|
||||
srvmgr -> srvmgr.jar experimental - monitoring of multiple servers
|
||||
|
||||
To execute a build:
|
||||
- <yajsw>/build/gradle
|
||||
- Navigte with a console to <yajsw>/build/gradle
|
||||
- If you are behind a http proxy edit gradlew.bat/gardlew.sh and set the proxy in the java options
|
||||
- execute gradlew
|
||||
|
||||
This will download gradle and execute the build script.
|
||||
|
||||
The produced jar files are found in the folders:
|
||||
|
||||
<yajsw>/build/gradle/<sub-project>/build/libs
|
||||
|
||||
Eclipse project files can be generated by adding the according gradle tasks to the gradle build scripts.
|
2
javaUtilities/yajsw/build/gradle/settings.gradle
Normal file
2
javaUtilities/yajsw/build/gradle/settings.gradle
Normal file
|
@ -0,0 +1,2 @@
|
|||
// defines a list of subprojects
|
||||
include "wrapper", "wrapper-app", "ahessian", "hessian4", "srvmgr"
|
32
javaUtilities/yajsw/build/gradle/srvmgr/build.gradle
Normal file
32
javaUtilities/yajsw/build/gradle/srvmgr/build.gradle
Normal file
|
@ -0,0 +1,32 @@
|
|||
projectHome = '../../..'
|
||||
|
||||
sourceSets.main.java.srcDirs = ["$projectHome/src/srvmgr/java"]
|
||||
|
||||
dependencies {
|
||||
compile project(':wrapper')
|
||||
compile project(':ahessian')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile group: 'netty', name: 'netty', version: "$netty_version"
|
||||
compile group: 'glazedlists', name: 'glazedlists', version: "$glazedlists_version"
|
||||
compile group: 'commons-beanutils', name: 'commons-beanutils', version: "$commons_beanutils_version"
|
||||
compile group: 'commons-configuration', name: 'commons-configuration', version: "$commons_configuration_version"
|
||||
compile group: 'groovy-all', name: 'groovy-all', version: "$groovy_all_version"
|
||||
compile group: 'jna', name: 'jna', version: "$jna_version"
|
||||
compile group: 'platform', name: 'platform', version: "$platform_version"
|
||||
compile group: 'abeille', name: 'formsrt', version: "$formsrt_version"
|
||||
compile group: 'forms', name: 'forms', version: "$forms_version"
|
||||
|
||||
}
|
||||
|
||||
//println '---------------------------'
|
||||
//println 'dependency jars:'
|
||||
//println '---------------------------'
|
||||
//configurations.compile.each { File file -> println file.absolutePath }
|
||||
//println '---------------------------'
|
||||
|
||||
// name of jar
|
||||
jar.baseName = 'srvmgr'
|
||||
|
||||
// use default manifest
|
31
javaUtilities/yajsw/build/gradle/wrapper-app/build.gradle
Normal file
31
javaUtilities/yajsw/build/gradle/wrapper-app/build.gradle
Normal file
|
@ -0,0 +1,31 @@
|
|||
projectHome = '../../..'
|
||||
sourceSets.main.java.srcDirs = ["$projectHome/src/app"]
|
||||
|
||||
dependencies {
|
||||
compile project(':wrapper')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile group: 'commons-collections', name: 'commons-collections', version: "$commons_collections_version"
|
||||
compile group: 'commons-configuration', name: 'commons-configuration', version: "$commons_configuration_version"
|
||||
compile group: 'commons-io', name: 'commons-io', version: "$commons_io_version"
|
||||
compile group: 'commons-lang', name: 'commons-lang', version: "$commons_lang_version"
|
||||
compile group: 'commons-logging', name: 'commons-logging', version: "$commons_logging_version"
|
||||
compile group: 'netty', name: 'netty', version: "$netty_version"
|
||||
}
|
||||
|
||||
//println '---------------------------'
|
||||
//println 'dependency jars:'
|
||||
//println '---------------------------'
|
||||
//configurations.compile.each { File file -> println file.absolutePath }
|
||||
//println '---------------------------'
|
||||
|
||||
// name of jar file
|
||||
jar.baseName = 'wrapperApp'
|
||||
|
||||
// TODO generate manifest
|
||||
jar {
|
||||
manifest {
|
||||
from '../../MANIFEST.MF'
|
||||
}
|
||||
}
|
54
javaUtilities/yajsw/build/gradle/wrapper/build.gradle
vendored
Normal file
54
javaUtilities/yajsw/build/gradle/wrapper/build.gradle
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
projectHome = '../../..'
|
||||
|
||||
// set the sources for this build
|
||||
sourceSets.main.java.srcDirs = ["$projectHome/src/main/java", "$projectHome/src/app/java"]
|
||||
sourceSets.main.resources.srcDirs = ["$projectHome/src/main/java"]
|
||||
sourceSets.main.resources.includes = ['resources/*']
|
||||
|
||||
// this project uses the ahessian sub-project
|
||||
dependencies {
|
||||
compile project(':ahessian')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile group: 'commons-cli', name: 'commons-cli', version: "$commons_cli_version"
|
||||
compile group: 'commons-collections', name: 'commons-collections', version: "$commons_collections_version"
|
||||
compile group: 'commons-configuration', name: 'commons-configuration', version: "$commons_configuration_version"
|
||||
compile group: 'commons-io', name: 'commons-io', version: "$commons_io_version"
|
||||
compile group: 'commons-lang', name: 'commons-lang', version: "$commons_lang_version"
|
||||
compile group: 'commons-logging', name: 'commons-logging', version: "$commons_logging_version"
|
||||
compile group: 'commons-vfs2', name: 'commons-vfs2', version: "$commons_vfs2_version"
|
||||
compile group: 'groovy-all', name: 'groovy-all', version: "$groovy_all_version"
|
||||
compile group: 'jna', name: 'jna', version: "$jna_version"
|
||||
compile group: 'platform', name: 'platform', version: "$platform_version"
|
||||
compile group: 'netty', name: 'netty', version: "$netty_version"
|
||||
compile group: 'jrexx', name: 'jrexx', version: "$jrexx_version"
|
||||
compile group: 'quartz', name: 'quartz', version: "$quartz_version"
|
||||
compile group: 'abeille', name: 'formsrt', version: "$formsrt_version"
|
||||
compile group: 'forms', name: 'forms', version: "$forms_version"
|
||||
compile group: 'velocity', name: 'velocity', version: "$velocity_version"
|
||||
}
|
||||
|
||||
//println '---------------------------'
|
||||
//println 'dependency jars:'
|
||||
//println '---------------------------'
|
||||
//configurations.compile.each { File file -> println file.absolutePath }
|
||||
//println '---------------------------'
|
||||
|
||||
// name of jar file
|
||||
jar.baseName = 'wrapper'
|
||||
|
||||
// TODO generate manifest instead of editing
|
||||
jar {
|
||||
manifest {
|
||||
from '../../MANIFEST.MF'
|
||||
}
|
||||
exclude 'org/rzo/yajsw/app/AbstractWrapperJVMMain*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperGroovyMain*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperJVMMain*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperMainServiceUnix*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperMainServiceWin*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperManager.class'
|
||||
exclude 'org/rzo/yajsw/app/WrapperManagerClassLoader*'
|
||||
exclude 'org/rzo/yajsw/app/WrapperManagerProxy*'
|
||||
}
|
4
javaUtilities/yajsw/build/ws/ReadMe.txt
Normal file
4
javaUtilities/yajsw/build/ws/ReadMe.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
These are files used to sign wrapperWS.jar
|
||||
It is taken from
|
||||
|
||||
http://weblogs.java.net/blog/kirillcool/archive/2005/05/signing_jars_fo.html
|
1
javaUtilities/yajsw/build/ws/genKeyStore.bat
Normal file
1
javaUtilities/yajsw/build/ws/genKeyStore.bat
Normal file
|
@ -0,0 +1 @@
|
|||
keytool -genkey -keystore jaxb.keys -alias https://jaxb-workshop.dev.java.net/ -validity 1491
|
BIN
javaUtilities/yajsw/build/ws/jaxb.keys
Normal file
BIN
javaUtilities/yajsw/build/ws/jaxb.keys
Normal file
Binary file not shown.
1
javaUtilities/yajsw/build/ws/sign.bat
Normal file
1
javaUtilities/yajsw/build/ws/sign.bat
Normal file
|
@ -0,0 +1 @@
|
|||
jarsigner -keystore jaxb.keys -storepass testyajsw ../wrapperWS.jar https://jaxb-workshop.dev.java.net/
|
23
javaUtilities/yajsw/lib/core/ReadMe.txt
Normal file
23
javaUtilities/yajsw/lib/core/ReadMe.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
This is the minimal set of libraries required by YAJSW
|
||||
|
||||
It includes the following core functionalities:
|
||||
|
||||
All platforms
|
||||
* runConsole
|
||||
* filter triggers
|
||||
* regex filter triggers
|
||||
* logging
|
||||
* restart on exit code
|
||||
* groovy scripting
|
||||
* network start
|
||||
|
||||
Windows
|
||||
* installService, uninstallService, startService, stopService
|
||||
|
||||
It does not include the following functions:
|
||||
|
||||
* installDaemon, uninstallDaemon, startDaemon, stopDaemon
|
||||
* system tray icon
|
||||
* timers
|
||||
* services manager
|
||||
* network start per webdav or http or ftp
|
BIN
javaUtilities/yajsw/lib/core/commons/commons-cli-2-SNAPSHOT.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-cli-2-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/commons/commons-collections-3.2.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-collections-3.2.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/commons/commons-io-1.3.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-io-1.3.1.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/commons/commons-lang-2.4.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-lang-2.4.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/commons/commons-logging-1.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-logging-1.1.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/commons/commons-vfs2-2.0.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/commons/commons-vfs2-2.0.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/groovy/groovy-all-1.8.6.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/groovy/groovy-all-1.8.6.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/jna/jna-3.4.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/jna/jna-3.4.1.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/jna/platform-3.4.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/jna/platform-3.4.1.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/netty/netty-3.5.1.Final.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/netty/netty-3.5.1.Final.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/regex/jrexx-1.1.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/regex/jrexx-1.1.1.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/core/yajsw/ahessian.jar
Normal file
BIN
javaUtilities/yajsw/lib/core/yajsw/ahessian.jar
Normal file
Binary file not shown.
25
javaUtilities/yajsw/lib/extended/ReadMe.txt
Normal file
25
javaUtilities/yajsw/lib/extended/ReadMe.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
The following libraries provide extended functionalites to YAJSW:
|
||||
|
||||
Timers require:
|
||||
* quartz
|
||||
|
||||
Posix Installation of daemons requires:
|
||||
* velocity
|
||||
|
||||
System tray requires:
|
||||
* abeille
|
||||
* jgoodies
|
||||
* yajsw
|
||||
|
||||
ServiceManager requires:
|
||||
* abeille
|
||||
* jgoodies
|
||||
* glazed lists
|
||||
* hessian
|
||||
|
||||
Network loading in general
|
||||
* commons
|
||||
|
||||
Network loading per webdav
|
||||
* vfs-webdav
|
||||
|
BIN
javaUtilities/yajsw/lib/extended/abeille/formsrt.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/abeille/formsrt.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/commons/commons-codec-1.3.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/commons/commons-codec-1.3.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/commons/commons-net-1.4.1.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/commons/commons-net-1.4.1.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/jgoodies/forms-1.2.0.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/jgoodies/forms-1.2.0.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/quartz/quartz-1.8.0.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/quartz/quartz-1.8.0.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/velocity/velocity-1.6.3.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/velocity/velocity-1.6.3.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/vfs-webdav/xercesImpl.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/vfs-webdav/xercesImpl.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/yajsw/hessian4.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/yajsw/hessian4.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/extended/yajsw/srvmgr.jar
Normal file
BIN
javaUtilities/yajsw/lib/extended/yajsw/srvmgr.jar
Normal file
Binary file not shown.
11
javaUtilities/yajsw/lib/groovy/ReadMe.txt
Normal file
11
javaUtilities/yajsw/lib/groovy/ReadMe.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
The following libraries are loaded when a groovy script is executed.
|
||||
To add libraries required by groovy scripts create a folder here and add the jar files to the folder.
|
||||
|
||||
sendMail.gv requires:
|
||||
* mail
|
||||
|
||||
sendSnmpTrap.gv requires:
|
||||
* snmp
|
||||
|
||||
timeCondition.gv requires:
|
||||
* joda
|
BIN
javaUtilities/yajsw/lib/groovy/joda/joda-time-1.6.jar
Normal file
BIN
javaUtilities/yajsw/lib/groovy/joda/joda-time-1.6.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/groovy/mail/activation.jar
Normal file
BIN
javaUtilities/yajsw/lib/groovy/mail/activation.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/groovy/mail/mail.jar
Normal file
BIN
javaUtilities/yajsw/lib/groovy/mail/mail.jar
Normal file
Binary file not shown.
BIN
javaUtilities/yajsw/lib/groovy/snmp/SNMP4J.jar
Normal file
BIN
javaUtilities/yajsw/lib/groovy/snmp/SNMP4J.jar
Normal file
Binary file not shown.
|
@ -0,0 +1,264 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* @author frederic bregier
|
||||
*/
|
||||
public abstract class CIDR implements Comparable<CIDR>
|
||||
{
|
||||
/**
|
||||
* The base address of the CIDR notation
|
||||
*/
|
||||
protected InetAddress baseAddress;
|
||||
|
||||
/**
|
||||
* The mask used in the CIDR notation
|
||||
*/
|
||||
protected int cidrMask;
|
||||
|
||||
/**
|
||||
* Create CIDR using the CIDR Notation
|
||||
* @param baseAddress
|
||||
* @param cidrMask
|
||||
* @return the generated CIDR
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public static CIDR newCIDR(InetAddress baseAddress, int cidrMask) throws UnknownHostException
|
||||
{
|
||||
if (cidrMask < 0)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
if (baseAddress instanceof Inet4Address)
|
||||
{
|
||||
if (cidrMask > 32)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
return new CIDR4((Inet4Address) baseAddress, cidrMask);
|
||||
}
|
||||
// IPv6.
|
||||
if (cidrMask > 128)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
return new CIDR6((Inet6Address) baseAddress, cidrMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create CIDR using the normal Notation
|
||||
* @param baseAddress
|
||||
* @param scidrMask
|
||||
* @return the generated CIDR
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public static CIDR newCIDR(InetAddress baseAddress, String scidrMask) throws UnknownHostException
|
||||
{
|
||||
int cidrMask = getNetMask(scidrMask);
|
||||
if (cidrMask < 0)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
if (baseAddress instanceof Inet4Address)
|
||||
{
|
||||
if (cidrMask > 32)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
return new CIDR4((Inet4Address) baseAddress, cidrMask);
|
||||
}
|
||||
cidrMask += 96;
|
||||
// IPv6.
|
||||
if (cidrMask > 128)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + cidrMask);
|
||||
}
|
||||
return new CIDR6((Inet6Address) baseAddress, cidrMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create CIDR using the CIDR or normal Notation<BR>
|
||||
* i.e.:
|
||||
* CIDR subnet = newCIDR ("10.10.10.0/24"); or
|
||||
* CIDR subnet = newCIDR ("1fff:0:0a88:85a3:0:0:ac1f:8001/24"); or
|
||||
* CIDR subnet = newCIDR ("10.10.10.0/255.255.255.0");
|
||||
* @param cidr
|
||||
* @return the generated CIDR
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public static CIDR newCIDR(String cidr) throws UnknownHostException
|
||||
{
|
||||
int p = cidr.indexOf("/");
|
||||
if (p < 0)
|
||||
{
|
||||
throw new UnknownHostException("Invalid CIDR notation used: " + cidr);
|
||||
}
|
||||
String addrString = cidr.substring(0, p);
|
||||
String maskString = cidr.substring(p + 1);
|
||||
InetAddress addr = addressStringToInet(addrString);
|
||||
int mask = 0;
|
||||
if (maskString.indexOf(".") < 0)
|
||||
{
|
||||
mask = parseInt(maskString, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mask = getNetMask(maskString);
|
||||
if (addr instanceof Inet6Address)
|
||||
{
|
||||
mask += 96;
|
||||
}
|
||||
}
|
||||
if (mask < 0)
|
||||
{
|
||||
throw new UnknownHostException("Invalid mask length used: " + maskString);
|
||||
}
|
||||
return newCIDR(addr, mask);
|
||||
}
|
||||
|
||||
/** @return the baseAddress of the CIDR block. */
|
||||
public InetAddress getBaseAddress()
|
||||
{
|
||||
return baseAddress;
|
||||
}
|
||||
|
||||
/** @return the Mask length. */
|
||||
public int getMask()
|
||||
{
|
||||
return cidrMask;
|
||||
}
|
||||
|
||||
/** @return the textual CIDR notation. */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return baseAddress.getHostAddress() + "/" + cidrMask;
|
||||
}
|
||||
|
||||
/** @return the end address of this block. */
|
||||
public abstract InetAddress getEndAddress();
|
||||
|
||||
/**
|
||||
* Compares the given InetAddress against the CIDR and returns true if
|
||||
* the ip is in the subnet-ip-range and false if not.
|
||||
* @param inetAddress
|
||||
* @return returns true if the given IP address is inside the currently
|
||||
* set network.
|
||||
*/
|
||||
public abstract boolean contains(InetAddress inetAddress);
|
||||
|
||||
/** Convert an IPv4 or IPv6 textual representation into an
|
||||
* InetAddress.
|
||||
* @param addr
|
||||
* @return the created InetAddress
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
private static InetAddress addressStringToInet(String addr) throws UnknownHostException
|
||||
{
|
||||
return InetAddress.getByName(addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Subnet's Netmask in Decimal format.<BR>
|
||||
* i.e.: getNetMask("255.255.255.0") returns the integer CIDR mask
|
||||
* @param netMask a network mask
|
||||
* @return the integer CIDR mask
|
||||
* */
|
||||
private static int getNetMask(String netMask)
|
||||
{
|
||||
StringTokenizer nm = new StringTokenizer(netMask, ".");
|
||||
int i = 0;
|
||||
int[] netmask = new int[4];
|
||||
while (nm.hasMoreTokens())
|
||||
{
|
||||
netmask[i] = Integer.parseInt(nm.nextToken());
|
||||
i++;
|
||||
}
|
||||
int mask1 = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
mask1 += Integer.bitCount(netmask[i]);
|
||||
}
|
||||
return mask1;
|
||||
}
|
||||
|
||||
/** @param intstr a string containing an integer.
|
||||
* @param def the default if the string does not contain a valid
|
||||
* integer.
|
||||
* @return the inetAddress from the integer
|
||||
*/
|
||||
private static int parseInt(String intstr, int def)
|
||||
{
|
||||
Integer res;
|
||||
if (intstr == null)
|
||||
{
|
||||
return def;
|
||||
}
|
||||
try
|
||||
{
|
||||
res = Integer.decode(intstr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
res = new Integer(def);
|
||||
}
|
||||
return res.intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute a byte representation of IpV4 from a IpV6
|
||||
* @param address
|
||||
* @return the byte representation
|
||||
* @throws IllegalArgumentException if the IpV6 cannot be mapped to IpV4
|
||||
*/
|
||||
public static byte[] getIpV4FromIpV6(Inet6Address address) throws IllegalArgumentException
|
||||
{
|
||||
byte[] baddr = address.getAddress();
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
if (baddr[i] != 0)
|
||||
{
|
||||
throw new IllegalArgumentException("This IPv6 address cannot be used in IPv4 context");
|
||||
}
|
||||
}
|
||||
if (baddr[10] != 0 && baddr[10] != 0xFF || baddr[11] != 0 && baddr[11] != 0xFF)
|
||||
{
|
||||
throw new IllegalArgumentException("This IPv6 address cannot be used in IPv4 context");
|
||||
}
|
||||
return new byte[]
|
||||
{baddr[12], baddr[13], baddr[14], baddr[15]};
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute a byte representation of IpV6 from a IpV4
|
||||
* @param address
|
||||
* @return the byte representation
|
||||
* @throws IllegalArgumentException if the IpV6 cannot be mapped to IpV4
|
||||
*/
|
||||
public static byte[] getIpV6FromIpV4(Inet4Address address) throws IllegalArgumentException
|
||||
{
|
||||
byte[] baddr = address.getAddress();
|
||||
return new byte[]
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, baddr[0], baddr[1], baddr[2], baddr[3]};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* @author frederic bregier
|
||||
*/
|
||||
public class CIDR4 extends CIDR
|
||||
{
|
||||
/**
|
||||
* The integer for the base address
|
||||
*/
|
||||
private int addressInt;
|
||||
|
||||
/**
|
||||
* The integer for the end address
|
||||
*/
|
||||
private final int addressEndInt;
|
||||
|
||||
/**
|
||||
* @param newaddr
|
||||
* @param mask
|
||||
*/
|
||||
protected CIDR4(Inet4Address newaddr, int mask)
|
||||
{
|
||||
cidrMask = mask;
|
||||
addressInt = ipv4AddressToInt(newaddr);
|
||||
int newmask = ipv4PrefixLengthToMask(mask);
|
||||
addressInt &= newmask;
|
||||
try
|
||||
{
|
||||
baseAddress = intToIPv4Address(addressInt);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
// this should never happen
|
||||
}
|
||||
addressEndInt = addressInt + ipv4PrefixLengthToLength(cidrMask) - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetAddress getEndAddress()
|
||||
{
|
||||
try
|
||||
{
|
||||
return intToIPv4Address(addressEndInt);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
// this should never happen
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int compareTo(CIDR arg)
|
||||
{
|
||||
if (arg instanceof CIDR6)
|
||||
{
|
||||
byte[] address = getIpV4FromIpV6((Inet6Address) arg.baseAddress);
|
||||
int net = ipv4AddressToInt(address);
|
||||
if (net == addressInt && arg.cidrMask == cidrMask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (net < addressInt)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (net > addressInt)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (arg.cidrMask < cidrMask)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
CIDR4 o = (CIDR4) arg;
|
||||
if (o.addressInt == addressInt && o.cidrMask == cidrMask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (o.addressInt < addressInt)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (o.addressInt > addressInt)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (o.cidrMask < cidrMask)
|
||||
{
|
||||
// greater Mask means less IpAddresses so -1
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.CIDR#contains(java.net.InetAddress)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(InetAddress inetAddress)
|
||||
{
|
||||
int search = ipv4AddressToInt(inetAddress);
|
||||
return search >= addressInt && search <= addressEndInt;
|
||||
}
|
||||
|
||||
/** Given an IPv4 baseAddress length, return the block length. I.e., a
|
||||
* baseAddress length of 24 will return 256. */
|
||||
private static int ipv4PrefixLengthToLength(int prefix_length)
|
||||
{
|
||||
return 1 << 32 - prefix_length;
|
||||
}
|
||||
|
||||
/** Given a baseAddress length, return a netmask. I.e, a baseAddress length
|
||||
* of 24 will return 0xFFFFFF00. */
|
||||
private static int ipv4PrefixLengthToMask(int prefix_length)
|
||||
{
|
||||
return ~((1 << 32 - prefix_length) - 1);
|
||||
}
|
||||
|
||||
/** Convert an integer into an (IPv4) InetAddress.
|
||||
* @param addr
|
||||
* @return the created InetAddress
|
||||
* @throws UnknownHostException
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
private static InetAddress intToIPv4Address(int addr) throws UnknownHostException
|
||||
{
|
||||
byte[] a = new byte[4];
|
||||
a[0] = (byte) (addr >> 24 & 0xFF);
|
||||
a[1] = (byte) (addr >> 16 & 0xFF);
|
||||
a[2] = (byte) (addr >> 8 & 0xFF);
|
||||
a[3] = (byte) (addr & 0xFF);
|
||||
return InetAddress.getByAddress(a);
|
||||
}
|
||||
|
||||
/** Given an IPv4 address, convert it into an integer.
|
||||
* @param addr
|
||||
* @return the integer representation of the InetAddress
|
||||
*
|
||||
* @throws IllegalArgumentException if the address is really an
|
||||
* IPv6 address.
|
||||
*/
|
||||
private static int ipv4AddressToInt(InetAddress addr)
|
||||
{
|
||||
byte[] address = null;
|
||||
if (addr instanceof Inet6Address)
|
||||
{
|
||||
address = getIpV4FromIpV6((Inet6Address) addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
address = addr.getAddress();
|
||||
}
|
||||
return ipv4AddressToInt(address);
|
||||
}
|
||||
|
||||
/** Given an IPv4 address as array of bytes, convert it into an integer.
|
||||
* @param address
|
||||
* @return the integer representation of the InetAddress
|
||||
*
|
||||
* @throws IllegalArgumentException if the address is really an
|
||||
* IPv6 address.
|
||||
*/
|
||||
private static int ipv4AddressToInt(byte[] address)
|
||||
{
|
||||
int net = 0;
|
||||
for (byte addres : address)
|
||||
{
|
||||
net <<= 8;
|
||||
net |= addres & 0xFF;
|
||||
}
|
||||
return net;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
|
||||
/**
|
||||
* @author frederic bregier
|
||||
*/
|
||||
public class CIDR6 extends CIDR
|
||||
{
|
||||
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(CIDR6.class);
|
||||
|
||||
/**
|
||||
* The big integer for the base address
|
||||
*/
|
||||
private BigInteger addressBigInt;
|
||||
|
||||
/**
|
||||
* The big integer for the end address
|
||||
*/
|
||||
private final BigInteger addressEndBigInt;
|
||||
|
||||
/**
|
||||
* @param newaddress
|
||||
* @param newmask
|
||||
*/
|
||||
protected CIDR6(Inet6Address newaddress, int newmask)
|
||||
{
|
||||
cidrMask = newmask;
|
||||
addressBigInt = ipv6AddressToBigInteger(newaddress);
|
||||
BigInteger mask = ipv6CidrMaskToMask(newmask);
|
||||
try
|
||||
{
|
||||
addressBigInt = addressBigInt.and(mask);
|
||||
baseAddress = bigIntToIPv6Address(addressBigInt);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
// this should never happen.
|
||||
}
|
||||
addressEndBigInt = addressBigInt.add(ipv6CidrMaskToBaseAddress(cidrMask)).subtract(BigInteger.ONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetAddress getEndAddress()
|
||||
{
|
||||
try
|
||||
{
|
||||
return bigIntToIPv6Address(addressEndBigInt);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
logger.error("invalid ip address calculated as an end address");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int compareTo(CIDR arg)
|
||||
{
|
||||
if (arg instanceof CIDR4)
|
||||
{
|
||||
BigInteger net = ipv6AddressToBigInteger(arg.baseAddress);
|
||||
int res = net.compareTo(addressBigInt);
|
||||
if (res == 0)
|
||||
{
|
||||
if (arg.cidrMask == cidrMask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (arg.cidrMask < cidrMask)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
CIDR6 o = (CIDR6) arg;
|
||||
if (o.addressBigInt.equals(addressBigInt) && o.cidrMask == cidrMask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int res = o.addressBigInt.compareTo(addressBigInt);
|
||||
if (res == 0)
|
||||
{
|
||||
if (o.cidrMask < cidrMask)
|
||||
{
|
||||
// greater Mask means less IpAddresses so -1
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.CIDR#contains(java.net.InetAddress)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(InetAddress inetAddress)
|
||||
{
|
||||
BigInteger search = ipv6AddressToBigInteger(inetAddress);
|
||||
return search.compareTo(addressBigInt) >= 0 && search.compareTo(addressEndBigInt) <= 0;
|
||||
}
|
||||
|
||||
/** Given an IPv6 baseAddress length, return the block length. I.e., a
|
||||
* baseAddress length of 96 will return 2**32. */
|
||||
private static BigInteger ipv6CidrMaskToBaseAddress(int cidrMask)
|
||||
{
|
||||
return BigInteger.ONE.shiftLeft(128 - cidrMask);
|
||||
}
|
||||
|
||||
private static BigInteger ipv6CidrMaskToMask(int cidrMask)
|
||||
{
|
||||
return BigInteger.ONE.shiftLeft(128 - cidrMask).subtract(BigInteger.ONE).not();
|
||||
}
|
||||
|
||||
/** Given an IPv6 address, convert it into a BigInteger.
|
||||
* @param addr
|
||||
* @return the integer representation of the InetAddress
|
||||
*
|
||||
* @throws IllegalArgumentException if the address is not an IPv6
|
||||
* address.
|
||||
*/
|
||||
private static BigInteger ipv6AddressToBigInteger(InetAddress addr)
|
||||
{
|
||||
byte[] ipv6;
|
||||
if (addr instanceof Inet4Address)
|
||||
{
|
||||
ipv6 = getIpV6FromIpV4((Inet4Address) addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
ipv6 = addr.getAddress();
|
||||
}
|
||||
if (ipv6[0] == -1)
|
||||
{
|
||||
return new BigInteger(1, ipv6);
|
||||
}
|
||||
return new BigInteger(ipv6);
|
||||
}
|
||||
|
||||
/** Convert a big integer into an IPv6 address.
|
||||
* @param addr
|
||||
* @return the inetAddress from the integer
|
||||
*
|
||||
* @throws UnknownHostException if the big integer is too large,
|
||||
* and thus an invalid IPv6 address.
|
||||
*/
|
||||
private static InetAddress bigIntToIPv6Address(BigInteger addr) throws UnknownHostException
|
||||
{
|
||||
byte[] a = new byte[16];
|
||||
byte[] b = addr.toByteArray();
|
||||
if (b.length > 16 && !(b.length == 17 && b[0] == 0))
|
||||
{
|
||||
throw new UnknownHostException("invalid IPv6 address (too big)");
|
||||
}
|
||||
if (b.length == 16)
|
||||
{
|
||||
return InetAddress.getByAddress(b);
|
||||
}
|
||||
// handle the case where the IPv6 address starts with "FF".
|
||||
if (b.length == 17)
|
||||
{
|
||||
System.arraycopy(b, 1, a, 0, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
// copy the address into a 16 byte array, zero-filled.
|
||||
int p = 16 - b.length;
|
||||
for (int i = 0; i < b.length; i++)
|
||||
{
|
||||
a[p + i] = b[i];
|
||||
}
|
||||
}
|
||||
return InetAddress.getByAddress(a);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* JBoss, Home of Professional Open Source
|
||||
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
|
||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
||||
* full listing of individual contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
|
||||
/**
|
||||
* The listener interface for receiving ipFilter events.
|
||||
*
|
||||
* @see IpFilteringHandler
|
||||
*
|
||||
* @author Ron
|
||||
*/
|
||||
public interface IpFilterListener
|
||||
{
|
||||
|
||||
/**
|
||||
* Called when the channel has the CONNECTED status and the channel was allowed by a previous call to accept().
|
||||
* This method enables your implementation to send a message back to the client before closing
|
||||
* or whatever you need. This method returns a ChannelFuture on which the implementation
|
||||
* can wait uninterruptibly before continuing.<br>
|
||||
* For instance, If a message is sent back, the corresponding ChannelFuture has to be returned.
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
|
||||
* @return the associated ChannelFuture to be waited for before closing the channel. Null is allowed.
|
||||
*/
|
||||
public ChannelFuture allowed(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
|
||||
|
||||
/**
|
||||
* Called when the channel has the CONNECTED status and the channel was refused by a previous call to accept().
|
||||
* This method enables your implementation to send a message back to the client before closing
|
||||
* or whatever you need. This method returns a ChannelFuture on which the implementation
|
||||
* will wait uninterruptibly before closing the channel.<br>
|
||||
* For instance, If a message is sent back, the corresponding ChannelFuture has to be returned.
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
|
||||
* @return the associated ChannelFuture to be waited for before closing the channel. Null is allowed.
|
||||
*/
|
||||
public ChannelFuture refused(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
|
||||
|
||||
/**
|
||||
* Called in handleUpstream, if this channel was previously blocked,
|
||||
* to check if whatever the event, it should be passed to the next entry in the pipeline.<br>
|
||||
* If one wants to not block events, just overridden this method by returning always true.<br><br>
|
||||
* <b>Note that OPENED and BOUND events are still passed to the next entry in the pipeline since
|
||||
* those events come out before the CONNECTED event and so the possibility to filter the connection.</b>
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @return True if the event should continue, False if the event should not continue
|
||||
* since this channel was blocked by this filter
|
||||
*/
|
||||
public boolean continues(ChannelHandlerContext ctx, ChannelEvent e);
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
/**
|
||||
* This Interface defines an Ip Filter Rule.
|
||||
*
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public interface IpFilterRule extends IpSet
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return True if this Rule is an ALLOW rule
|
||||
*/
|
||||
public boolean isAllowRule();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return True if this Rule is a DENY rule
|
||||
*/
|
||||
public boolean isDenyRule();
|
||||
}
|
|
@ -0,0 +1,327 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
import org.jboss.netty.channel.ChannelPipelineCoverage;
|
||||
|
||||
/**
|
||||
* Implementation of Filter of IP based on ALLOW and DENY rules.<br>
|
||||
* <br><br>
|
||||
* This implementation could be changed by implementing a new {@link IpFilterRule} than default
|
||||
* {@link IpV4SubnetFilterRule} (IPV4 support only), {@link IpSubnetFilterRule} (IPV4 and IPV6 support) or {@link IpPatternFilterRule} (IP and host name string pattern support) .<br>
|
||||
* <br>
|
||||
* The check is done by going from step to step in the underlying array of IpFilterRule.<br>
|
||||
* Each {@link IpFilterRule} answers to the method accept if the {@link InetAddress} is accepted or not,
|
||||
* according to its implementation. If an InetAddress arrives at the end of the list, as in Firewall
|
||||
* usual rules, the InetAddress is therefore accepted by default.<br>
|
||||
* <ul>
|
||||
* <li>If it was constructed with True as first argument,
|
||||
* the IpFilterRule is an ALLOW rule (every InetAddress that fits in the rule will be accepted).</li>
|
||||
* <li>If it was constructed with False as first argument,
|
||||
* the IpFilterRule is a DENY rule (every InetAddress that fits in the rule will be refused).</li>
|
||||
* </ul><br>
|
||||
* <br>
|
||||
* An empty list means allow all (no limitation).<br><br>
|
||||
* <b>For efficiency reason, you should not add/remove too frequently IpFilterRules to/from this handler.
|
||||
* You should prefer to replace an entry (<tt>set</tt> method) with an ALLOW/DENY ALL IpFilterRule
|
||||
* if possible.</b><br><br><br>
|
||||
* <b>This handler should be created only once and reused on every pipeline since it handles
|
||||
* a global status of what is allowed or blocked.</b><br><br>
|
||||
*
|
||||
* Note that {@link IpSubnetFilterRule} which supports IPV4 and IPV6 should be used with as much as
|
||||
* possible no mixed IP protocol. Both IPV4 and IPV6 are supported but a mix (IpFilter in IPV6 notation
|
||||
* and the address from the channel in IPV4, or the reverse) can lead to wrong result.
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
@ChannelPipelineCoverage("all")
|
||||
public class IpFilterRuleHandler extends IpFilteringHandlerImpl
|
||||
{
|
||||
/**
|
||||
* List of {@link IpFilterRule}
|
||||
*/
|
||||
private final CopyOnWriteArrayList<IpFilterRule> ipFilterRuleList = new CopyOnWriteArrayList<IpFilterRule>();
|
||||
|
||||
/**
|
||||
* Constructor from a new list of IpFilterRule
|
||||
* @param newList
|
||||
*/
|
||||
public IpFilterRuleHandler(List<IpFilterRule> newList)
|
||||
{
|
||||
if (newList != null)
|
||||
{
|
||||
ipFilterRuleList.addAll(newList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty constructor (no IpFilterRule in the List at construction). In such a situation,
|
||||
* empty list implies allow all.
|
||||
*/
|
||||
public IpFilterRuleHandler()
|
||||
{
|
||||
}
|
||||
|
||||
// Below are methods directly inspired from CopyOnWriteArrayList methods
|
||||
/**
|
||||
* Add an ipFilterRule in the list at the end
|
||||
* @param ipFilterRule
|
||||
*/
|
||||
public void add(IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
ipFilterRuleList.add(ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an ipFilterRule in the list at the specified position (shifting to the right other elements)
|
||||
* @param index
|
||||
* @param ipFilterRule
|
||||
*/
|
||||
public void add(int index, IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
ipFilterRuleList.add(index, ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends all of the elements in the specified collection to the end of this list,
|
||||
* in the order that they are returned by the specified collection's iterator.
|
||||
* @param c
|
||||
*/
|
||||
public void addAll(Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
ipFilterRuleList.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts all of the elements in the specified collection into this list, starting at the specified position.
|
||||
* @param index
|
||||
* @param c
|
||||
*/
|
||||
public void addAll(int index, Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
ipFilterRuleList.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append the element if not present.
|
||||
* @param c
|
||||
* @return the number of elements added
|
||||
*/
|
||||
public int addAllAbsent(Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
return ipFilterRuleList.addAllAbsent(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append the element if not present.
|
||||
* @param ipFilterRule
|
||||
* @return true if the element was added
|
||||
*/
|
||||
public boolean addIfAbsent(IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
return ipFilterRuleList.addIfAbsent(ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the list
|
||||
*/
|
||||
public void clear()
|
||||
{
|
||||
ipFilterRuleList.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this list contains the specified element
|
||||
* @param ipFilterRule
|
||||
* @return true if this list contains the specified element
|
||||
*/
|
||||
public boolean contains(IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
return ipFilterRuleList.contains(ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this list contains all of the elements of the specified collection
|
||||
* @param c
|
||||
* @return true if this list contains all of the elements of the specified collection
|
||||
*/
|
||||
public boolean containsAll(Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
return ipFilterRuleList.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the element at the specified position in this list
|
||||
* @param index
|
||||
* @return the element at the specified position in this list
|
||||
*/
|
||||
public IpFilterRule get(int index)
|
||||
{
|
||||
return ipFilterRuleList.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this list contains no elements
|
||||
* @return true if this list contains no elements
|
||||
*/
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return ipFilterRuleList.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the ipFilterRule from the list
|
||||
* @param ipFilterRule
|
||||
*/
|
||||
public void remove(IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
ipFilterRuleList.remove(ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the element at the specified position in this list
|
||||
* @param index
|
||||
* @return the element previously at the specified position
|
||||
*/
|
||||
public IpFilterRule remove(int index)
|
||||
{
|
||||
return ipFilterRuleList.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes from this list all of its elements that are contained in the specified collection
|
||||
* @param c
|
||||
*/
|
||||
public void removeAll(Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
ipFilterRuleList.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retains only the elements in this list that are contained in the specified collection
|
||||
* @param c
|
||||
*/
|
||||
public void retainAll(Collection<IpFilterRule> c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new NullPointerException("Collection can not be null");
|
||||
}
|
||||
ipFilterRuleList.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the element at the specified position in this list with the specified element
|
||||
* @param index
|
||||
* @param ipFilterRule
|
||||
* @return the element previously at the specified position
|
||||
*/
|
||||
public IpFilterRule set(int index, IpFilterRule ipFilterRule)
|
||||
{
|
||||
if (ipFilterRule == null)
|
||||
{
|
||||
throw new NullPointerException("IpFilterRule can not be null");
|
||||
}
|
||||
return ipFilterRuleList.set(index, ipFilterRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of elements in this list.
|
||||
* @return the number of elements in this list.
|
||||
*/
|
||||
public int size()
|
||||
{
|
||||
return ipFilterRuleList.size();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilteringHandler#accept(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.ChannelEvent, java.net.InetSocketAddress)
|
||||
*/
|
||||
@Override
|
||||
protected boolean accept(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress)
|
||||
throws Exception
|
||||
{
|
||||
if (ipFilterRuleList.isEmpty())
|
||||
{
|
||||
// No limitation neither in deny or allow, so accept
|
||||
return true;
|
||||
}
|
||||
InetAddress inetAddress = inetSocketAddress.getAddress();
|
||||
Iterator<IpFilterRule> iterator = ipFilterRuleList.iterator();
|
||||
IpFilterRule ipFilterRule = null;
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
ipFilterRule = iterator.next();
|
||||
if (ipFilterRule.contains(inetAddress))
|
||||
{
|
||||
// Match founds, is it a ALLOW or DENY rule
|
||||
return ipFilterRule.isAllowRule();
|
||||
}
|
||||
}
|
||||
// No limitation founds and no allow either, but as it is like Firewall rules, it is therefore accepted
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* JBoss, Home of Professional Open Source
|
||||
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
|
||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
||||
* full listing of individual contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
|
||||
/**
|
||||
* The Class IpFilterRuleList is a helper class to generate a List of Rules from a string.
|
||||
* In case of parse errors no exceptions are thrown. The error is logged.
|
||||
* <br>
|
||||
* Rule List Syntax:
|
||||
* <br>
|
||||
* <pre>
|
||||
* RuleList ::= Rule[,Rule]*
|
||||
* Rule ::= AllowRule | BlockRule
|
||||
* AllowRule ::= +Filter
|
||||
* BlockRule ::= -Filter
|
||||
* Filter ::= PatternFilter | CIDRFilter
|
||||
* PatternFilter ::= @see PatternRule
|
||||
* CIDRFilter ::= c:CIDRFilter
|
||||
* CIDRFilter ::= @see CIDR.newCIDR(String)
|
||||
* </pre>
|
||||
* <br>
|
||||
* Example: allow only localhost:
|
||||
* <br>
|
||||
* new IPFilterRuleHandler().addAll(new IpFilterRuleList("+n:localhost, -n:*"));
|
||||
* <br>
|
||||
*
|
||||
* @author Ron
|
||||
*/
|
||||
public class IpFilterRuleList extends ArrayList<IpFilterRule>
|
||||
{
|
||||
private static final long serialVersionUID = -6164162941749588780L;
|
||||
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(IpFilterRuleList.class);
|
||||
|
||||
/**
|
||||
* Instantiates a new ip filter rule list.
|
||||
*
|
||||
* @param rules the rules
|
||||
*/
|
||||
public IpFilterRuleList(String rules)
|
||||
{
|
||||
super();
|
||||
parseRules(rules);
|
||||
}
|
||||
|
||||
private void parseRules(String rules)
|
||||
{
|
||||
String[] ruless = rules.split(",");
|
||||
for (String rule : ruless)
|
||||
{
|
||||
parseRule(rule.trim());
|
||||
}
|
||||
}
|
||||
|
||||
private void parseRule(String rule)
|
||||
{
|
||||
if (rule == null || rule.length() == 0)
|
||||
return;
|
||||
if (!(rule.startsWith("+") || rule.startsWith("-")))
|
||||
{
|
||||
logger.error("syntax error in ip filter rule:" + rule);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean allow = rule.startsWith("+");
|
||||
if (rule.charAt(1) == 'n' || rule.charAt(1) == 'i')
|
||||
this.add(new PatternRule(allow, rule.substring(1)));
|
||||
else if (rule.charAt(1) == 'c')
|
||||
try
|
||||
{
|
||||
this.add(new IpSubnetFilterRule(allow, rule.substring(3)));
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
logger.error("error parsing ip filter " + rule, e);
|
||||
}
|
||||
else
|
||||
logger.error("syntax error in ip filter rule:" + rule);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* JBoss, Home of Professional Open Source
|
||||
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
|
||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
||||
* full listing of individual contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import org.jboss.netty.channel.ChannelUpstreamHandler;
|
||||
|
||||
/**
|
||||
* The Interface IpFilteringHandler.
|
||||
* A Filter of IP.
|
||||
* <br>
|
||||
* Users can add an {@link IpFilterListener} to add specific actions in case a connection is allowed or refused.
|
||||
*
|
||||
* @author Ron
|
||||
*/
|
||||
public interface IpFilteringHandler extends ChannelUpstreamHandler
|
||||
{
|
||||
|
||||
/**
|
||||
* Sets the filter listener.
|
||||
*
|
||||
* @param listener the new ip filter listener
|
||||
*/
|
||||
public void setIpFilterListener(IpFilterListener listener);
|
||||
|
||||
/**
|
||||
* Remove the filter listener.
|
||||
*/
|
||||
public void removeIpFilterListener();
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
/*
|
||||
* JBoss, Home of Professional Open Source
|
||||
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
|
||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
||||
* full listing of individual contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelFutureListener;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.channel.Channels;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* General class that handle Ip Filtering.
|
||||
*
|
||||
* @author frederic bregier
|
||||
*/
|
||||
public abstract class IpFilteringHandlerImpl implements IpFilteringHandler
|
||||
{
|
||||
|
||||
private IpFilterListener listener = null;
|
||||
|
||||
/**
|
||||
* Called when the channel is connected. It returns True if the corresponding connection
|
||||
* is to be allowed. Else it returns False.
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
|
||||
* @return True if the corresponding connection is allowed, else False.
|
||||
* @throws Exception
|
||||
*/
|
||||
protected abstract boolean accept(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Called when the channel has the CONNECTED status and the channel was refused by a previous call to accept().
|
||||
* This method enables your implementation to send a message back to the client before closing
|
||||
* or whatever you need. This method returns a ChannelFuture on which the implementation
|
||||
* will wait uninterruptibly before closing the channel.<br>
|
||||
* For instance, If a message is sent back, the corresponding ChannelFuture has to be returned.
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
|
||||
* @return the associated ChannelFuture to be waited for before closing the channel. Null is allowed.
|
||||
* @throws Exception
|
||||
*/
|
||||
protected ChannelFuture handleRefusedChannel(ChannelHandlerContext ctx, ChannelEvent e,
|
||||
InetSocketAddress inetSocketAddress) throws Exception
|
||||
{
|
||||
if (listener == null)
|
||||
return null;
|
||||
ChannelFuture result = listener.refused(ctx, e, inetSocketAddress);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected ChannelFuture handleAllowedChannel(ChannelHandlerContext ctx, ChannelEvent e,
|
||||
InetSocketAddress inetSocketAddress) throws Exception
|
||||
{
|
||||
if (listener == null)
|
||||
return null;
|
||||
ChannelFuture result = listener.allowed(ctx, e, inetSocketAddress);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal method to test if the current channel is blocked. Should not be overridden.
|
||||
* @param ctx
|
||||
* @return True if the current channel is blocked, else False
|
||||
*/
|
||||
protected boolean isBlocked(ChannelHandlerContext ctx)
|
||||
{
|
||||
return ctx.getAttachment() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called in handleUpstream, if this channel was previously blocked,
|
||||
* to check if whatever the event, it should be passed to the next entry in the pipeline.<br>
|
||||
* If one wants to not block events, just overridden this method by returning always true.<br><br>
|
||||
* <b>Note that OPENED and BOUND events are still passed to the next entry in the pipeline since
|
||||
* those events come out before the CONNECTED event and so the possibility to filter the connection.</b>
|
||||
* @param ctx
|
||||
* @param e
|
||||
* @return True if the event should continue, False if the event should not continue
|
||||
* since this channel was blocked by this filter
|
||||
* @throws Exception
|
||||
*/
|
||||
protected boolean continues(ChannelHandlerContext ctx, ChannelEvent e) throws Exception
|
||||
{
|
||||
if (listener != null)
|
||||
return listener.continues(ctx, e);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.channel.ChannelUpstreamHandler#handleUpstream(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.ChannelEvent)
|
||||
*/
|
||||
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception
|
||||
{
|
||||
if (e instanceof ChannelStateEvent)
|
||||
{
|
||||
ChannelStateEvent evt = (ChannelStateEvent) e;
|
||||
switch (evt.getState())
|
||||
{
|
||||
case OPEN :
|
||||
case BOUND :
|
||||
// Special case: OPEND and BOUND events are before CONNECTED,
|
||||
// but CLOSED and UNBOUND events are after DISCONNECTED: should those events be blocked too?
|
||||
if (isBlocked(ctx) && !continues(ctx, evt))
|
||||
{
|
||||
// don't pass to next level since channel was blocked early
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.sendUpstream(e);
|
||||
return;
|
||||
}
|
||||
case CONNECTED :
|
||||
if (evt.getValue() != null)
|
||||
{
|
||||
// CONNECTED
|
||||
InetSocketAddress inetSocketAddress = (InetSocketAddress) e.getChannel().getRemoteAddress();
|
||||
if (!accept(ctx, e, inetSocketAddress))
|
||||
{
|
||||
ctx.setAttachment(Boolean.TRUE);
|
||||
ChannelFuture future = handleRefusedChannel(ctx, e, inetSocketAddress);
|
||||
if (future != null)
|
||||
{
|
||||
future.addListener(ChannelFutureListener.CLOSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Channels.close(e.getChannel());
|
||||
}
|
||||
if (isBlocked(ctx) && !continues(ctx, evt))
|
||||
{
|
||||
// don't pass to next level since channel was blocked early
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
handleAllowedChannel(ctx, e, inetSocketAddress);
|
||||
}
|
||||
// This channel is not blocked
|
||||
ctx.setAttachment(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// DISCONNECTED
|
||||
if (isBlocked(ctx) && !continues(ctx, evt))
|
||||
{
|
||||
// don't pass to next level since channel was blocked early
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isBlocked(ctx) && !continues(ctx, e))
|
||||
{
|
||||
// don't pass to next level since channel was blocked early
|
||||
return;
|
||||
}
|
||||
// Whatever it is, if not blocked, goes to the next level
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilteringHandler#setIpFilterListener(org.jboss.netty.handler.ipfilter.IpFilterListener)
|
||||
*/
|
||||
public void setIpFilterListener(IpFilterListener listener)
|
||||
{
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilteringHandler#removeIpFilterListener()
|
||||
*/
|
||||
public void removeIpFilterListener()
|
||||
{
|
||||
this.listener = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
/**
|
||||
* This Interface defines an IpSet object.
|
||||
*
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public interface IpSet
|
||||
{
|
||||
/**
|
||||
* Compares the given InetAddress against the IpSet and returns true if
|
||||
* the InetAddress is contained in this Rule and false if not.
|
||||
* @param inetAddress1
|
||||
* @return returns true if the given IP address is contained in the current
|
||||
* IpSet.
|
||||
*/
|
||||
public boolean contains(InetAddress inetAddress1);
|
||||
}
|
|
@ -0,0 +1,198 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* This class allows to check if an IP V4 or V6 Address is contained in a subnet.<BR>
|
||||
*
|
||||
* Supported IP V4 Formats for the Subnets are: 1.1.1.1/255.255.255.255 or 1.1.1.1/32 (CIDR-Notation)
|
||||
* and (InetAddress,Mask) where Mask is a integer for CIDR-notation or a String for Standard Mask notation.<BR>
|
||||
* <BR><BR>Example1:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet("192.168.1.0/24");</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains("192.168.1.123"));</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains(inetAddress2));</tt><BR>
|
||||
* <BR>Example1 bis:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet(inetAddress, 24);</tt><BR>
|
||||
* where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123<BR>
|
||||
* <BR><BR>Example2:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet("192.168.1.0/255.255.255.0");</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains("192.168.1.123"));</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains(inetAddress2));</tt><BR>
|
||||
* <BR>Example2 bis:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet(inetAddress, "255.255.255.0");</tt><BR>
|
||||
* where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123<BR>
|
||||
* <BR>
|
||||
* Supported IP V6 Formats for the Subnets are: a:b:c:d:e:f:g:h/NN (CIDR-Notation)
|
||||
* or any IPV6 notations (like a:b:c:d::/NN, a:b:c:d:e:f:w.x.y.z/NN)
|
||||
* and (InetAddress,Mask) where Mask is a integer for CIDR-notation
|
||||
* and (InetAddress,subnet).<BR>
|
||||
* <BR><BR>Example1:<BR>
|
||||
* <tt>IpSubnet ips = new IpSubnet("1fff:0:0a88:85a3:0:0:0:0/24");</tt><BR>
|
||||
* <tt>IpSubnet ips = new IpSubnet("1fff:0:0a88:85a3::/24");</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains("1fff:0:0a88:85a3:0:0:ac1f:8001"));</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains(inetAddress2));</tt><BR>
|
||||
* <BR>Example1 bis:<BR>
|
||||
* <tt>IpSubnet ips = new IpSubnet(inetAddress, 24);</tt><BR>
|
||||
* where inetAddress2 is 1fff:0:0a88:85a3:0:0:ac1f:8001<BR>
|
||||
*
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public class IpSubnet implements IpSet, Comparable<IpSubnet>
|
||||
{
|
||||
/**
|
||||
* Internal representation
|
||||
*/
|
||||
private CIDR cidr = null;
|
||||
|
||||
/**
|
||||
* Create IpSubnet for ALL (used for ALLOW or DENY ALL)
|
||||
*/
|
||||
public IpSubnet()
|
||||
{
|
||||
// ALLOW or DENY ALL
|
||||
cidr = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpSubnet using the CIDR or normal Notation<BR>
|
||||
* i.e.:<br>
|
||||
* IpSubnet subnet = new IpSubnet("10.10.10.0/24"); or<br>
|
||||
* IpSubnet subnet = new IpSubnet("10.10.10.0/255.255.255.0"); or<br>
|
||||
* IpSubnet subnet = new IpSubnet("1fff:0:0a88:85a3:0:0:0:0/24");
|
||||
* @param netAddress a network address as string.
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
public IpSubnet(String netAddress) throws UnknownHostException
|
||||
{
|
||||
cidr = CIDR.newCIDR(netAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpSubnet using the CIDR Notation
|
||||
* @param inetAddress
|
||||
* @param cidrNetMask
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpSubnet(InetAddress inetAddress, int cidrNetMask) throws UnknownHostException
|
||||
{
|
||||
cidr = CIDR.newCIDR(inetAddress, cidrNetMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpSubnet using the normal Notation
|
||||
* @param inetAddress
|
||||
* @param netMask
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpSubnet(InetAddress inetAddress, String netMask) throws UnknownHostException
|
||||
{
|
||||
cidr = CIDR.newCIDR(inetAddress, netMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the given IP-Address against the Subnet and returns true if
|
||||
* the ip is in the subnet-ip-range and false if not.
|
||||
* @param ipAddr an ipaddress
|
||||
* @return returns true if the given IP address is inside the currently
|
||||
* set network.
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
public boolean contains(String ipAddr) throws UnknownHostException
|
||||
{
|
||||
InetAddress inetAddress1 = InetAddress.getByName(ipAddr);
|
||||
return this.contains(inetAddress1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the given InetAddress against the Subnet and returns true if
|
||||
* the ip is in the subnet-ip-range and false if not.
|
||||
* @param inetAddress
|
||||
* @return returns true if the given IP address is inside the currently
|
||||
* set network.
|
||||
* */
|
||||
public boolean contains(InetAddress inetAddress)
|
||||
{
|
||||
if (cidr == null)
|
||||
{
|
||||
// ANY
|
||||
return true;
|
||||
}
|
||||
return cidr.contains(inetAddress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return cidr.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (!(o instanceof IpSubnet))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
IpSubnet ipSubnet = (IpSubnet) o;
|
||||
return ipSubnet.cidr.equals(cidr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare two IpSubnet
|
||||
*/
|
||||
public int compareTo(IpSubnet o)
|
||||
{
|
||||
return cidr.toString().compareTo(o.cidr.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple test functions
|
||||
* @param args
|
||||
* where args[0] is the netmask (standard or CIDR notation) and optional args[1] is
|
||||
* the inetAddress to test with this IpSubnet
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
if (args.length != 0)
|
||||
{
|
||||
IpSubnet ipSubnet = null;
|
||||
try
|
||||
{
|
||||
ipSubnet = new IpSubnet(args[0]);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
System.out.println("IpSubnet: " + ipSubnet.toString() + " from " + ipSubnet.cidr.getBaseAddress() + " to "
|
||||
+ ipSubnet.cidr.getEndAddress() + " mask " + ipSubnet.cidr.getMask());
|
||||
if (args.length > 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.out.println("Is IN: " + args[1] + " " + ipSubnet.contains(args[1]));
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* Ip V4 and Ip V6 filter rule.<br>
|
||||
* <br>
|
||||
* Note that mix of IPV4 and IPV6 is allowed but it is not recommended. So it is preferable to not
|
||||
* mix IPV4 addresses with IPV6 rules, even if it should work.
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public class IpSubnetFilterRule extends IpSubnet implements IpFilterRule
|
||||
{
|
||||
/**
|
||||
* Is this IpV4Subnet an ALLOW or DENY rule
|
||||
*/
|
||||
private boolean isAllowRule = true;
|
||||
|
||||
/**
|
||||
* Constructor for a ALLOW or DENY ALL
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
*/
|
||||
public IpSubnetFilterRule(boolean allow)
|
||||
{
|
||||
super();
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param inetAddress
|
||||
* @param cidrNetMask
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpSubnetFilterRule(boolean allow, InetAddress inetAddress, int cidrNetMask) throws UnknownHostException
|
||||
{
|
||||
super(inetAddress, cidrNetMask);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param inetAddress
|
||||
* @param netMask
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpSubnetFilterRule(boolean allow, InetAddress inetAddress, String netMask) throws UnknownHostException
|
||||
{
|
||||
super(inetAddress, netMask);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param netAddress
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpSubnetFilterRule(boolean allow, String netAddress) throws UnknownHostException
|
||||
{
|
||||
super(netAddress);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
public boolean isAllowRule()
|
||||
{
|
||||
return isAllowRule;
|
||||
}
|
||||
|
||||
public boolean isDenyRule()
|
||||
{
|
||||
return !isAllowRule;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,332 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* This class allows to check if an IP-V4-Address is contained in a subnet.<BR>
|
||||
* Supported Formats for the Subnets are: 1.1.1.1/255.255.255.255 or 1.1.1.1/32 (CIDR-Notation)
|
||||
* and (InetAddress,Mask) where Mask is a integer for CIDR-notation or a String for Standard Mask notation.<BR>
|
||||
* <BR><BR>Example1:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet("192.168.1.0/24");</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains("192.168.1.123"));</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains(inetAddress2));</tt><BR>
|
||||
* <BR>Example1 bis:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet(inetAddress, 24);</tt><BR>
|
||||
* where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123<BR>
|
||||
* <BR><BR>Example2:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet("192.168.1.0/255.255.255.0");</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains("192.168.1.123"));</tt><BR>
|
||||
* <tt>System.out.println("Result: "+ ips.contains(inetAddress2));</tt><BR>
|
||||
* <BR>Example2 bis:<BR>
|
||||
* <tt>IpV4Subnet ips = new IpV4Subnet(inetAddress, "255.255.255.0");</tt><BR>
|
||||
* where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123<BR>
|
||||
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public class IpV4Subnet implements IpSet, Comparable<IpV4Subnet>
|
||||
{
|
||||
private static final int SUBNET_MASK = 0x80000000;
|
||||
|
||||
private static final int BYTE_ADDRESS_MASK = 0xFF;
|
||||
|
||||
private InetAddress inetAddress;
|
||||
|
||||
private int subnet;
|
||||
|
||||
private int mask;
|
||||
|
||||
private int cidrMask;
|
||||
|
||||
/**
|
||||
* Create IpV4Subnet for ALL (used for ALLOW or DENY ALL)
|
||||
*/
|
||||
public IpV4Subnet()
|
||||
{
|
||||
// ALLOW or DENY ALL
|
||||
mask = -1;
|
||||
// other will be ignored
|
||||
inetAddress = null;
|
||||
subnet = 0;
|
||||
cidrMask = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpV4Subnet using the CIDR or normal Notation<BR>
|
||||
* i.e.:
|
||||
* IpV4Subnet subnet = new IpV4Subnet("10.10.10.0/24"); or
|
||||
* IpV4Subnet subnet = new IpV4Subnet("10.10.10.0/255.255.255.0");
|
||||
* @param netAddress a network address as string.
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
public IpV4Subnet(String netAddress) throws UnknownHostException
|
||||
{
|
||||
setNetAddress(netAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpV4Subnet using the CIDR Notation
|
||||
* @param inetAddress
|
||||
* @param cidrNetMask
|
||||
*/
|
||||
public IpV4Subnet(InetAddress inetAddress, int cidrNetMask)
|
||||
{
|
||||
setNetAddress(inetAddress, cidrNetMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create IpV4Subnet using the normal Notation
|
||||
* @param inetAddress
|
||||
* @param netMask
|
||||
*/
|
||||
public IpV4Subnet(InetAddress inetAddress, String netMask)
|
||||
{
|
||||
setNetAddress(inetAddress, netMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Network Address in either CIDR or Decimal Notation.<BR>
|
||||
* i.e.: setNetAddress("1.1.1.1/24"); or<BR>
|
||||
* setNetAddress("1.1.1.1/255.255.255.0");<BR>
|
||||
* @param netAddress a network address as string.
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
private void setNetAddress(String netAddress) throws UnknownHostException
|
||||
{
|
||||
Vector<Object> vec = new Vector<Object>();
|
||||
StringTokenizer st = new StringTokenizer(netAddress, "/");
|
||||
while (st.hasMoreTokens())
|
||||
{
|
||||
vec.add(st.nextElement());
|
||||
}
|
||||
|
||||
if (vec.get(1).toString().length() < 3)
|
||||
{
|
||||
setNetId(vec.get(0).toString());
|
||||
setCidrNetMask(Integer.parseInt(vec.get(1).toString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
setNetId(vec.get(0).toString());
|
||||
setNetMask(vec.get(1).toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Network Address in CIDR Notation.
|
||||
* @param inetAddress
|
||||
* @param cidrNetMask
|
||||
* */
|
||||
private void setNetAddress(InetAddress inetAddress, int cidrNetMask)
|
||||
{
|
||||
setNetId(inetAddress);
|
||||
setCidrNetMask(cidrNetMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Network Address in Decimal Notation.
|
||||
* @param inetAddress
|
||||
* @param netMask
|
||||
* */
|
||||
private void setNetAddress(InetAddress inetAddress, String netMask)
|
||||
{
|
||||
setNetId(inetAddress);
|
||||
setNetMask(netMask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the BaseAdress of the Subnet.<BR>
|
||||
* i.e.: setNetId("192.168.1.0");
|
||||
* @param netId a network ID
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
private void setNetId(String netId) throws UnknownHostException
|
||||
{
|
||||
InetAddress inetAddress1 = InetAddress.getByName(netId);
|
||||
this.setNetId(inetAddress1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute integer representation of InetAddress
|
||||
* @param inetAddress1
|
||||
* @return the integer representation
|
||||
*/
|
||||
private int toInt(InetAddress inetAddress1)
|
||||
{
|
||||
byte[] address = inetAddress1.getAddress();
|
||||
int net = 0;
|
||||
for (byte addres : address)
|
||||
{
|
||||
net <<= 8;
|
||||
net |= addres & BYTE_ADDRESS_MASK;
|
||||
}
|
||||
return net;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the BaseAdress of the Subnet.
|
||||
* @param inetAddress
|
||||
* */
|
||||
private void setNetId(InetAddress inetAddress)
|
||||
{
|
||||
this.inetAddress = inetAddress;
|
||||
subnet = toInt(inetAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Subnet's Netmask in Decimal format.<BR>
|
||||
* i.e.: setNetMask("255.255.255.0");
|
||||
* @param netMask a network mask
|
||||
* */
|
||||
private void setNetMask(String netMask)
|
||||
{
|
||||
StringTokenizer nm = new StringTokenizer(netMask, ".");
|
||||
int i = 0;
|
||||
int[] netmask = new int[4];
|
||||
while (nm.hasMoreTokens())
|
||||
{
|
||||
netmask[i] = Integer.parseInt(nm.nextToken());
|
||||
i++;
|
||||
}
|
||||
int mask1 = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
mask1 += Integer.bitCount(netmask[i]);
|
||||
}
|
||||
setCidrNetMask(mask1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the CIDR Netmask<BR>
|
||||
* i.e.: setCidrNetMask(24);
|
||||
* @param cidrNetMask a netmask in CIDR notation
|
||||
* */
|
||||
private void setCidrNetMask(int cidrNetMask)
|
||||
{
|
||||
cidrMask = cidrNetMask;
|
||||
mask = SUBNET_MASK >> cidrMask - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the given IP-Address against the Subnet and returns true if
|
||||
* the ip is in the subnet-ip-range and false if not.
|
||||
* @param ipAddr an ipaddress
|
||||
* @return returns true if the given IP address is inside the currently
|
||||
* set network.
|
||||
* @throws UnknownHostException
|
||||
* */
|
||||
public boolean contains(String ipAddr) throws UnknownHostException
|
||||
{
|
||||
InetAddress inetAddress1 = InetAddress.getByName(ipAddr);
|
||||
return this.contains(inetAddress1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the given InetAddress against the Subnet and returns true if
|
||||
* the ip is in the subnet-ip-range and false if not.
|
||||
* @param inetAddress1
|
||||
* @return returns true if the given IP address is inside the currently
|
||||
* set network.
|
||||
* */
|
||||
public boolean contains(InetAddress inetAddress1)
|
||||
{
|
||||
if (mask == -1)
|
||||
{
|
||||
// ANY
|
||||
return true;
|
||||
}
|
||||
return (toInt(inetAddress1) & mask) == subnet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return inetAddress.getHostAddress() + "/" + cidrMask;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (!(o instanceof IpV4Subnet))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
IpV4Subnet ipV4Subnet = (IpV4Subnet) o;
|
||||
return ipV4Subnet.subnet == subnet && ipV4Subnet.cidrMask == cidrMask;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare two IpV4Subnet
|
||||
*/
|
||||
public int compareTo(IpV4Subnet o)
|
||||
{
|
||||
if (o.subnet == subnet && o.cidrMask == cidrMask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (o.subnet < subnet)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (o.subnet > subnet)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (o.cidrMask < cidrMask)
|
||||
{
|
||||
// greater Mask means less IpAddresses so -1
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple test functions
|
||||
* @param args
|
||||
* where args[0] is the netmask (standard or CIDR notation) and optional args[1] is
|
||||
* the inetAddress to test with this IpV4Subnet
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
if (args.length != 0)
|
||||
{
|
||||
IpV4Subnet ipV4Subnet = null;
|
||||
try
|
||||
{
|
||||
ipV4Subnet = new IpV4Subnet(args[0]);
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (args.length > 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.out.println("Is IN: " + args[1] + " " + ipV4Subnet.contains(args[1]));
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* IpV4 only Filter Rule
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public class IpV4SubnetFilterRule extends IpV4Subnet implements IpFilterRule
|
||||
{
|
||||
/**
|
||||
* Is this IpV4Subnet an ALLOW or DENY rule
|
||||
*/
|
||||
private boolean isAllowRule = true;
|
||||
|
||||
/**
|
||||
* Constructor for a ALLOW or DENY ALL
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
*/
|
||||
public IpV4SubnetFilterRule(boolean allow)
|
||||
{
|
||||
super();
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param inetAddress
|
||||
* @param cidrNetMask
|
||||
*/
|
||||
public IpV4SubnetFilterRule(boolean allow, InetAddress inetAddress, int cidrNetMask)
|
||||
{
|
||||
super(inetAddress, cidrNetMask);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param inetAddress
|
||||
* @param netMask
|
||||
*/
|
||||
public IpV4SubnetFilterRule(boolean allow, InetAddress inetAddress, String netMask)
|
||||
{
|
||||
super(inetAddress, netMask);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allow True for ALLOW, False for DENY
|
||||
* @param netAddress
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
public IpV4SubnetFilterRule(boolean allow, String netAddress) throws UnknownHostException
|
||||
{
|
||||
super(netAddress);
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
public boolean isAllowRule()
|
||||
{
|
||||
return isAllowRule;
|
||||
}
|
||||
|
||||
public boolean isDenyRule()
|
||||
{
|
||||
return !isAllowRule;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
import org.jboss.netty.channel.ChannelPipelineCoverage;
|
||||
import org.jboss.netty.channel.ChannelState;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
|
||||
/**
|
||||
* Handler that block any new connection if there are already a currently active
|
||||
* channel connected with the same InetAddress (IP).<br>
|
||||
* <br>
|
||||
*
|
||||
* Take care to not change isBlocked method except if you know what you are doing
|
||||
* since it is used to test if the current closed connection is to be removed
|
||||
* or not from the map of currently connected channel.
|
||||
*
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
@ChannelPipelineCoverage("all")
|
||||
public class OneIpFilterHandler extends IpFilteringHandlerImpl
|
||||
{
|
||||
/**
|
||||
* HashMap of current remote connected InetAddress
|
||||
*/
|
||||
private final ConcurrentMap<InetAddress, Boolean> connectedSet = new ConcurrentHashMap<InetAddress, Boolean>();
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilteringHandler#accept(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.ChannelEvent, java.net.InetSocketAddress)
|
||||
*/
|
||||
@Override
|
||||
protected boolean accept(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress)
|
||||
throws Exception
|
||||
{
|
||||
InetAddress inetAddress = inetSocketAddress.getAddress();
|
||||
if (connectedSet.containsKey(inetAddress))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
connectedSet.put(inetAddress, Boolean.TRUE);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilteringHandler#handleUpstream(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.ChannelEvent)
|
||||
*/
|
||||
@Override
|
||||
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception
|
||||
{
|
||||
super.handleUpstream(ctx, e);
|
||||
// Try to remove entry from Map if already exists
|
||||
if (e instanceof ChannelStateEvent)
|
||||
{
|
||||
ChannelStateEvent evt = (ChannelStateEvent) e;
|
||||
if (evt.getState() == ChannelState.CONNECTED)
|
||||
{
|
||||
if (evt.getValue() == null)
|
||||
{
|
||||
// DISCONNECTED but was this channel blocked or not
|
||||
if (isBlocked(ctx))
|
||||
{
|
||||
// remove inetsocketaddress from set since this channel was not blocked before
|
||||
InetSocketAddress inetSocketAddress = (InetSocketAddress) e.getChannel().getRemoteAddress();
|
||||
connectedSet.remove(inetSocketAddress.getAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* JBoss, Home of Professional Open Source
|
||||
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
|
||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
||||
* full listing of individual contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
|
||||
/**
|
||||
* The Class PatternRule represents an IP filter rule using string patterns.
|
||||
* <br>
|
||||
* Rule Syntax:
|
||||
* <br>
|
||||
* <pre>
|
||||
* Rule ::= [n|i]:address n stands for computer name, i for ip address
|
||||
* address ::= <regex> | localhost
|
||||
* regex is a regular expression with '*' as multi character and '?' as single character wild card
|
||||
* </pre>
|
||||
* <br>
|
||||
* Example: allow localhost:
|
||||
* <br>
|
||||
* new PatternRule(true, "n:localhost")
|
||||
* <br>
|
||||
* Example: allow local lan:
|
||||
* <br>
|
||||
* new PatternRule(true, "i:192.168.0.*")
|
||||
* <br>
|
||||
* Example: block all
|
||||
* <br>
|
||||
* new PatternRule(false, "n:*")
|
||||
* <br>
|
||||
*
|
||||
* @author Ron
|
||||
*/
|
||||
public class PatternRule implements IpFilterRule, Comparable<Object>
|
||||
{
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(PatternRule.class);
|
||||
|
||||
private Pattern ipPattern = null;
|
||||
|
||||
private Pattern namePattern = null;
|
||||
|
||||
private boolean isAllowRule = true;
|
||||
|
||||
private boolean localhost = false;
|
||||
|
||||
private String pattern = null;
|
||||
|
||||
/**
|
||||
* Instantiates a new pattern rule.
|
||||
*
|
||||
* @param allow indicates if this is an allow or block rule
|
||||
* @param pattern the filter pattern
|
||||
*/
|
||||
public PatternRule(boolean allow, String pattern)
|
||||
{
|
||||
this.isAllowRule = allow;
|
||||
this.pattern = pattern;
|
||||
parse(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the pattern.
|
||||
*
|
||||
* @return the pattern
|
||||
*/
|
||||
public String getPattern()
|
||||
{
|
||||
return this.pattern;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilterRule#isAllowRule()
|
||||
*/
|
||||
public boolean isAllowRule()
|
||||
{
|
||||
return isAllowRule;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpFilterRule#isDenyRule()
|
||||
*/
|
||||
public boolean isDenyRule()
|
||||
{
|
||||
return !isAllowRule;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.jboss.netty.handler.ipfilter.IpSet#contains(java.net.InetAddress)
|
||||
*/
|
||||
public boolean contains(InetAddress inetAddress)
|
||||
{
|
||||
if (localhost)
|
||||
if (isLocalhost(inetAddress))
|
||||
return true;
|
||||
if (ipPattern != null)
|
||||
if (ipPattern.matcher(inetAddress.getHostAddress()).matches())
|
||||
return true;
|
||||
if (namePattern != null)
|
||||
if (namePattern.matcher(inetAddress.getHostName()).matches())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private void parse(String pattern)
|
||||
{
|
||||
if (pattern == null)
|
||||
return;
|
||||
|
||||
String[] acls = pattern.split(",");
|
||||
|
||||
String ip = "";
|
||||
String name = "";
|
||||
for (String c : acls)
|
||||
{
|
||||
c = c.trim();
|
||||
if (c.equals("n:localhost"))
|
||||
this.localhost = true;
|
||||
else if (c.startsWith("n:"))
|
||||
name = addRule(name, c.substring(2));
|
||||
else if (c.startsWith("i:"))
|
||||
ip = addRule(ip, c.substring(2));
|
||||
}
|
||||
if (ip.length() != 0)
|
||||
ipPattern = Pattern.compile(ip);
|
||||
if (name.length() != 0)
|
||||
namePattern = Pattern.compile(name);
|
||||
|
||||
}
|
||||
|
||||
private String addRule(String pattern, String rule)
|
||||
{
|
||||
if (rule == null || rule.length() == 0)
|
||||
return pattern;
|
||||
if (pattern.length() != 0)
|
||||
pattern += "|";
|
||||
rule = rule.replaceAll("\\.", "\\\\.");
|
||||
rule = rule.replaceAll("\\*", ".*");
|
||||
rule = rule.replaceAll("\\?", ".");
|
||||
pattern += "(" + rule + ")";
|
||||
return pattern;
|
||||
}
|
||||
|
||||
private boolean isLocalhost(InetAddress address)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (address.equals(InetAddress.getLocalHost()))
|
||||
return true;
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
logger.info("error getting ip of localhost", e);
|
||||
}
|
||||
try
|
||||
{
|
||||
InetAddress[] addrs = InetAddress.getAllByName("127.0.0.1");
|
||||
for (InetAddress addr : addrs)
|
||||
if (addr.equals(address))
|
||||
return true;
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
{
|
||||
logger.info("error getting ip of localhost", e);
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
public int compareTo(Object o)
|
||||
{
|
||||
if (o == null)
|
||||
return -1;
|
||||
if (!(o instanceof PatternRule))
|
||||
return -1;
|
||||
PatternRule p = (PatternRule) o;
|
||||
if (p.isAllowRule() && !this.isAllowRule)
|
||||
return -1;
|
||||
if (this.pattern == null && p.pattern == null)
|
||||
return 0;
|
||||
if (this.pattern != null)
|
||||
return this.pattern.compareTo(p.getPattern());
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
*
|
||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of a Ip based Filter handlers.<br>
|
||||
* <br><br>
|
||||
*
|
||||
*
|
||||
* <P>The main goal of this package is to allow to filter connections based on IP rules.
|
||||
* The main interface is <tt>{@link IpFilteringHandler}</tt> which all filters will extend.</P>
|
||||
*
|
||||
* <P>Two IP filtering are proposed:<br>
|
||||
* <ul>
|
||||
* <li> <tt>{@link OneIpFilterHandler}</tt>: This filter proposes to allow only one connection by client's IP Address.
|
||||
* I.E. this filter will prevent two connections from the same client based on its IP address.</li><br><br>
|
||||
*
|
||||
* <li> <tt>{@link IpFilterRuleHandler}</tt>: This filter proposes to allow or block IP range (based on standard notation
|
||||
* or on CIDR notation) when the connection is running. It relies on another class like
|
||||
* <tt>IpV4SubnetFilterRule</tt> (IPV4 support only), <tt>IpSubnetFilterRule</tt> (IPV4 and IPV6 support) or <tt>PatternRule</tt> (string pattern support)
|
||||
* which implements those Ip ranges.</li><br><br>
|
||||
*
|
||||
* </ul></P>
|
||||
*
|
||||
* <P>Standard use could be as follow: The accept method must be overridden (of course you can
|
||||
* override others).</P>
|
||||
*
|
||||
* <P><ul>
|
||||
* <li><tt>accept</tt> method allows to specify your way of choosing if a new connection is
|
||||
* to be allowed or not.</li><br>
|
||||
* In <tt>OneIpFilterHandler</tt> and <tt>IpFilterRuleHandler</tt>,
|
||||
* this method is already implemented.<br>
|
||||
* <br>
|
||||
*
|
||||
* <li><tt>handleRefusedChannel</tt> method is executed when the accept method filters (blocks, so returning false)
|
||||
* the new connection. This method allows you to implement specific actions to be taken before the channel is
|
||||
* closed. After this method is called, the channel is immediately closed.</li><br>
|
||||
* So if you want to send back a message to the client, <b>don't forget to return a respectful ChannelFuture,
|
||||
* otherwise the message could be missed since the channel will be closed immediately after this
|
||||
* call and the waiting on this channelFuture</b> (at least with respect of asynchronous operations).<br><br>
|
||||
* Per default implementation this method invokes an {@link IpFilterListener} or returns null if no listener has been set.
|
||||
* <br><br>
|
||||
*
|
||||
* <li><tt>continues</tt> is called when any event appears after CONNECTED event and only for
|
||||
* blocked channels.</li><br>
|
||||
* It should return True if this new event has to go to next handlers
|
||||
* in the pipeline if any, and False (default) if no events has to be passed to the next
|
||||
* handlers when a channel is blocked. This is intend to prevent any unnecessary action since the connection is refused.<br>
|
||||
* However, you could change its behavior for instance because you don't want that any event
|
||||
* will be blocked by this filter by returning always true or according to some events.<br>
|
||||
* <b>Note that OPENED and BOUND events are still passed to the next entry in the pipeline since
|
||||
* those events come out before the CONNECTED event, so there is no possibility to filter those two events
|
||||
* before the CONNECTED event shows up. Therefore, you might want to let CLOSED and UNBOUND be passed
|
||||
* to the next entry in the pipeline.</b><br><br>
|
||||
* Per default implementation this method invokes an {@link IpFilterListener} or returns false if no listener has been set.
|
||||
* <br><br>
|
||||
*
|
||||
* <li>Finally <tt>handleUpstream</tt> traps the CONNECTED and DISCONNECTED events.</li><br>
|
||||
* If in the CONNECTED events the channel is blocked (<tt>accept</tt> refused the channel),
|
||||
* then any new events on this channel will be blocked.<br>
|
||||
* However, you could change its behavior for instance because you don't want that all events
|
||||
* will be blocked by this filter by testing the result of isBlocked, and if so,
|
||||
* calling <tt>ctx.sendUpstream(e);</tt> after calling the super method or by changing the <tt>continues</tt> method.<br><br>
|
||||
|
||||
* </ul></P><br><br>
|
||||
*
|
||||
* A typical setup for ip filter for TCP/IP socket would be:
|
||||
*
|
||||
* <pre>
|
||||
* {@link ChannelPipeline} pipeline = ...;
|
||||
*
|
||||
* IpFilterRuleHandler firewall = new IpFilterRuleHandler();
|
||||
* firewall.addAll(new IpFilterRuleList("+n:localhost, +c:192.168.0.0/27, -n:*"));
|
||||
* pipeline.addFirst("firewall", firewall);
|
||||
* </pre>
|
||||
*
|
||||
* @apiviz.exclude ^java\.lang\.
|
||||
*/
|
||||
package org.jboss.netty.handler.ipfilter;
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package org.rzo.netty.ahessian;
|
||||
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
|
||||
public interface Constants
|
||||
{
|
||||
public static final String HEADER_STRING = "H";
|
||||
public static final Integer GROUP_HEADER_KEY = 0;
|
||||
public static final Integer CALL_ID_HEADER_KEY = 1;
|
||||
public static final Integer SERVICE_ID_HEADER_KEY = 2;
|
||||
|
||||
public static final Integer CALLBACK_ID_HEADER_KEY = 3;
|
||||
public static final Integer CALLBACK_METHOD_HEADER_KEY = 4;
|
||||
public static final Integer CALLBACK_ARGS_HEADER_KEY = 5;
|
||||
public static final Integer CALLBACK_DONE_HEADER_KEY = 6;
|
||||
|
||||
public static final Integer COMPLETED_HEADER_KEY = 7;
|
||||
public static final Integer HAS_SESSION_FILTER_HEADER_KEY = 8;
|
||||
|
||||
public static final int IGROUP_HEADER_KEY = 0;
|
||||
public static final int ICALL_ID_HEADER_KEY = 1;
|
||||
public static final int ISERVICE_ID_HEADER_KEY = 2;
|
||||
|
||||
public static final int ICALLBACK_ID_HEADER_KEY = 3;
|
||||
public static final int ICALLBACK_METHOD_HEADER_KEY = 4;
|
||||
public static final int ICALLBACK_ARGS_HEADER_KEY = 5;
|
||||
public static final int ICALLBACK_DONE_HEADER_KEY = 6;
|
||||
|
||||
public static final int ICOMPLETED_HEADER_KEY = 7;
|
||||
public static final int IHAS_SESSION_FILTER_HEADER_KEY = 8;
|
||||
|
||||
|
||||
public static final InternalLogger ahessianLogger =
|
||||
InternalLoggerFactory.getInstance("ahessian");
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package org.rzo.netty.ahessian.application.file.remote.server;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.rzo.netty.ahessian.application.file.remote.service.AsyncFileService;
|
||||
import org.rzo.netty.ahessian.application.file.remote.service.FileObject;
|
||||
|
||||
public class AsyncFileServiceImpl implements AsyncFileService
|
||||
{
|
||||
|
||||
public FileObject getFile(String file)
|
||||
{
|
||||
File f = new File(file);
|
||||
if (!f.exists())
|
||||
return null;
|
||||
return toFileObject(f);
|
||||
}
|
||||
|
||||
private FileObject toFileObject(File f)
|
||||
{
|
||||
return new FileObjectImpl(f);
|
||||
}
|
||||
|
||||
public InputStream getInputStream(String file)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<FileObject> list(String filter)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package org.rzo.netty.ahessian.application.file.remote.server;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.rzo.netty.ahessian.application.file.remote.service.AsyncFileService;
|
||||
import org.rzo.netty.ahessian.application.file.remote.service.FileObject;
|
||||
|
||||
public class FileObjectImpl implements FileObject
|
||||
{
|
||||
long _created = -1;
|
||||
String _path = null;
|
||||
boolean _isDirectory = false;
|
||||
boolean _isFile = false;
|
||||
boolean _isHidden = false;
|
||||
long _lastModified = -1;
|
||||
long _length = -1;
|
||||
transient AsyncFileService _fileService = null;
|
||||
|
||||
public FileObjectImpl(File file)
|
||||
{
|
||||
_path = file.getAbsolutePath();
|
||||
_isDirectory = file.isDirectory();
|
||||
_isFile = file.isFile();
|
||||
_isHidden = file.isHidden();
|
||||
_lastModified = file.lastModified();
|
||||
_length = file.length();
|
||||
}
|
||||
|
||||
public FileObjectImpl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public long created()
|
||||
{
|
||||
return _created;
|
||||
}
|
||||
|
||||
public InputStream getInputStream()
|
||||
{
|
||||
return _fileService.getInputStream(_path);
|
||||
}
|
||||
|
||||
public String getPath()
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
public boolean isDirectory()
|
||||
{
|
||||
return _isDirectory;
|
||||
}
|
||||
|
||||
public boolean isFile()
|
||||
{
|
||||
return _isFile;
|
||||
}
|
||||
|
||||
public boolean isHidden()
|
||||
{
|
||||
return _isHidden;
|
||||
}
|
||||
|
||||
public long lastModified()
|
||||
{
|
||||
return _lastModified;
|
||||
}
|
||||
|
||||
public long length()
|
||||
{
|
||||
return _length;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package org.rzo.netty.ahessian.application.file.remote.service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import javax.management.Attribute;
|
||||
import javax.management.AttributeList;
|
||||
import javax.management.AttributeNotFoundException;
|
||||
import javax.management.InstanceAlreadyExistsException;
|
||||
import javax.management.InstanceNotFoundException;
|
||||
import javax.management.IntrospectionException;
|
||||
import javax.management.InvalidAttributeValueException;
|
||||
import javax.management.ListenerNotFoundException;
|
||||
import javax.management.MBeanException;
|
||||
import javax.management.MBeanRegistration;
|
||||
import javax.management.MBeanRegistrationException;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
import javax.management.NotificationFilter;
|
||||
import javax.management.NotificationListener;
|
||||
import javax.management.ObjectName;
|
||||
import javax.management.QueryExp;
|
||||
import javax.management.ReflectionException;
|
||||
|
||||
public interface AsyncFileService
|
||||
{
|
||||
public FileObject getFile(String file);
|
||||
public List<FileObject> list(String filter);
|
||||
public InputStream getInputStream(String file);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package org.rzo.netty.ahessian.application.file.remote.service;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface FileObject
|
||||
{
|
||||
public String getPath();
|
||||
public boolean isDirectory();
|
||||
public boolean isFile();
|
||||
public boolean isHidden();
|
||||
public long lastModified();
|
||||
public long created();
|
||||
public long length();
|
||||
public InputStream getInputStream();
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.client;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import javax.management.MBeanServerConnection;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import org.jboss.netty.bootstrap.ClientBootstrap;
|
||||
import org.jboss.netty.channel.Channel;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
|
||||
import org.rzo.netty.ahessian.application.jmx.remote.service.AsyncMBeanServerConnection;
|
||||
import org.rzo.netty.ahessian.application.jmx.remote.service.MBeanServerConnectionAsyncAdapter;
|
||||
import org.rzo.netty.ahessian.rpc.client.HessianProxyFactory;
|
||||
|
||||
|
||||
public class Client
|
||||
{
|
||||
static boolean stop = false;
|
||||
static MBeanServerConnection server;
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
|
||||
final ExecutorService executor = Executors.newCachedThreadPool();
|
||||
|
||||
// Configure the client.
|
||||
ClientBootstrap bootstrap = new ClientBootstrap(
|
||||
new NioClientSocketChannelFactory(
|
||||
executor,
|
||||
executor));
|
||||
|
||||
bootstrap.setOption(
|
||||
"remoteAddress", new InetSocketAddress("localhost", 8080));
|
||||
|
||||
bootstrap.setOption("reuseAddress", true);
|
||||
|
||||
|
||||
final HessianProxyFactory factory = new HessianProxyFactory(executor, "localhost:8080");
|
||||
bootstrap.setPipelineFactory(
|
||||
new RPCClientSessionPipelineFactory(new RPCClientMixinPipelineFactory(executor, factory), bootstrap));
|
||||
|
||||
|
||||
factory.setDisconnectedListener(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
//stop = true;
|
||||
}
|
||||
});
|
||||
|
||||
factory.setNewSessionListener(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
stop = false;
|
||||
executor.execute(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
System.out.println("started work thread");
|
||||
Map options = new HashMap();
|
||||
options.put("sync", true);
|
||||
options.put("timeout", (long)10000);
|
||||
AsyncMBeanServerConnection service = (AsyncMBeanServerConnection) factory.create(AsyncMBeanServerConnection.class, Client.class.getClassLoader(), options);
|
||||
server = new MBeanServerConnectionAsyncAdapter(service);
|
||||
|
||||
while (!stop)
|
||||
{
|
||||
try
|
||||
{
|
||||
ObjectName on = new ObjectName("java.lang:type=ClassLoading");
|
||||
Object x = server.getAttribute(on, "LoadedClassCount");
|
||||
System.out.println(x);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
System.out.println(ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
System.out.println("stopped work thread");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Start the connection attempt.
|
||||
ChannelFuture future = bootstrap.connect(new InetSocketAddress("localhost", 8080));
|
||||
// Wait until the connection attempt succeeds or fails.
|
||||
Channel channel = future.awaitUninterruptibly().getChannel();
|
||||
if (future.isSuccess())
|
||||
System.out.println("connected");
|
||||
|
||||
// get a proxy
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.client;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
||||
import org.rzo.netty.ahessian.application.jmx.remote.service.JmxSerializerFactory;
|
||||
import org.rzo.netty.ahessian.io.InputStreamDecoder;
|
||||
import org.rzo.netty.ahessian.io.OutputStreamEncoder;
|
||||
import org.rzo.netty.ahessian.io.PullInputStreamConsumer;
|
||||
import org.rzo.netty.ahessian.rpc.client.HessianProxyFactory;
|
||||
import org.rzo.netty.ahessian.rpc.message.HessianRPCCallEncoder;
|
||||
import org.rzo.netty.ahessian.rpc.message.HessianRPCReplyDecoder;
|
||||
import org.rzo.netty.ahessian.rpc.message.OutputProducer;
|
||||
import org.rzo.netty.ahessian.session.MixinPipeline;
|
||||
|
||||
import com.caucho.hessian4.io.SerializerFactory;
|
||||
|
||||
public class RPCClientMixinPipelineFactory implements ChannelPipelineFactory
|
||||
{
|
||||
|
||||
Executor _executor;
|
||||
HessianProxyFactory _factory;
|
||||
SerializerFactory _serializerFactory = new JmxSerializerFactory();
|
||||
|
||||
RPCClientMixinPipelineFactory(Executor executor, HessianProxyFactory factory)
|
||||
{
|
||||
_executor = executor;
|
||||
_factory = factory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ChannelPipeline getPipeline() throws Exception
|
||||
{
|
||||
ChannelPipeline pipeline = new MixinPipeline();
|
||||
// InputStreamDecoder returns an input stream and calls the next handler in a separate thread
|
||||
|
||||
pipeline.addLast("inputStream", new InputStreamDecoder());
|
||||
|
||||
//pipeline.addLast("logger2",new OutLogger1("2"));
|
||||
pipeline.addLast("outputStream", new OutputStreamEncoder());
|
||||
|
||||
pipeline.addLast("hessianReplyDecoder", new PullInputStreamConsumer(new HessianRPCReplyDecoder(_factory, _serializerFactory), _executor));
|
||||
pipeline.addLast("hessianCallEncoder", new HessianRPCCallEncoder(_serializerFactory));
|
||||
pipeline.addLast("outputProducer", new OutputProducer(_executor));
|
||||
//pipeline.addLast("logger3",new OutLogger("3"));
|
||||
pipeline.addLast("hessianHandler", _factory);
|
||||
|
||||
return pipeline;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.client;
|
||||
|
||||
import static org.jboss.netty.channel.Channels.pipeline;
|
||||
|
||||
import java.net.ConnectException;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import org.jboss.netty.bootstrap.ClientBootstrap;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.channel.ExceptionEvent;
|
||||
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
|
||||
import org.rzo.netty.ahessian.log.OutLogger;
|
||||
import org.rzo.netty.ahessian.session.ClientSessionFilter;
|
||||
|
||||
public class RPCClientSessionPipelineFactory implements ChannelPipelineFactory
|
||||
{
|
||||
|
||||
ChannelPipelineFactory _mixinFactory;
|
||||
ClientSessionFilter _sessionFilter;
|
||||
private static Timer timer = new Timer();
|
||||
private static long RECONNECT_DELAY = 5000;
|
||||
ClientBootstrap _bootstrap;
|
||||
|
||||
|
||||
|
||||
RPCClientSessionPipelineFactory(ChannelPipelineFactory mixinFactory, ClientBootstrap bootstrap)
|
||||
{
|
||||
_mixinFactory = mixinFactory;
|
||||
_sessionFilter = new ClientSessionFilter(_mixinFactory);
|
||||
_bootstrap = bootstrap;
|
||||
}
|
||||
|
||||
public ChannelPipeline getPipeline() throws Exception
|
||||
{
|
||||
ChannelPipeline pipeline = pipeline(); // Note the static import.
|
||||
pipeline.addLast("logger",new OutLogger("1"));
|
||||
pipeline.addLast("reconnector", new SimpleChannelUpstreamHandler()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) {
|
||||
ctx.sendUpstream(e);
|
||||
System.out.println("channel closed wait to reconnect ...");
|
||||
timer.schedule(new TimerTask() {
|
||||
public void run() {
|
||||
System.out.println("reconnecting...");
|
||||
ChannelFuture f = _bootstrap.connect();
|
||||
try
|
||||
{
|
||||
System.out.println("future wait");
|
||||
f.awaitUninterruptibly();
|
||||
System.out.println("future wait terminated");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (f.isSuccess())
|
||||
System.out.println("connected");
|
||||
else
|
||||
{
|
||||
System.out.println("not connected");
|
||||
// f.getChannel().close();
|
||||
}
|
||||
|
||||
}
|
||||
}, RECONNECT_DELAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause instanceof ConnectException)
|
||||
{
|
||||
System.out.println("conection lost");
|
||||
}
|
||||
ctx.getChannel().close();
|
||||
}
|
||||
}
|
||||
);
|
||||
pipeline.addLast("sessionFilter", _sessionFilter);
|
||||
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import javax.management.MBeanServer;
|
||||
import javax.management.MBeanServerConnection;
|
||||
import javax.management.MBeanServerFactory;
|
||||
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
||||
import org.rzo.netty.ahessian.application.jmx.remote.service.JmxSerializerFactory;
|
||||
import org.rzo.netty.ahessian.io.InputStreamDecoder;
|
||||
import org.rzo.netty.ahessian.io.OutputStreamEncoder;
|
||||
import org.rzo.netty.ahessian.io.PullInputStreamConsumer;
|
||||
import org.rzo.netty.ahessian.rpc.message.HessianRPCCallDecoder;
|
||||
import org.rzo.netty.ahessian.rpc.message.HessianRPCReplyEncoder;
|
||||
import org.rzo.netty.ahessian.rpc.message.OutputProducer;
|
||||
import org.rzo.netty.ahessian.rpc.server.HessianRPCServiceHandler;
|
||||
import org.rzo.netty.ahessian.rpc.server.ImmediateInvokeService;
|
||||
import org.rzo.netty.ahessian.session.MixinPipeline;
|
||||
|
||||
import com.caucho.hessian4.io.SerializerFactory;
|
||||
|
||||
public class RPCServerMixinPipelineFactory implements ChannelPipelineFactory
|
||||
{
|
||||
|
||||
Executor _executor;
|
||||
SerializerFactory _serializerFactory = new JmxSerializerFactory();
|
||||
|
||||
RPCServerMixinPipelineFactory(Executor executor)
|
||||
{
|
||||
_executor = executor;
|
||||
}
|
||||
|
||||
public ChannelPipeline getPipeline() throws Exception
|
||||
{
|
||||
ChannelPipeline pipeline = new MixinPipeline();
|
||||
pipeline.addLast("inputStream", new InputStreamDecoder());
|
||||
//pipeline.addLast("logger2",new OutLogger("2"));
|
||||
pipeline.addLast("outputStream", new OutputStreamEncoder());
|
||||
pipeline.addLast("callDecoder", new PullInputStreamConsumer(new HessianRPCCallDecoder(_serializerFactory), _executor ));
|
||||
pipeline.addLast("replyEncoder", new HessianRPCReplyEncoder(_serializerFactory));
|
||||
pipeline.addLast("outputProducer", new OutputProducer(_executor));
|
||||
//pipeline.addLast("logger3",new OutLogger("3"));
|
||||
HessianRPCServiceHandler factory = new HessianRPCServiceHandler(_executor);
|
||||
ArrayList servers = MBeanServerFactory.findMBeanServer(null);
|
||||
MBeanServer server = null;
|
||||
if (servers != null && servers.size() > 0)
|
||||
server = (MBeanServer) servers.get(0);
|
||||
if (server == null)
|
||||
server = MBeanServerFactory.createMBeanServer();
|
||||
|
||||
|
||||
//factory.addService("default", new ContinuationService(new ContinuationHalloWorldService(), HelloWorldServiceInterface.class, factory, _executor));
|
||||
factory.addService("default", new ImmediateInvokeService(server, MBeanServerConnection.class, factory));
|
||||
pipeline.addLast("hessianRPCServer", factory);
|
||||
|
||||
//bootstrap.getPipeline().addLast("logger4",new OutLogger("4"));
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.server;
|
||||
|
||||
import static org.jboss.netty.channel.Channels.pipeline;
|
||||
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
||||
import org.rzo.netty.ahessian.log.OutLogger;
|
||||
import org.rzo.netty.ahessian.session.ServerSessionFilter;
|
||||
|
||||
public class RPCServerSessionPipelineFactory implements ChannelPipelineFactory
|
||||
{
|
||||
|
||||
ChannelPipelineFactory _mixinFactory;
|
||||
|
||||
RPCServerSessionPipelineFactory(ChannelPipelineFactory mixinFactory)
|
||||
{
|
||||
_mixinFactory = mixinFactory;
|
||||
}
|
||||
|
||||
public ChannelPipeline getPipeline() throws Exception
|
||||
{
|
||||
ChannelPipeline pipeline = pipeline(); // Note the static import.
|
||||
pipeline.addLast("logger",new OutLogger("1"));
|
||||
pipeline.addLast("sessionFilter", new ServerSessionFilter(_mixinFactory));
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.server;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.jboss.netty.bootstrap.ServerBootstrap;
|
||||
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
|
||||
|
||||
public class Server
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
Executor executor = Executors.newFixedThreadPool(200);
|
||||
|
||||
// Configure the server.
|
||||
ServerBootstrap bootstrap = new ServerBootstrap(
|
||||
new NioServerSocketChannelFactory(
|
||||
executor,
|
||||
executor));
|
||||
|
||||
bootstrap.setPipelineFactory(
|
||||
new RPCServerSessionPipelineFactory( new RPCServerMixinPipelineFactory(executor)));
|
||||
|
||||
// Bind and start to accept incoming connections.
|
||||
bootstrap.bind(new InetSocketAddress(8080));
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,378 @@
|
|||
package org.rzo.netty.ahessian.application.jmx.remote.service;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.management.Attribute;
|
||||
import javax.management.AttributeList;
|
||||
import javax.management.AttributeNotFoundException;
|
||||
import javax.management.InstanceAlreadyExistsException;
|
||||
import javax.management.InstanceNotFoundException;
|
||||
import javax.management.IntrospectionException;
|
||||
import javax.management.InvalidAttributeValueException;
|
||||
import javax.management.ListenerNotFoundException;
|
||||
import javax.management.MBeanException;
|
||||
import javax.management.MBeanRegistration;
|
||||
import javax.management.MBeanRegistrationException;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
import javax.management.NotificationFilter;
|
||||
import javax.management.NotificationListener;
|
||||
import javax.management.ObjectName;
|
||||
import javax.management.QueryExp;
|
||||
import javax.management.ReflectionException;
|
||||
|
||||
public interface AsyncMBeanServerConnection
|
||||
{
|
||||
/**
|
||||
* Adds a NotificationListener to a registered MBean.
|
||||
* A notification emitted by the specified source MBean will be forwarded by the MBeanServer to the given listener,
|
||||
* if the given NotificationFilter allows so. If the filter is null, every notification will be sent to the
|
||||
* listener.
|
||||
* The handback object is transparently passed to the listener by the MBeanServer.
|
||||
* The source of the notification is the source MBean ObjectName.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be added.
|
||||
* @param listener The listener which will handle the notifications emitted by the source MBean.
|
||||
* @param filter The filter which will allow the notification to be forwarded to the listener.
|
||||
* @param handback The context to be sent to the listener when a notification is emitted.
|
||||
* @throws InstanceNotFoundException If the source MBean is not registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
|
||||
*/
|
||||
public Object addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
|
||||
throws InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Adds a NotificationListener to a registered MBean.
|
||||
* A notification emitted by the specified source MBean will be forwarded by the MBeanServer to the given listener MBean,
|
||||
* if the given NotificationFilter allows so. If the filter is null, every notification will be sent to the
|
||||
* listener.
|
||||
* The handback object is transparently passed to the listener by the MBeanServer.
|
||||
* The source of the notification is the source MBean ObjectName.
|
||||
* If the listener MBean is unregistered, it will continue to receive notifications.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be added.
|
||||
* @param listener The ObjectName of the listener MBean which will handle the notifications emitted by the source MBean.
|
||||
* @param filter The filter which will allow the notification to be forwarded to the listener.
|
||||
* @param handback The context to be sent to the listener when a notification is emitted.
|
||||
* @throws InstanceNotFoundException If the source or listener MBean are not registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
|
||||
*/
|
||||
public Object addNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, Object handback)
|
||||
throws InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Removes the specified listener from the named source MBean.
|
||||
* If the listener is registered more than once, for example with different filters or handbacks,
|
||||
* this method will remove all those registrations.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be removed.
|
||||
* @param listener The listener to be removed.
|
||||
* @throws InstanceNotFoundException If the source MBean is not registered in the MBeanServer.
|
||||
* @throws ListenerNotFoundException If the listener is not registered in the MBean.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
|
||||
*/
|
||||
public Object removeNotificationListener(ObjectName observed, NotificationListener listener)
|
||||
throws InstanceNotFoundException, ListenerNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Removes the specified listener MBean from the named source MBean.
|
||||
* If the listener is registered more than once, for example with different filters or handbacks,
|
||||
* this method will remove all those registrations.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be removed.
|
||||
* @param listener The ObjectName of the listener MBean to be removed.
|
||||
* @throws InstanceNotFoundException If the source or listener MBean are not registered in the MBeanServer.
|
||||
* @throws ListenerNotFoundException The listener is not registered in the MBean.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
|
||||
*/
|
||||
public Object removeNotificationListener(ObjectName observed, ObjectName listener)
|
||||
throws InstanceNotFoundException, ListenerNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Removes the specified listener from the named source MBean.
|
||||
* The MBean must have a listener that exactly matches the given listener, filter, and handback parameters.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be removed.
|
||||
* @param listener The listener to be removed.
|
||||
* @param filter The filter that was specified when the listener was added.
|
||||
* @param handback The handback that was specified when the listener was added.
|
||||
* @throws InstanceNotFoundException If the source MBean is not registered in the MBeanServer.
|
||||
* @throws ListenerNotFoundException If the listener (along with filter and handback) is not registered in the MBean.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
|
||||
* @since JMX 1.2
|
||||
*/
|
||||
public Object removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
|
||||
throws InstanceNotFoundException, ListenerNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Removes the specified listener MBean from the named source MBean.
|
||||
* The MBean must have a listener that exactly matches the given listener, filter, and handback parameters.
|
||||
*
|
||||
* @param observed The ObjectName of the source MBean on which the listener should be removed.
|
||||
* @param listener The ObjectName of the listener MBean to be removed.
|
||||
* @param filter The filter that was specified when the listener was added.
|
||||
* @param handback The handback that was specified when the listener was added.
|
||||
* @throws InstanceNotFoundException If the source MBean is not registered in the MBeanServer.
|
||||
* @throws ListenerNotFoundException If the listener (along with filter and handback) is not registered in the MBean.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
|
||||
* @since JMX 1.2
|
||||
*/
|
||||
public Object removeNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, Object handback)
|
||||
throws InstanceNotFoundException, ListenerNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Returns the metadata information exposed for management about the named MBean.
|
||||
*
|
||||
* @param objectName The name of the MBean for which retrieve the metadata.
|
||||
* @return An instance of MBeanInfo allowing the retrieval of constructors, attributes, operations and notifications of this MBean.
|
||||
* @throws IntrospectionException If an exception occured during introspection of the MBean.
|
||||
* @throws InstanceNotFoundException If the named MBean is not registered in the MBeanServer.
|
||||
* @throws ReflectionException If a reflection-type exception occurred
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object getMBeanInfo(ObjectName objectName)
|
||||
throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Returns whether the MBean specified is an instance of the specified class.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean.
|
||||
* @param className The name of the class.
|
||||
* @return True if the MBean specified is an instance of the specified class.
|
||||
* @throws InstanceNotFoundException If the named MBean is not registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object isInstanceOf(ObjectName objectName, String className)
|
||||
throws InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Returns the list of different ObjectName domains under which the MBeans in this MBeanServer are registered.
|
||||
*
|
||||
* @return The array of different ObjectName domains present in this MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @since JMX 1.2
|
||||
*/
|
||||
public Object getDomains()
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Returns the default domain for this MBeanServer used in case ObjectName domain are not specified.
|
||||
*
|
||||
* @return The default domain of this MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object getDefaultDomain()
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* A facility method for <code>createMBean(className, objectName, null, null)</code>.
|
||||
*
|
||||
* @see #createMBean(String, ObjectName, Object[], String[])
|
||||
*/
|
||||
public Object createMBean(String className, ObjectName objectName)
|
||||
throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException;
|
||||
|
||||
/**
|
||||
* Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
|
||||
* The MBeanServer will use its ClassLoaderRepository to load the class of the MBean and the specified
|
||||
* constructor's parameter classes, and creates the instance passing the specified arguments.
|
||||
* The ObjectName may be null if the MBean implements {@link MBeanRegistration}
|
||||
*
|
||||
* @param className The class name of the MBean to be instantiated.
|
||||
* @param objectName The ObjectName of the MBean, may be null.
|
||||
* @param args An array containing the arguments to pass to the constructor.
|
||||
* @param parameters An array containing the signature of the constructor.
|
||||
* @return An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws InstanceAlreadyExistsException If another MBean with the same ObjectName is already registered in the MBeanServer.
|
||||
* @throws MBeanRegistrationException If an exception is thrown during MBean's registration.
|
||||
* @throws MBeanException If the constructor of the MBean has thrown an exception
|
||||
* @throws NotCompliantMBeanException If the MBean is not a JMX compliant MBean
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object createMBean(String className, ObjectName objectName, Object[] args, String[] parameters)
|
||||
throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException;
|
||||
|
||||
/**
|
||||
* A facility method for <code>createMBean(className, objectName, loaderName, null, null)</code>.
|
||||
*
|
||||
* @see #createMBean(String, ObjectName, ObjectName, Object[], String[])
|
||||
*/
|
||||
public Object createMBean(String className, ObjectName objectName, ObjectName loaderName)
|
||||
throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
|
||||
* The MBeanServer will use the specified classloader MBean to load the class of the MBean and the specified
|
||||
* constructor's parameter classes, and creates the instance passing the specified arguments, or the classloader
|
||||
* of the MBeanServer if the classloader ObjectName is null.
|
||||
* The ObjectName may be null if the MBean implements {@link MBeanRegistration}
|
||||
*
|
||||
* @param className The class name of the MBean to be instantiated.
|
||||
* @param objectName The ObjectName of the MBean, may be null.
|
||||
* @param loaderName The ObjectName of the classloader MBean to be used.
|
||||
* @param args An array containing the arguments to pass to the constructor.
|
||||
* @param parameters An array containing the signature of the constructor.
|
||||
* @return An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws InstanceAlreadyExistsException If another MBean with the same ObjectName is already registered in the MBeanServer.
|
||||
* @throws MBeanRegistrationException If an exception is thrown during MBean's registration.
|
||||
* @throws MBeanException If the constructor of the MBean has thrown an exception
|
||||
* @throws NotCompliantMBeanException If the MBean is not a JMX compliant MBean
|
||||
* @throws InstanceNotFoundException If the specified classloader MBean is not registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object createMBean(String className, ObjectName objectName, ObjectName loaderName, Object[] args, String[] parameters)
|
||||
throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Unregisters the MBean with the specified ObjectName from this MBeanServer.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean to be unregistered.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws MBeanRegistrationException If an exception is thrown during MBean's unregistration.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object unregisterMBean(ObjectName objectName)
|
||||
throws InstanceNotFoundException, MBeanRegistrationException, IOException;
|
||||
|
||||
/**
|
||||
* Gets the value of the specified attribute of the named MBean.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean from which the attribute is to be retrieved.
|
||||
* @param attribute The attribute name.
|
||||
* @return The value of the specified attribute.
|
||||
* @throws AttributeNotFoundException If the specified attribute does not belong to the management interface of the MBean.
|
||||
* @throws MBeanException If the MBean's getter method throws an exception.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #setAttribute
|
||||
*/
|
||||
public Object getAttribute(ObjectName objectName, String attribute)
|
||||
throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Sets the value of the specified attribute of the named MBean.
|
||||
*
|
||||
* @param objectName The name of the MBean within which the attribute is to be set.
|
||||
* @param attribute The Attribute to be set.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws AttributeNotFoundException If the specified attribute does not belong to the management interface of the MBean.
|
||||
* @throws InvalidAttributeValueException If the value specified for the attribute does not match the attribute's type
|
||||
* @throws MBeanException If the MBean's setter method throws an exception.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #getAttribute
|
||||
*/
|
||||
public Object setAttribute(ObjectName objectName, Attribute attribute)
|
||||
throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Gets the values of several attributes of the named MBean.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean from which the attributes are to be retrieved.
|
||||
* @param attributes The attribute names.
|
||||
* @return An AttributeList containing the values of the attributes that it has been possible to retrieve.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #setAttributes
|
||||
*/
|
||||
public Object getAttributes(ObjectName objectName, String[] attributes)
|
||||
throws InstanceNotFoundException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Sets the values of several attributes of the named MBean.
|
||||
*
|
||||
* @param objectName The name of the MBean within which the attribute is to be set.
|
||||
* @param attributes The AttributeList containing the Attributes to be set.
|
||||
* @return The AttributeList containing the attributes that it has been possible to set.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
* @see #getAttributes
|
||||
*/
|
||||
public Object setAttributes(ObjectName objectName, AttributeList attributes)
|
||||
throws InstanceNotFoundException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Invokes the specified operation on the named MBean.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean on which the method is to be invoked.
|
||||
* @param methodName The name of the operation to be invoked.
|
||||
* @param args An array containing the arguments to pass to the operation.
|
||||
* @param parameters An array containing the signature of the operation.
|
||||
* @return The return value of the operation, or null if the operation returns void.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws MBeanException If the MBean's operation method throws an exception.
|
||||
* @throws ReflectionException If a reflection exception is thrown.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object invoke(ObjectName objectName, String methodName, Object[] args, String[] parameters)
|
||||
throws InstanceNotFoundException, MBeanException, ReflectionException, IOException;
|
||||
|
||||
/**
|
||||
* Returns the number of MBeans registered in this MBeanServer.
|
||||
*
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object getMBeanCount()
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Checks whether the given ObjectName identifies an MBean registered in this MBeanServer.
|
||||
*
|
||||
* @param objectName The ObjectName to be checked.
|
||||
* @return True if an MBean with the specified ObjectName is already registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object isRegistered(ObjectName objectName)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Gets the ObjectInstance for the named MBean registered with the MBeanServer.
|
||||
*
|
||||
* @param objectName The ObjectName of the MBean.
|
||||
* @return The ObjectInstance associated with the named MBean.
|
||||
* @throws InstanceNotFoundException If the specified MBean is not registered in the MBeanServer.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object getObjectInstance(ObjectName objectName)
|
||||
throws InstanceNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Gets a subset of the ObjectInstances belonging to MBeans registered in this MBeanServer.
|
||||
* It is possible to filter the set of MBeans by specifying a pattern for MBean's ObjectNames, and a query expression
|
||||
* to be evaluated to further filter the set of MBeans.
|
||||
* The set can be further restricted if any exception is thrown during retrieval of MBean (for example for
|
||||
* security reasons): the failing MBean will not be included.
|
||||
*
|
||||
* @param patternName The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.
|
||||
* @param filter The query expression to be evaluated for selecting MBeans, or null.
|
||||
* @return A set containing the ObjectInstance objects for the selected MBeans.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object queryMBeans(ObjectName patternName, QueryExp filter)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Gets a subset of the ObjectNames belonging to MBeans registered in this MBeanServer.
|
||||
* It is possible to filter the set of MBeans by specifying a pattern for MBean's ObjectNames, and a query expression
|
||||
* to be evaluated to further filter the set of MBeans.
|
||||
* The set can be further restricted if any exception is thrown during retrieval of MBean (for example for
|
||||
* security reasons): the failing MBean will not be included.
|
||||
*
|
||||
* @param patternName The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.
|
||||
* @param filter The query expression to be evaluated for selecting MBeans, or null.
|
||||
* @return A set containing the ObjectNames for the selected MBeans.
|
||||
* @throws IOException If a communication problem occurred.
|
||||
*/
|
||||
public Object queryNames(ObjectName patternName, QueryExp filter)
|
||||
throws IOException;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue