JBoss Remoting SVN: r4807 - in remoting3/trunk: core/src/main/java/org/jboss/remoting/core and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-14 17:01:32 -0500 (Wed, 14 Jan 2009)
New Revision: 4807
Modified:
remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java
remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java
Log:
Client.send() should return IoFuture<? extends O> rather than IoFuture<O>; also add some logging
Modified: remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java 2009-01-14 22:00:26 UTC (rev 4806)
+++ remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java 2009-01-14 22:01:32 UTC (rev 4807)
@@ -84,7 +84,7 @@
*
* @throws IOException if the request could not be sent
*/
- IoFuture<O> send(I request) throws IOException;
+ IoFuture<? extends O> send(I request) throws IOException;
/**
* Get the attribute map. This map holds metadata about the current clinet.
Modified: remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java 2009-01-14 22:00:26 UTC (rev 4806)
+++ remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java 2009-01-14 22:01:32 UTC (rev 4807)
@@ -73,6 +73,7 @@
if (! isOpen()) {
throw new IOException("Client is not open");
}
+ log.trace("Client.invoke() sending request \"%s\"", request);
final I actualRequest = castRequest(request);
final QueueExecutor executor = new QueueExecutor();
final FutureReplyImpl<O> futureReply = new FutureReplyImpl<O>(executor, replyClass);
@@ -82,7 +83,9 @@
futureReply.addNotifier(IoUtils.<O>attachmentClosingNotifier(), executor);
executor.runQueue();
try {
- return futureReply.getInterruptibly();
+ final O reply = futureReply.getInterruptibly();
+ log.trace("Client.invoke() received reply \"%s\"", reply);
+ return reply;
} catch (InterruptedException e) {
try {
futureReply.cancel();
@@ -93,10 +96,11 @@
}
}
- public IoFuture<O> send(final I request) throws IOException {
+ public IoFuture<? extends O> send(final I request) throws IOException {
if (! isOpen()) {
throw new IOException("Client is not open");
}
+ log.trace("Client.send() sending request \"%s\"", request);
final I actualRequest = castRequest(request);
final FutureReplyImpl<O> futureReply = new FutureReplyImpl<O>(executor, replyClass);
final ReplyHandler replyHandler = futureReply.getReplyHandler();
15 years, 10 months
JBoss Remoting SVN: r4806 - remoting3/trunk.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-14 17:00:26 -0500 (Wed, 14 Jan 2009)
New Revision: 4806
Modified:
remoting3/trunk/build.xml
Log:
Depend on 1.2.0.GA of XNIO
Modified: remoting3/trunk/build.xml
===================================================================
--- remoting3/trunk/build.xml 2009-01-10 02:18:46 UTC (rev 4805)
+++ remoting3/trunk/build.xml 2009-01-14 22:00:26 UTC (rev 4806)
@@ -73,7 +73,7 @@
<target name="lib.xnio-api" depends="jboss.repository">
<mvn:dependencies pathId="lib.xnio-api.classpath">
<mvn:remoteRepository refid="jboss.repository"/>
- <mvn:dependency groupId="org.jboss.xnio" artifactId="xnio-api" version="1.2.0.CR2"/>
+ <mvn:dependency groupId="org.jboss.xnio" artifactId="xnio-api" version="1.2.0.GA"/>
</mvn:dependencies>
<property name="lib.xnio-api.local" refid="lib.xnio-api.classpath"/>
</target>
@@ -83,7 +83,7 @@
<target name="lib.xnio-nio" depends="jboss.repository">
<mvn:dependencies pathId="lib.xnio-nio.classpath">
<mvn:remoteRepository refid="jboss.repository"/>
- <mvn:dependency groupId="org.jboss.xnio" artifactId="xnio-nio" version="1.2.0.CR2"/>
+ <mvn:dependency groupId="org.jboss.xnio" artifactId="xnio-nio" version="1.2.0.GA"/>
</mvn:dependencies>
<property name="lib.xnio-nio.local" refid="lib.xnio-nio.classpath"/>
</target>
15 years, 10 months
JBoss Remoting SVN: r4805 - remoting-mc-int/trunk/metadata/src/main/resources/META-INF.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 21:18:46 -0500 (Fri, 09 Jan 2009)
New Revision: 4805
Modified:
remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml
Log:
Deployer beans
Modified: remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml 2009-01-10 02:18:22 UTC (rev 4804)
+++ remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml 2009-01-10 02:18:46 UTC (rev 4805)
@@ -4,7 +4,7 @@
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="RemotingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+ <bean name="RemotingSchemaResolverDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
<constructor>
<parameter>org.jboss.remoting.metadata.RemotingMetaData</parameter>
</constructor>
@@ -13,16 +13,15 @@
<!-- TODO - build management info from annotations -->
</bean>
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
- <property name="type">beans</property>
+ <bean name="RemotingBeanMetaDataFactoryDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer">
+ <constructor>
+ <parameter>org.jboss.remoting.metadata.RemotingMetaData</parameter>
+ </constructor>
</bean>
- <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer">
- <property name="type">beans</property>
- </bean>
-
- <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
- <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
- <property name="type">beans</property>
- </bean>
+ <classloading xmlns="urn:jboss:classloading:1.0">
+ <requirements>
+ <module name="jboss-remoting-api"/>
+ </requirements>
+ </classloading>
</deployment>
\ No newline at end of file
15 years, 10 months
JBoss Remoting SVN: r4804 - remoting3/trunk/api/src/main/resources/META-INF.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 21:18:22 -0500 (Fri, 09 Jan 2009)
New Revision: 4804
Modified:
remoting3/trunk/api/src/main/resources/META-INF/jboss-classloading.xml
Log:
Fix jboss-classloading, again
Modified: remoting3/trunk/api/src/main/resources/META-INF/jboss-classloading.xml
===================================================================
--- remoting3/trunk/api/src/main/resources/META-INF/jboss-classloading.xml 2009-01-10 00:39:10 UTC (rev 4803)
+++ remoting3/trunk/api/src/main/resources/META-INF/jboss-classloading.xml 2009-01-10 02:18:22 UTC (rev 4804)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<classloading name="jboss-remoting-api" version="3.0.0" xmlns="urn:jboss:classloading:1.0">
+<classloading name="jboss-remoting-api" version="3.0.0.GA" xmlns="urn:jboss:classloading:1.0">
<capabilities>
- <package name="org.jboss.remoting" version="3.0.0"/>
- <package name="org.jboss.remoting.spi" version="3.0.0"/>
- <package name="org.jboss.remoting.stream" version="3.0.0"/>
+ <package name="org.jboss.remoting"/>
+ <package name="org.jboss.remoting.spi"/>
+ <package name="org.jboss.remoting.stream"/>
</capabilities>
<requirements>
- <module name="xnio-api" from-inclusive="true" from="1.2.0" reExport="true"/>
- <module name="marshalling-api" from-inclusive="true" from="1.0.0" reExport="true"/>
+ <module name="xnio-api" from-inclusive="true" from="1.2.0.GA" reExport="true"/>
+ <module name="marshalling-api" from-inclusive="true" from="1.0.0.GA" reExport="true"/>
</requirements>
</classloading>
15 years, 10 months
JBoss Remoting SVN: r4803 - remoting-mc-int/trunk.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 19:39:10 -0500 (Fri, 09 Jan 2009)
New Revision: 4803
Modified:
remoting-mc-int/trunk/build.xml
Log:
unneeded target
Modified: remoting-mc-int/trunk/build.xml
===================================================================
--- remoting-mc-int/trunk/build.xml 2009-01-10 00:36:28 UTC (rev 4802)
+++ remoting-mc-int/trunk/build.xml 2009-01-10 00:39:10 UTC (rev 4803)
@@ -122,7 +122,5 @@
<target name="metadata" description="Build the metadata module" depends="metadata.main"/>
- <target name="testing-support"/>
-
</project>
15 years, 10 months
JBoss Remoting SVN: r4802 - remoting-mc-int/trunk.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 19:36:28 -0500 (Fri, 09 Jan 2009)
New Revision: 4802
Modified:
remoting-mc-int/trunk/build.xml
Log:
No tests for raw metadata
Modified: remoting-mc-int/trunk/build.xml
===================================================================
--- remoting-mc-int/trunk/build.xml 2009-01-10 00:35:54 UTC (rev 4801)
+++ remoting-mc-int/trunk/build.xml 2009-01-10 00:36:28 UTC (rev 4802)
@@ -114,82 +114,6 @@
</path>
</target>
- <!-- test -->
-
- <target name="metadata.test.compile.depcheck">
- <mkdir dir="metadata/target/test"/>
- <uptodate property="metadata.test.compile.uptodate" targetfile="metadata/target/test/.lastcompile">
- <srcfiles dir="metadata/src/test/java">
- <include name="**/"/>
- <include name="**/*.java"/>
- <exclude name="**/.*"/>
- </srcfiles>
- </uptodate>
- </target>
-
- <target name="metadata.test.compile" depends="metadata.test.compile.depcheck" unless="metadata.test.compile.uptodate">
- <mkdir dir="metadata/target/test/classes"/>
- <javac
- source="${javac.source}"
- target="${javac.target}"
- srcdir="metadata/src/test/java"
- destdir="metadata/target/test/classes"
- debug="true">
- <compilerarg value="-Xlint:unchecked"/>
- <classpath>
- </classpath>
- </javac>
- <touch file="metadata/target/test/.lastcompile" verbose="false"/>
- </target>
-
- <target name="metadata.test" depends="metadata.main,metadata.test.compile">
- <path id="metadata.test.classpath">
- <pathelement location="metadata/target/test/classes"/>
- </path>
- </target>
-
- <!-- run tests -->
-
- <target name="metadata.runtests.pseudotarget">
- <echo message="============================================="/>
- <echo message="${message}"/>
- <echo message="============================================="/>
- <mkdir dir="metadata/target/test-results"/>
- <junit printsummary="true" fork="yes" includeantruntime="true">
- <sysproperty key="build.home" value="${basedir}"/>
- <sysproperty key="ant.library.dir" value="${ant.home}/lib"/>
- <sysproperty key="lib.junit.local" value="${lib.junit.local}"/>
- <!-- XXX other libs here - sys props are used for security policy -->
- <jvmarg line="${test.jvmargs}"/>
- <formatter type="plain" extension="${extension}"/>
- <classpath>
- <path refid="metadata.test.classpath"/>
- <!-- XXX if you have testing-support... -->
- <path refid="testing-support.classpath"/>
- <path refid="lib.junit.classpath"/>
- </classpath>
- <batchtest fork="yes" todir="metadata/target/test-results"
- haltonfailure="no">
- <fileset dir="metadata/target/test/classes">
- <include name="**/*TestCase.class"/>
- </fileset>
- </batchtest>
- </junit>
- </target>
-
- <target name="metadata.runtests" depends="metadata.test,testing-support">
- <antcall inheritall="true" inheritrefs="true" target="metadata.runtests.pseudotarget">
- <param name="extension" value=".txt"/>
- <param name="message" value="Running with no security manager"/>
- <param name="test.jvmargs" value="-Ddummy=dummy"/>
- </antcall>
- <antcall inheritall="true" inheritrefs="true" target="metadata.runtests.pseudotarget">
- <param name="extension" value="-security.txt"/>
- <param name="message" value="Running with security manager"/>
- <param name="test.jvmargs" value="-Djava.security.manager=${runtests.security.manager} -Djava.security.policy=${runtests.security.policy}"/>
- </antcall>
- </target>
-
<!-- general -->
<target name="metadata.clean">
15 years, 10 months
JBoss Remoting SVN: r4801 - remoting-mc-int/trunk.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 19:35:54 -0500 (Fri, 09 Jan 2009)
New Revision: 4801
Added:
remoting-mc-int/trunk/build.properties
remoting-mc-int/trunk/build.xml
Log:
Add build files
Added: remoting-mc-int/trunk/build.properties
===================================================================
--- remoting-mc-int/trunk/build.properties (rev 0)
+++ remoting-mc-int/trunk/build.properties 2009-01-10 00:35:54 UTC (rev 4801)
@@ -0,0 +1,4 @@
+javac.source=1.5
+javac.target=1.5
+
+lib.apiviz.doclet=net.gleamynode.apiviz.APIviz
Added: remoting-mc-int/trunk/build.xml
===================================================================
--- remoting-mc-int/trunk/build.xml (rev 0)
+++ remoting-mc-int/trunk/build.xml 2009-01-10 00:35:54 UTC (rev 4801)
@@ -0,0 +1,204 @@
+<project name="JBoss Remoting 3 Microcontainer Integration" xmlns:mvn="urn:maven-artifact-ant">
+
+ <property file="build.properties.local"/>
+ <property file="build.properties"/>
+
+ <!-- ============================================== -->
+ <!-- LIBRARIES - Keep in alpha order by target name -->
+ <!-- ============================================== -->
+
+ <property name="maven.ant.file" value="maven-ant-tasks.jar"/>
+
+ <target name="jboss.repository" depends="maven-ant">
+ <mvn:remoteRepository id="jboss.repository" url="http://repository.jboss.org/maven2"/>
+ </target>
+
+ <target name="maven-ant.check">
+ <available property="maven-ant.exists" file="${maven.ant.file}"/>
+ </target>
+
+ <target name="maven-ant.fetch" depends="maven-ant.check" unless="maven-ant.exists">
+ <get src="http://repository.jboss.org/maven2/org/apache/maven/maven-ant-tasks/2.0.9..." dest="${maven.ant.file}"/>
+ </target>
+
+ <target name="maven-ant" depends="maven-ant.fetch">
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
+ <classpath>
+ <pathelement location="${maven.ant.file}"/>
+ </classpath>
+ </typedef>
+ </target>
+
+ <!-- External library: JAXB API -->
+
+ <target name="lib.jaxb-api" depends="jboss.repository">
+ <mvn:dependencies pathId="lib.jaxb-api.classpath">
+ <mvn:remoteRepository refid="jboss.repository"/>
+ <mvn:dependency groupId="sun-jaxb" artifactId="jaxb-api" version="2.1.9"/>
+ </mvn:dependencies>
+ </target>
+
+ <!-- External library: JBoss Microcontainer kernel -->
+
+ <target name="lib.jbossmc-kernel" depends="jboss.repository">
+ <mvn:dependencies pathId="lib.jbossmc-kernel.classpath">
+ <mvn:remoteRepository refid="jboss.repository"/>
+ <mvn:dependency groupId="org.jboss.microcontainer" artifactId="jboss-kernel" version="2.0.1.GA"/>
+ </mvn:dependencies>
+ </target>
+
+ <!-- External library: JBossXB -->
+
+ <target name="lib.jbossxb" depends="jboss.repository">
+ <mvn:dependencies pathId="lib.jbossxb.classpath">
+ <mvn:remoteRepository refid="jboss.repository"/>
+ <mvn:dependency groupId="org.jboss" artifactId="jbossxb" version="2.0.0.GA"/>
+ </mvn:dependencies>
+ </target>
+
+ <!-- External library: Remoting API -->
+
+ <target name="lib.remoting-api" depends="jboss.repository">
+ <mvn:dependencies pathId="lib.remoting-api.classpath">
+ <mvn:remoteRepository refid="jboss.repository"/>
+ <mvn:dependency groupId="org.jboss.remoting" artifactId="remoting-api" version="3.0.0.GA"/>
+ </mvn:dependencies>
+ </target>
+
+ <!-- External library: Remoting Core -->
+
+ <target name="lib.remoting-core" depends="jboss.repository">
+ <mvn:dependencies pathId="lib.remoting-core.classpath">
+ <mvn:remoteRepository refid="jboss.repository"/>
+ <mvn:dependency groupId="org.jboss.remoting" artifactId="remoting-core" version="3.0.0.GA"/>
+ </mvn:dependencies>
+ </target>
+
+ <!-- ============================================== -->
+ <!-- MODULES - Keep in alpha order by target name -->
+ <!-- ============================================== -->
+
+ <!-- ======== metadata module ======== -->
+
+ <!-- main -->
+
+ <target name="metadata.main.compile.depcheck">
+ <mkdir dir="metadata/target/main"/>
+ <uptodate property="metadata.main.compile.uptodate" targetfile="metadata/target/main/.lastcompile">
+ <srcfiles dir="metadata/src/main/java">
+ <include name="**/"/>
+ <include name="**/*.java"/>
+ <exclude name="**/.*"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="metadata.main.compile" depends="lib.jaxb-api,lib.jbossmc-kernel,lib.jbossxb,lib.remoting-api,metadata.main.compile.depcheck" unless="metadata.main.compile.uptodate">
+ <mkdir dir="metadata/target/main/classes"/>
+ <javac
+ source="${javac.source}"
+ target="${javac.target}"
+ srcdir="metadata/src/main/java"
+ destdir="metadata/target/main/classes"
+ debug="true">
+ <compilerarg value="-Xlint:unchecked"/>
+ <classpath>
+ </classpath>
+ </javac>
+ <touch file="metadata/target/main/.lastcompile" verbose="false"/>
+ </target>
+
+ <target name="metadata.main" depends="metadata.main.compile">
+ <path id="metadata.main.classpath">
+ <pathelement location="metadata/target/main/classes"/>
+ </path>
+ </target>
+
+ <!-- test -->
+
+ <target name="metadata.test.compile.depcheck">
+ <mkdir dir="metadata/target/test"/>
+ <uptodate property="metadata.test.compile.uptodate" targetfile="metadata/target/test/.lastcompile">
+ <srcfiles dir="metadata/src/test/java">
+ <include name="**/"/>
+ <include name="**/*.java"/>
+ <exclude name="**/.*"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="metadata.test.compile" depends="metadata.test.compile.depcheck" unless="metadata.test.compile.uptodate">
+ <mkdir dir="metadata/target/test/classes"/>
+ <javac
+ source="${javac.source}"
+ target="${javac.target}"
+ srcdir="metadata/src/test/java"
+ destdir="metadata/target/test/classes"
+ debug="true">
+ <compilerarg value="-Xlint:unchecked"/>
+ <classpath>
+ </classpath>
+ </javac>
+ <touch file="metadata/target/test/.lastcompile" verbose="false"/>
+ </target>
+
+ <target name="metadata.test" depends="metadata.main,metadata.test.compile">
+ <path id="metadata.test.classpath">
+ <pathelement location="metadata/target/test/classes"/>
+ </path>
+ </target>
+
+ <!-- run tests -->
+
+ <target name="metadata.runtests.pseudotarget">
+ <echo message="============================================="/>
+ <echo message="${message}"/>
+ <echo message="============================================="/>
+ <mkdir dir="metadata/target/test-results"/>
+ <junit printsummary="true" fork="yes" includeantruntime="true">
+ <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="ant.library.dir" value="${ant.home}/lib"/>
+ <sysproperty key="lib.junit.local" value="${lib.junit.local}"/>
+ <!-- XXX other libs here - sys props are used for security policy -->
+ <jvmarg line="${test.jvmargs}"/>
+ <formatter type="plain" extension="${extension}"/>
+ <classpath>
+ <path refid="metadata.test.classpath"/>
+ <!-- XXX if you have testing-support... -->
+ <path refid="testing-support.classpath"/>
+ <path refid="lib.junit.classpath"/>
+ </classpath>
+ <batchtest fork="yes" todir="metadata/target/test-results"
+ haltonfailure="no">
+ <fileset dir="metadata/target/test/classes">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="metadata.runtests" depends="metadata.test,testing-support">
+ <antcall inheritall="true" inheritrefs="true" target="metadata.runtests.pseudotarget">
+ <param name="extension" value=".txt"/>
+ <param name="message" value="Running with no security manager"/>
+ <param name="test.jvmargs" value="-Ddummy=dummy"/>
+ </antcall>
+ <antcall inheritall="true" inheritrefs="true" target="metadata.runtests.pseudotarget">
+ <param name="extension" value="-security.txt"/>
+ <param name="message" value="Running with security manager"/>
+ <param name="test.jvmargs" value="-Djava.security.manager=${runtests.security.manager} -Djava.security.policy=${runtests.security.policy}"/>
+ </antcall>
+ </target>
+
+ <!-- general -->
+
+ <target name="metadata.clean">
+ <delete dir="metadata/target"/>
+ </target>
+
+ <target name="metadata" description="Build the metadata module" depends="metadata.main"/>
+
+ <target name="testing-support"/>
+
+</project>
+
15 years, 10 months
JBoss Remoting SVN: r4800 - remoting3/trunk.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 19:28:57 -0500 (Fri, 09 Jan 2009)
New Revision: 4800
Modified:
remoting3/trunk/build.xml
Log:
Remove compat from build (for now)
Modified: remoting3/trunk/build.xml
===================================================================
--- remoting3/trunk/build.xml 2009-01-10 00:26:03 UTC (rev 4799)
+++ remoting3/trunk/build.xml 2009-01-10 00:28:57 UTC (rev 4800)
@@ -38,33 +38,6 @@
</mvn:dependencies>
</target>
- <!-- External library: JAXB API -->
-
- <target name="lib.jaxb-api" depends="jboss.repository">
- <mvn:dependencies pathId="lib.jaxb-api.classpath">
- <mvn:remoteRepository refid="jboss.repository"/>
- <mvn:dependency groupId="sun-jaxb" artifactId="jaxb-api" version="2.1.9"/>
- </mvn:dependencies>
- </target>
-
- <!-- External library: JBoss Microcontainer kernel -->
-
- <target name="lib.jbossmc-kernel" depends="jboss.repository">
- <mvn:dependencies pathId="lib.jbossmc-kernel.classpath">
- <mvn:remoteRepository refid="jboss.repository"/>
- <mvn:dependency groupId="org.jboss.microcontainer" artifactId="jboss-kernel" version="2.0.1.GA"/>
- </mvn:dependencies>
- </target>
-
- <!-- External library: JBossXB -->
-
- <target name="lib.jbossxb" depends="jboss.repository">
- <mvn:dependencies pathId="lib.jbossxb.classpath">
- <mvn:remoteRepository refid="jboss.repository"/>
- <mvn:dependency groupId="org.jboss" artifactId="jbossxb" version="2.0.0.GA"/>
- </mvn:dependencies>
- </target>
-
<!-- External library: JUnit -->
<target name="lib.junit" depends="jboss.repository">
@@ -233,44 +206,6 @@
<property name="version" value="UNKNOWN"/>
</target>
- <!-- compat module -->
-
- <target name="compat.compile.depcheck">
- <mkdir dir="compat/target/main"/>
- <uptodate property="compat.compile.uptodate" targetfile="compat/target/main/.lastcompile">
- <srcfiles dir="compat/src/main/java">
- <include name="**/"/>
- <include name="**/*.java"/>
- <exclude name="**/.*"/>
- </srcfiles>
- </uptodate>
- </target>
-
- <target name="compat.compile" depends="compat.compile.depcheck" unless="compat.compile.uptodate">
- <mkdir dir="compat/target/main/classes"/>
- <javac
- source="${javac.source}"
- target="${javac.target}"
- srcdir="compat/src/main/java"
- destdir="compat/target/main/classes"
- debug="true">
- <compilerarg value="-Xlint:unchecked"/>
- <classpath>
- <path refid="api.classpath"/>
- </classpath>
- </javac>
- <path id="compat.classpath">
- <pathelement location="compat/target/main/classes"/>
- </path>
- <touch file="compat/target/main/.lastcompile" verbose="false"/>
- </target>
-
- <target name="compat.clean">
- <delete dir="compat/target"/>
- </target>
-
- <target name="compat" description="Build the compat module" depends="api,compat.compile"/>
-
<!-- core module -->
<target name="core.compile.depcheck">
@@ -846,7 +781,7 @@
<!-- core -->
- <target name="all-core" description="Build all core targets" depends="api,compat,core,protocol.basic,protocol.multiplex,samples,testing-support"/>
+ <target name="all-core" description="Build all core targets" depends="api,core,protocol.basic,protocol.multiplex,samples,testing-support"/>
<!-- JARs: These should be the second-to-last targets in the file -->
@@ -856,7 +791,7 @@
<target name="all" description="Build everything" depends="all-core,all-jars,api-javadoc"/>
- <target name="clean" description="Clean out all build files" depends="api.clean,compat.clean,core.clean,protocol.basic.clean,protocol.multiplex.clean,samples.clean,testing-support.clean"/>
+ <target name="clean" description="Clean out all build files" depends="api.clean,core.clean,protocol.basic.clean,protocol.multiplex.clean,samples.clean,testing-support.clean"/>
<target name="test" description="Run all tests" depends="api.test,core.test,protocol.basic.test,protocol.multiplex.test"/>
15 years, 10 months
JBoss Remoting SVN: r4799 - in remoting-mc-int/trunk/metadata/src/main: resources/META-INF and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-01-09 19:26:03 -0500 (Fri, 09 Jan 2009)
New Revision: 4799
Added:
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientMetaData.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientSourceMetaData.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocalServiceMetaData.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocateServiceMetaData.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemoteServiceMetaData.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingHelper.java
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ServiceListenerMetaData.java
remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd
Removed:
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/EndpointMetaData.java
Modified:
remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingMetaData.java
Log:
Get metadata together
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlType(name = "client")
+public final class ClientMetaData {
+ private String name;
+ private String serviceBean;
+ private String requestClassName;
+ private String replyClassName;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getServiceBean() {
+ return serviceBean;
+ }
+
+ @XmlAttribute(name = "service-bean", required = true)
+ public void setServiceBean(final String serviceBean) {
+ this.serviceBean = serviceBean;
+ }
+
+ public String getRequestClassName() {
+ return requestClassName;
+ }
+
+ @XmlAttribute(name = "request-class-name")
+ public void setRequestClassName(final String requestClassName) {
+ this.requestClassName = requestClassName;
+ }
+
+ public String getReplyClassName() {
+ return replyClassName;
+ }
+
+ @XmlAttribute(name = "reply-class-name")
+ public void setReplyClassName(final String replyClassName) {
+ this.replyClassName = replyClassName;
+ }
+}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientSourceMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientSourceMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ClientSourceMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ *
+ */
+@XmlType(name = "client-source")
+public final class ClientSourceMetaData {
+ private String name;
+ private String serviceBean;
+ private String requestClassName;
+ private String replyClassName;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getServiceBean() {
+ return serviceBean;
+ }
+
+ @XmlAttribute(name = "service-bean", required = true)
+ public void setServiceBean(final String serviceBean) {
+ this.serviceBean = serviceBean;
+ }
+
+ public String getRequestClassName() {
+ return requestClassName;
+ }
+
+ @XmlAttribute(name = "request-class-name")
+ public void setRequestClassName(final String requestClassName) {
+ this.requestClassName = requestClassName;
+ }
+
+ public String getReplyClassName() {
+ return replyClassName;
+ }
+
+ @XmlAttribute(name = "reply-class-name")
+ public void setReplyClassName(final String replyClassName) {
+ this.replyClassName = replyClassName;
+ }
+
+}
Deleted: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/EndpointMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/EndpointMetaData.java 2009-01-09 20:50:24 UTC (rev 4798)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/EndpointMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -1,135 +0,0 @@
-package org.jboss.remoting.metadata;
-
-import java.io.Serializable;
-import java.util.List;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.remoting.core.util.CollectionUtil;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Metadata that describes the creation of a Remoting endpoint.
- *
- * @see org.jboss.remoting.Endpoint
- */
-@XmlType(name = "endpoint")
-public class EndpointMetaData implements BeanMetaDataFactory, Serializable {
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String executorName;
- private String rootRequestListenerName;
-
- /**
- * Get the name of the endpoint to be created.
- *
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Set the name of the endpoint to be created.
- *
- * @param name
- */
- @XmlAttribute
- public void setName(final String name) {
- this.name = name;
- }
-
- /**
- * Get the name of the executor to use. The name should be associated with a bean that implements
- * {@link java.util.concurrent.Executor}.
- *
- * @return the name
- */
- public String getExecutorName() {
- return executorName;
- }
-
- /**
- * Set the name of the executor to use. The name should be associated with a bean that implements
- * {@link java.util.concurrent.Executor}.
- *
- * @param executorName the name
- */
- @XmlAttribute(name = "executor")
- public void setExecutorName(final String executorName) {
- this.executorName = executorName;
- }
-
- /**
- * Get the name of the root request listener bean for this endpoint. The name should be associated with a bean
- * that implements {@link org.jboss.remoting.RequestListener}.
- *
- * @return the name of root request listener bean
- */
- public String getRootRequestListenerName() {
- return rootRequestListenerName;
- }
-
- /**
- * Set the name of the root request listener bean for this endpoint. The name should be associated with a bean
- * that implements {@link org.jboss.remoting.RequestListener}.
- *
- * @param rootRequestListenerName the name of the root request listener bean
- */
- @XmlAttribute(name = "rootRequestListener")
- public void setRootRequestListenerName(final String rootRequestListenerName) {
- this.rootRequestListenerName = rootRequestListenerName;
- }
-
- /**
- * Create a duplicate of this metadata object.
- *
- * @return a duplicate
- */
- public EndpointMetaData clone() throws CloneNotSupportedException {
- return (EndpointMetaData) super.clone();
- }
-
- /**
- * Get all the metadata objects required to deploy an endpoint.
- *
- * @return the metadata objects
- */
- @XmlTransient
- public List<BeanMetaData> getBeans() {
- final String userEndpointName = "Endpoint:" + name;
- final String coreEndpointName = "CoreEndpoint:" + name;
- final String jrppProtocolSupportName = "JrppProtocolSupport:" + name;
-
- final BeanMetaData coreEndpointMetaData = buildCoreEndpointMetaData(coreEndpointName);
- final BeanMetaData endpointMetaData = buildEndpointMetaData(userEndpointName, coreEndpointName);
- final BeanMetaData jrppSupportMetaData = buildJrppProtocolSupportMetaData(userEndpointName, jrppProtocolSupportName);
-
- return CollectionUtil.unmodifiableList(coreEndpointMetaData, endpointMetaData, jrppSupportMetaData);
- }
-
- private BeanMetaData buildCoreEndpointMetaData(final String coreEndpointName) {
- final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(coreEndpointName);
- builder.addConstructorParameter("java.lang.String", name);
- builder.addConstructorParameter("org.jboss.remoting.RequestListener", builder.createInject(rootRequestListenerName));
- builder.addPropertyMetaData("executor", builder.createInject(executorName));
- return builder.getBeanMetaData();
- }
-
- private BeanMetaData buildEndpointMetaData(final String userEndpointName, final String coreEndpointName) {
- final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(userEndpointName);
- builder.setFactory(coreEndpointName, "userEndpoint");
- return builder.getBeanMetaData();
- }
-
- private BeanMetaData buildJrppProtocolSupportMetaData(final String userEndpointName, final String jrppProtocolSupportName) {
- final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(jrppProtocolSupportName);
- builder.addPropertyMetaData("executor", builder.createInject(executorName));
- builder.addPropertyMetaData("endpoint", builder.createInject(userEndpointName));
- return builder.getBeanMetaData();
- }
-}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocalServiceMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocalServiceMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocalServiceMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlType(name = "service")
+public final class LocalServiceMetaData implements Cloneable {
+
+ private String name;
+ private String requestListenerClass;
+ private String requestClassName;
+ private String replyClassName;
+ private String serviceType;
+ private String groupName;
+ private int metric;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getRequestListenerClass() {
+ return requestListenerClass;
+ }
+
+ @XmlAttribute(name = "request-listener-class")
+ public void setRequestListenerClass(final String requestListenerClass) {
+ this.requestListenerClass = requestListenerClass;
+ }
+
+ public String getRequestClassName() {
+ return requestClassName;
+ }
+
+ @XmlAttribute(name = "request-class")
+ public void setRequestClassName(final String requestClassName) {
+ this.requestClassName = requestClassName;
+ }
+
+ public String getReplyClassName() {
+ return replyClassName;
+ }
+
+ @XmlAttribute(name = "reply-class")
+ public void setReplyClassName(final String replyClassName) {
+ this.replyClassName = replyClassName;
+ }
+
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ @XmlAttribute(name = "service-type", required = true)
+ public void setServiceType(final String serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ @XmlAttribute(name = "group-name")
+ public void setGroupName(final String groupName) {
+ this.groupName = groupName;
+ }
+
+ public int getMetric() {
+ return metric;
+ }
+
+ @XmlAttribute(name = "metric")
+ public void setMetric(final int metric) {
+ this.metric = metric;
+ }
+
+ protected LocalServiceMetaData clone() throws CloneNotSupportedException {
+ return (LocalServiceMetaData) super.clone();
+ }
+}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocateServiceMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocateServiceMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/LocateServiceMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlType(name = "locate-service")
+public final class LocateServiceMetaData {
+ private String name;
+ private String uri;
+ private String requestClassName;
+ private String replyClassName;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ @XmlAttribute(required = true)
+ public void setUri(final String uri) {
+ this.uri = uri;
+ }
+
+ public String getRequestClassName() {
+ return requestClassName;
+ }
+
+ @XmlAttribute(name = "request-class-name")
+ public void setRequestClassName(final String requestClassName) {
+ this.requestClassName = requestClassName;
+ }
+
+ public String getReplyClassName() {
+ return replyClassName;
+ }
+
+ @XmlAttribute(name = "reply-class-name")
+ public void setReplyClassName(final String replyClassName) {
+ this.replyClassName = replyClassName;
+ }
+}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemoteServiceMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemoteServiceMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemoteServiceMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlType(name = "remote-service")
+public final class RemoteServiceMetaData {
+ private String name;
+ private String serviceType;
+ private String groupName;
+ private String endpointName;
+ private String requestHandlerSourceBean;
+ private int metric;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ @XmlAttribute(name = "service-type", required = true)
+ public void setServiceType(final String serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ @XmlAttribute(name = "group-name", required = true)
+ public void setGroupName(final String groupName) {
+ this.groupName = groupName;
+ }
+
+ public String getEndpointName() {
+ return endpointName;
+ }
+
+ @XmlAttribute(name = "endpoint-name", required = true)
+ public void setEndpointName(final String endpointName) {
+ this.endpointName = endpointName;
+ }
+
+ public String getRequestHandlerSourceBean() {
+ return requestHandlerSourceBean;
+ }
+
+ @XmlAttribute(name = "request-handler-source-bean", required = true)
+ public void setRequestHandlerSourceBean(final String requestHandlerSourceBean) {
+ this.requestHandlerSourceBean = requestHandlerSourceBean;
+ }
+
+ public int getMetric() {
+ return metric;
+ }
+
+ @XmlAttribute
+ public void setMetric(final int metric) {
+ this.metric = metric;
+ }
+}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingHelper.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingHelper.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingHelper.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import org.jboss.remoting.spi.RequestHandlerSource;
+import org.jboss.remoting.spi.Handle;
+import org.jboss.remoting.spi.RequestHandler;
+import org.jboss.remoting.Endpoint;
+import org.jboss.remoting.RequestListener;
+import org.jboss.remoting.LocalServiceConfiguration;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.SimpleCloseable;
+import org.jboss.remoting.RemoteServiceConfiguration;
+import org.jboss.xnio.IoUtils;
+import java.io.IOException;
+
+/**
+ *
+ */
+public final class RemotingHelper {
+ private RemotingHelper() {}
+
+ @SuppressWarnings({ "unchecked" })
+ public static <I, O> Handle<RequestHandlerSource> registerService(final Endpoint endpoint, final Class<I> requestClass, final Class<O> replyClass, final Class<? extends RequestListener> listenerClass, final String serviceType, final String groupName, final int metric) throws IOException, IllegalAccessException, InstantiationException {
+ final RequestListener<I, O> listener = (RequestListener<I, O>) listenerClass.newInstance();
+ final LocalServiceConfiguration<I, O> config = new LocalServiceConfiguration<I, O>(listener, requestClass, replyClass);
+ config.setGroupName(groupName);
+ config.setServiceType(serviceType);
+ config.setMetric(metric);
+ return endpoint.registerService(config);
+ }
+
+ public static <I, O> Client<I, O> createClient(final Endpoint endpoint, final RequestHandlerSource handlerSource, final Class<I> requestClass, final Class<O> replyClass) throws IOException {
+ final Handle<RequestHandler> handle = handlerSource.createRequestHandler();
+ try {
+ return endpoint.createClient(handle.getResource(), requestClass, replyClass);
+ } finally {
+ IoUtils.safeClose(handle);
+ }
+ }
+
+ public static SimpleCloseable registerRemoteService(final Endpoint endpoint, final String serviceType, final String groupName, final String endpointName, final RequestHandlerSource requestHandlerSource, final int metric) throws IOException {
+ final RemoteServiceConfiguration config = new RemoteServiceConfiguration();
+ config.setServiceType(serviceType);
+ config.setGroupName(groupName);
+ config.setEndpointName(endpointName);
+ config.setRequestHandlerSource(requestHandlerSource);
+ config.setMetric(metric);
+ return endpoint.registerRemoteService(config);
+ }
+}
Modified: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingMetaData.java 2009-01-09 20:50:24 UTC (rev 4798)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/RemotingMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -6,7 +6,12 @@
import java.util.List;
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.beans.metadata.api.annotations.Inject;
import org.jboss.remoting.core.util.CollectionUtil;
+import org.jboss.remoting.Endpoint;
+import org.jboss.remoting.ServiceListener;
+import org.jboss.remoting.spi.RequestHandlerSource;
import org.jboss.xb.annotations.JBossXmlSchema;
import javax.xml.bind.annotation.XmlElement;
@@ -14,6 +19,7 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
/**
* Metadata which describes a Remoting deployment. This class is intended for the parsing of
@@ -25,27 +31,77 @@
public class RemotingMetaData implements BeanMetaDataFactory, Serializable {
private static final long serialVersionUID = 1L;
- private List<EndpointMetaData> endpoints;
+ private String endpoint;
+ private List<LocalServiceMetaData> localServices;
+ private List<RemoteServiceMetaData> remoteServices;
+ private List<ClientMetaData> clients;
+ private List<ClientSourceMetaData> clientSources;
+ private List<ServiceListenerMetaData> serviceListeners;
+ private ClassLoader classLoader;
- /**
- * Get the list of nested endpoints as metadata.
- *
- * @return the endpoint metadata list
- */
- public List<EndpointMetaData> getEndpoints() {
- return endpoints;
+ public String getEndpoint() {
+ return endpoint;
}
- /**
- * Set the list of nested endpoint metadata.
- *
- * @param endpoints the endpoint metadata list
- */
- @XmlElement(name = "endpoint")
- public void setEndpoints(final List<EndpointMetaData> endpoints) {
- this.endpoints = endpoints;
+ @XmlAttribute(name = "endpoint")
+ public void setEndpoint(final String endpoint) {
+ this.endpoint = endpoint;
}
+ public List<LocalServiceMetaData> getLocalServices() {
+ return localServices;
+ }
+
+ @XmlElement(name = "local-service")
+ public void setLocalServices(final List<LocalServiceMetaData> localServices) {
+ this.localServices = localServices;
+ }
+
+ public List<RemoteServiceMetaData> getRemoteServices() {
+ return remoteServices;
+ }
+
+ @XmlElement(name = "remote-service")
+ public void setRemoteServices(final List<RemoteServiceMetaData> remoteServices) {
+ this.remoteServices = remoteServices;
+ }
+
+ public List<ClientMetaData> getClients() {
+ return clients;
+ }
+
+ @XmlElement(name = "client")
+ public void setClients(final List<ClientMetaData> clients) {
+ this.clients = clients;
+ }
+
+ public List<ClientSourceMetaData> getClientSources() {
+ return clientSources;
+ }
+
+ @XmlElement(name = "client-source")
+ public void setClientSources(final List<ClientSourceMetaData> clientSources) {
+ this.clientSources = clientSources;
+ }
+
+ public List<ServiceListenerMetaData> getServiceListeners() {
+ return serviceListeners;
+ }
+
+ @XmlElement(name = "service-listener")
+ public void setServiceListeners(final List<ServiceListenerMetaData> serviceListeners) {
+ this.serviceListeners = serviceListeners;
+ }
+
+ public ClassLoader getClassLoader() {
+ return classLoader;
+ }
+
+ @Inject
+ public void setClassLoader(final ClassLoader classLoader) {
+ this.classLoader = classLoader;
+ }
+
/**
* Create a duplicate of this object.
*
@@ -53,9 +109,9 @@
*/
public RemotingMetaData clone() throws CloneNotSupportedException {
final RemotingMetaData metaData = (RemotingMetaData) super.clone();
- metaData.endpoints = new ArrayList<EndpointMetaData>();
- for (EndpointMetaData endpointMetaData : endpoints) {
- metaData.endpoints.add(endpointMetaData.clone());
+ metaData.localServices = new ArrayList<LocalServiceMetaData>(localServices.size());
+ for (LocalServiceMetaData localService : localServices) {
+ metaData.localServices.add(localService.clone());
}
return metaData;
}
@@ -67,10 +123,74 @@
*/
@XmlTransient
public List<BeanMetaData> getBeans() {
- final List<BeanMetaData> metaDataList = CollectionUtil.arrayList();
- for (EndpointMetaData endpointMetaData : endpoints) {
- metaDataList.addAll(endpointMetaData.getBeans());
+ try {
+ final ClassLoader classLoader = getClassLoader();
+ final String endpoint = this.endpoint == null ? "default-remoting-endpoint" : this.endpoint;
+ final List<BeanMetaData> metaDataList = CollectionUtil.arrayList();
+ for (LocalServiceMetaData localService : localServices) {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(localService.getName());
+ builder.setFactoryClass(RemotingHelper.class.getName());
+ builder.setFactoryMethod("registerService");
+ builder.addConstructorParameter(Endpoint.class.getName(), builder.createInject(endpoint));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(localService.getRequestClassName(), classLoader));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(localService.getReplyClassName(), classLoader));
+ builder.addConstructorParameter(Class.class.getName(), Class.forName(localService.getRequestListenerClass(), false, classLoader));
+ builder.addConstructorParameter(String.class.getName(), localService.getServiceType());
+ builder.addConstructorParameter(String.class.getName(), localService.getGroupName());
+ builder.addConstructorParameter(int.class.getName(), Integer.valueOf(localService.getMetric()));
+ builder.setStop("close");
+ metaDataList.add(builder.getBeanMetaData());
+ }
+ for (ClientMetaData client : clients) {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(client.getName());
+ builder.setFactoryClass(RemotingHelper.class.getName());
+ builder.setFactoryMethod("createClient");
+ builder.addConstructorParameter(Endpoint.class.getName(), builder.createInject(endpoint));
+ builder.addConstructorParameter(RequestHandlerSource.class.getName(), builder.createInject(client.getServiceBean()));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(client.getRequestClassName(), classLoader));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(client.getReplyClassName(), classLoader));
+ builder.setStop("close");
+ metaDataList.add(builder.getBeanMetaData());
+ }
+ for (ClientSourceMetaData clientSource : clientSources) {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(clientSource.getName());
+ builder.setFactory(builder.createInject(endpoint));
+ builder.setFactoryMethod("createClientSource");
+ builder.addConstructorParameter(RequestHandlerSource.class.getName(), builder.createInject(clientSource.getServiceBean()));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(clientSource.getRequestClassName(), classLoader));
+ builder.addConstructorParameter(Class.class.getName(), getOptionalClass(clientSource.getReplyClassName(), classLoader));
+ builder.setStop("close");
+ metaDataList.add(builder.getBeanMetaData());
+ }
+ for (RemoteServiceMetaData remoteService : remoteServices) {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(remoteService.getName());
+ builder.setFactoryClass(RemotingHelper.class.getName());
+ builder.setFactoryMethod("registerRemoteService");
+ builder.addConstructorParameter(Endpoint.class.getName(), builder.createInject(endpoint));
+ builder.addConstructorParameter(String.class.getName(), remoteService.getServiceType());
+ builder.addConstructorParameter(String.class.getName(), remoteService.getGroupName());
+ builder.addConstructorParameter(String.class.getName(), remoteService.getEndpointName());
+ builder.addConstructorParameter(RequestHandlerSource.class.getName(), builder.createInject(remoteService.getRequestHandlerSourceBean()));
+ builder.addConstructorParameter(int.class.getName(), Integer.valueOf(remoteService.getMetric()));
+ builder.setStop("close");
+ metaDataList.add(builder.getBeanMetaData());
+ }
+ for (ServiceListenerMetaData serviceListener : serviceListeners) {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(serviceListener.getName());
+ builder.setFactory(builder.createInject(endpoint));
+ builder.setFactoryMethod("addServiceListener");
+ builder.addConstructorParameter(ServiceListener.class.getName(), builder.createInject(serviceListener.getListenerBean()));
+ builder.addConstructorParameter(boolean.class.getName(), Boolean.valueOf(serviceListener.isOnlyNew()));
+ builder.setStop("close");
+ metaDataList.add(builder.getBeanMetaData());
+ }
+ return Collections.unmodifiableList(metaDataList);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException("Cannot find a required class name", e);
}
- return Collections.unmodifiableList(metaDataList);
}
+
+ private Class<?> getOptionalClass(final String className, final ClassLoader classLoader) throws ClassNotFoundException {
+ return className == null ? Object.class : Class.forName(className, false, classLoader);
+ }
}
Added: remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ServiceListenerMetaData.java
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ServiceListenerMetaData.java (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/java/org/jboss/remoting/metadata/ServiceListenerMetaData.java 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting.metadata;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlType(name = "service-listener")
+public final class ServiceListenerMetaData {
+ private String name;
+ private String listenerBean;
+ private boolean onlyNew;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getListenerBean() {
+ return listenerBean;
+ }
+
+ @XmlAttribute(name = "listener-bean", required = true)
+ public void setListenerBean(final String listenerBean) {
+ this.listenerBean = listenerBean;
+ }
+
+ public boolean isOnlyNew() {
+ return onlyNew;
+ }
+
+ @XmlAttribute(name = "only-new")
+ public void setOnlyNew(final boolean onlyNew) {
+ this.onlyNew = onlyNew;
+ }
+}
Added: remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd 2009-01-10 00:26:03 UTC (rev 4799)
@@ -0,0 +1,63 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="urn:jboss:remoting:3.0"
+ targetNamespace="urn:jboss:remoting:3.0"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0"
+ >
+
+ <xs:complexType name="remoting">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:choice>
+ <xs:element name="local-service" type="local-service"/>
+ <xs:element name="remote-service" type="remote-service"/>
+ <xs:element name="client" type="client"/>
+ <xs:element name="client-source" type="client-source"/>
+ <xs:element name="service-listener" type="service-listener"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="endpoint" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="local-service">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="request-listener-class" type="xs:string" use="optional"/>
+ <xs:attribute name="request-listener-bean" type="xs:string" use="optional"/>
+ <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
+ <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
+ <xs:attribute name="service-type" type="xs:string" use="required"/>
+ <xs:attribute name="group-name" type="xs:string" use="optional"/>
+ <xs:attribute name="metric" type="xs:integer" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="remote-service">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="service-type" type="xs:string" use="required"/>
+ <xs:attribute name="group-name" type="xs:string" use="required"/>
+ <xs:attribute name="endpoint-name" type="xs:string" use="required"/>
+ <xs:attribute name="request-handler-source-bean" type="xs:string" use="required"/>
+ <xs:attribute name="metric" type="xs:integer" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="client">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="service-bean" type="xs:string" use="required"/>
+ <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
+ <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="client-source">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="service-bean" type="xs:string" use="required"/>
+ <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
+ <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="service-listener">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="listener-bean" type="xs:string" use="required"/>
+ <xs:attribute name="only-new" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+
+ <xs:element name="remoting" type="remoting"/>
+</xs:schema>
15 years, 10 months