JBoss Remoting SVN: r6030 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:49:59 -0400 (Wed, 04 Aug 2010)
New Revision: 6030
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml 2010-08-05 01:48:41 UTC (rev 6029)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml 2010-08-05 01:49:59 UTC (rev 6030)
@@ -1,66 +1,66 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=default"
- display-name="Servlet transport Connector (default)">
-
- <attribute name="Configuration">
- <config>
- <invoker transport="servlet">
- <attribute name="serverBindAddress">127.0.0.1</attribute>
- <attribute name="serverBindPort">8080</attribute>
- <attribute name="path">servlet-invoker/ServerInvokerServlet/default</attribute>
- <attribute name="datatype" isParam="true">test</attribute>
- <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
- <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
- </invoker>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=false"
- display-name="Servlet transport Connector (false)">
-
- <attribute name="Configuration">
- <config>
- <invoker transport="servlet">
- <attribute name="serverBindAddress">127.0.0.1</attribute>
- <attribute name="serverBindPort">8080</attribute>
- <attribute name="path">servlet-invoker/ServerInvokerServlet/false</attribute>
- <attribute name="datatype" isParam="true">test</attribute>
- <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
- <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
- <attribute name="useRemotingContentType" isParam="true">false</attribute>
- </invoker>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=true"
- display-name="Servlet transport Connector (true)">
-
- <attribute name="Configuration">
- <config>
- <invoker transport="servlet">
- <attribute name="serverBindAddress">127.0.0.1</attribute>
- <attribute name="serverBindPort">8080</attribute>
- <attribute name="path">servlet-invoker/ServerInvokerServlet/true</attribute>
- <attribute name="datatype" isParam="true">test</attribute>
- <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
- <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
- <attribute name="useRemotingContentType" isParam="true">true</attribute>
- </invoker>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
-</server>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=default"
+ display-name="Servlet transport Connector (default)">
+
+ <attribute name="Configuration">
+ <config>
+ <invoker transport="servlet">
+ <attribute name="serverBindAddress">127.0.0.1</attribute>
+ <attribute name="serverBindPort">8080</attribute>
+ <attribute name="path">servlet-invoker/ServerInvokerServlet/default</attribute>
+ <attribute name="datatype" isParam="true">test</attribute>
+ <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
+ <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
+ </invoker>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=false"
+ display-name="Servlet transport Connector (false)">
+
+ <attribute name="Configuration">
+ <config>
+ <invoker transport="servlet">
+ <attribute name="serverBindAddress">127.0.0.1</attribute>
+ <attribute name="serverBindPort">8080</attribute>
+ <attribute name="path">servlet-invoker/ServerInvokerServlet/false</attribute>
+ <attribute name="datatype" isParam="true">test</attribute>
+ <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
+ <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
+ <attribute name="useRemotingContentType" isParam="true">false</attribute>
+ </invoker>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,useRemotingContentType=true"
+ display-name="Servlet transport Connector (true)">
+
+ <attribute name="Configuration">
+ <config>
+ <invoker transport="servlet">
+ <attribute name="serverBindAddress">127.0.0.1</attribute>
+ <attribute name="serverBindPort">8080</attribute>
+ <attribute name="path">servlet-invoker/ServerInvokerServlet/true</attribute>
+ <attribute name="datatype" isParam="true">test</attribute>
+ <attribute name="marshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller</attribute>
+ <attribute name="unmarshaller" isParam="true">org.jboss.test.remoting.transport.servlet.marshal.TestUnMarshaller</attribute>
+ <attribute name="useRemotingContentType" isParam="true">true</attribute>
+ </invoker>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.marshal.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+</server>
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6029 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:48:41 -0400 (Wed, 04 Aug 2010)
New Revision: 6029
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/web.xml
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/web.xml 2010-08-05 01:48:10 UTC (rev 6028)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/web.xml 2010-08-05 01:48:41 UTC (rev 6029)
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml 4903 2009-03-24 07:33:10Z ron.sigal(a)jboss.com $
--->
-<web-app>
- <servlet>
- <servlet-name>ServerInvokerServletDefault</servlet-name>
- <description>The ServerInvokerServlet receives requests via HTTP
- protocol from within a web container and passes it onto the
- ServletServerInvoker for processing.
- </description>
- <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
- <init-param>
- <param-name>locatorUrl</param-name>
- <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/default/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller</param-value>
- <description>The servlet server invoker locator url</description>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>ServerInvokerServletFalse</servlet-name>
- <description>The ServerInvokerServlet receives requests via HTTP
- protocol from within a web container and passes it onto the
- ServletServerInvoker for processing.
- </description>
- <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
- <init-param>
- <param-name>locatorUrl</param-name>
- <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/false/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller&useRemotingContentType=false</param-value>
- <description>The servlet server invoker locator url</description>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>ServerInvokerServletTrue</servlet-name>
- <description>The ServerInvokerServlet receives requests via HTTP
- protocol from within a web container and passes it onto the
- ServletServerInvoker for processing.
- </description>
- <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
- <init-param>
- <param-name>locatorUrl</param-name>
- <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/true/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller&useRemotingContentType=true</param-value>
- <description>The servlet server invoker locator url</description>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>ServerInvokerServletDefault</servlet-name>
- <url-pattern>/ServerInvokerServlet/default/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ServerInvokerServletFalse</servlet-name>
- <url-pattern>/ServerInvokerServlet/false/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ServerInvokerServletTrue</servlet-name>
- <url-pattern>/ServerInvokerServlet/true/*</url-pattern>
- </servlet-mapping>
-</web-app>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- The the JBossRemoting server invoker servlet web.xml descriptor
+$Id: web.xml 4903 2009-03-24 07:33:10Z ron.sigal(a)jboss.com $
+-->
+<web-app>
+ <servlet>
+ <servlet-name>ServerInvokerServletDefault</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/default/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ServerInvokerServletFalse</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/false/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller&useRemotingContentType=false</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ServerInvokerServletTrue</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://127.0.0.1:8080/servlet-invoker/ServerInvokerServlet/true/?datatype=test&marshaller=org.jboss.test.remoting.transport.servlet.marshal.TestMarshaller&unmarshaller=org.jboss.test.remoting.transport.servlet.marshal.TestUnmarshaller&useRemotingContentType=true</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServletDefault</servlet-name>
+ <url-pattern>/ServerInvokerServlet/default/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServletFalse</servlet-name>
+ <url-pattern>/ServerInvokerServlet/false/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServletTrue</servlet-name>
+ <url-pattern>/ServerInvokerServlet/true/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
14 years, 3 months
JBoss Remoting SVN: r6028 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:48:10 -0400 (Wed, 04 Aug 2010)
New Revision: 6028
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ContentTypeTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestInvocationHandler.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestMarshaller.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestUnMarshaller.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ContentTypeTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ContentTypeTestClient.java 2010-08-05 01:46:03 UTC (rev 6027)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ContentTypeTestClient.java 2010-08-05 01:48:10 UTC (rev 6028)
@@ -1,132 +1,132 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.test.remoting.transport.servlet.marshal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-import org.jboss.test.remoting.transport.http.marshal.HttpContentTypeTestCase;
-
-
-/**
- * Unit tests for JBREM-1145.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright August 17, 2009
- * </p>
- */
-public class ContentTypeTestClient extends HttpContentTypeTestCase
-{
- private static Logger log = Logger.getLogger(ContentTypeTestClient.class);
-
-
- protected void validateOrdinaryInvocation(Client client) throws Throwable
- {
- // Local tests
- log.info("TestMarshaller.marshallers.size(): " + TestMarshaller.marshallers.size());
- log.info("TestMarshaller.unmarshallers.size(): " + TestUnMarshaller.unmarshallers.size());
- assertEquals(2, TestMarshaller.marshallers.size());
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, ((TestMarshaller)TestMarshaller.marshallers.get(1)).type);
- assertEquals(2, TestUnMarshaller.unmarshallers.size());
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(1)).type);
-
- // Remote tests
- int serverMarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_MARSHALLERS)).intValue();
- log.info("server side marshallers: " + serverMarshallerCount);
- int serverUnmarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_UNMARSHALLERS)).intValue();
- log.info("server side unmarshallers: " + serverUnmarshallerCount);
- Map metadata = new HashMap();
- metadata.put(TestInvocationHandler.N, Integer.toString(serverMarshallerCount - 1));
- String type = (String) client.invoke(TestInvocationHandler.GET_NTH_MARSHALLER_TYPE, metadata);
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, type);
- metadata.put(TestInvocationHandler.N, Integer.toString(serverUnmarshallerCount - 1));
- type = (String) client.invoke(TestInvocationHandler.GET_NTH_UNMARSHALLER_TYPE, metadata);
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, type);
- client.invoke(TestInvocationHandler.RESET);
- }
-
-
- protected void validateRawStringMessage(Client client) throws Throwable
- {
- // Local tests
- log.info("TestMarshaller.marshallers.size(): " + TestMarshaller.marshallers.size());
- log.info("TestMarshaller.unmarshallers.size(): " + TestUnMarshaller.unmarshallers.size());
- assertEquals(2, TestMarshaller.marshallers.size());
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, ((TestMarshaller)TestMarshaller.marshallers.get(1)).type);
- assertEquals(2, TestUnMarshaller.unmarshallers.size());
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(1)).type);
-
- // Remote tests
- int serverMarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_MARSHALLERS)).intValue();
- log.info("server side marshallers: " + serverMarshallerCount);
- int serverUnmarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_UNMARSHALLERS)).intValue();
- log.info("server side unmarshallers: " + serverUnmarshallerCount);
- assertEquals(4, serverMarshallerCount);
- assertEquals(6, serverUnmarshallerCount);
- Map metadata = new HashMap();
- metadata.put(TestInvocationHandler.N, "3");
- String type = (String) client.invoke(TestInvocationHandler.GET_NTH_MARSHALLER_TYPE, metadata);
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, type);
- metadata.put(TestInvocationHandler.N, "1");
- type = (String) client.invoke(TestInvocationHandler.GET_NTH_UNMARSHALLER_TYPE, metadata);
- assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, type);
- client.invoke(TestInvocationHandler.RESET);
- }
-
- protected String getTransport()
- {
- return "servlet";
- }
-
- protected void setupServer(boolean addUseRemotingContentType, boolean useRemotingContentType) throws Exception
- {
- String path = null;
- String useRemotingContentTypeAttribute = null;
- if (addUseRemotingContentType)
- {
- if (useRemotingContentType)
- {
- path = "servlet-invoker/ServerInvokerServlet/true";
- useRemotingContentTypeAttribute = "&useRemotingContentType=true";
- }
- else
- {
- path = "servlet-invoker/ServerInvokerServlet/false";
- useRemotingContentTypeAttribute = "&useRemotingContentType=false";
- }
- }
- else
- {
- path = "servlet-invoker/ServerInvokerServlet/default";
- useRemotingContentTypeAttribute = "";
- }
-
- String locatorURI = "servlet://127.0.0.1:8080/" + path + "/?datatype=test&marshaller=org.jboss.test.remoting.marshall.TestMarshaller&unmarshaller=org.jboss.test.remoting.marshall.TestUnmarshaller" + useRemotingContentTypeAttribute;
- serverLocator = new InvokerLocator(locatorURI);
- }
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.servlet.marshal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.test.remoting.transport.http.marshal.HttpContentTypeTestCase;
+
+
+/**
+ * Unit tests for JBREM-1145.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright August 17, 2009
+ * </p>
+ */
+public class ContentTypeTestClient extends HttpContentTypeTestCase
+{
+ private static Logger log = Logger.getLogger(ContentTypeTestClient.class);
+
+
+ protected void validateOrdinaryInvocation(Client client) throws Throwable
+ {
+ // Local tests
+ log.info("TestMarshaller.marshallers.size(): " + TestMarshaller.marshallers.size());
+ log.info("TestMarshaller.unmarshallers.size(): " + TestUnMarshaller.unmarshallers.size());
+ assertEquals(2, TestMarshaller.marshallers.size());
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, ((TestMarshaller)TestMarshaller.marshallers.get(1)).type);
+ assertEquals(2, TestUnMarshaller.unmarshallers.size());
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(1)).type);
+
+ // Remote tests
+ int serverMarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_MARSHALLERS)).intValue();
+ log.info("server side marshallers: " + serverMarshallerCount);
+ int serverUnmarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_UNMARSHALLERS)).intValue();
+ log.info("server side unmarshallers: " + serverUnmarshallerCount);
+ Map metadata = new HashMap();
+ metadata.put(TestInvocationHandler.N, Integer.toString(serverMarshallerCount - 1));
+ String type = (String) client.invoke(TestInvocationHandler.GET_NTH_MARSHALLER_TYPE, metadata);
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, type);
+ metadata.put(TestInvocationHandler.N, Integer.toString(serverUnmarshallerCount - 1));
+ type = (String) client.invoke(TestInvocationHandler.GET_NTH_UNMARSHALLER_TYPE, metadata);
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING, type);
+ client.invoke(TestInvocationHandler.RESET);
+ }
+
+
+ protected void validateRawStringMessage(Client client) throws Throwable
+ {
+ // Local tests
+ log.info("TestMarshaller.marshallers.size(): " + TestMarshaller.marshallers.size());
+ log.info("TestMarshaller.unmarshallers.size(): " + TestUnMarshaller.unmarshallers.size());
+ assertEquals(2, TestMarshaller.marshallers.size());
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, ((TestMarshaller)TestMarshaller.marshallers.get(1)).type);
+ assertEquals(2, TestUnMarshaller.unmarshallers.size());
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(1)).type);
+
+ // Remote tests
+ int serverMarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_MARSHALLERS)).intValue();
+ log.info("server side marshallers: " + serverMarshallerCount);
+ int serverUnmarshallerCount = ((Integer) client.invoke(TestInvocationHandler.GET_NUMBER_OF_UNMARSHALLERS)).intValue();
+ log.info("server side unmarshallers: " + serverUnmarshallerCount);
+ assertEquals(4, serverMarshallerCount);
+ assertEquals(6, serverUnmarshallerCount);
+ Map metadata = new HashMap();
+ metadata.put(TestInvocationHandler.N, "3");
+ String type = (String) client.invoke(TestInvocationHandler.GET_NTH_MARSHALLER_TYPE, metadata);
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, type);
+ metadata.put(TestInvocationHandler.N, "1");
+ type = (String) client.invoke(TestInvocationHandler.GET_NTH_UNMARSHALLER_TYPE, metadata);
+ assertEquals(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING, type);
+ client.invoke(TestInvocationHandler.RESET);
+ }
+
+ protected String getTransport()
+ {
+ return "servlet";
+ }
+
+ protected void setupServer(boolean addUseRemotingContentType, boolean useRemotingContentType) throws Exception
+ {
+ String path = null;
+ String useRemotingContentTypeAttribute = null;
+ if (addUseRemotingContentType)
+ {
+ if (useRemotingContentType)
+ {
+ path = "servlet-invoker/ServerInvokerServlet/true";
+ useRemotingContentTypeAttribute = "&useRemotingContentType=true";
+ }
+ else
+ {
+ path = "servlet-invoker/ServerInvokerServlet/false";
+ useRemotingContentTypeAttribute = "&useRemotingContentType=false";
+ }
+ }
+ else
+ {
+ path = "servlet-invoker/ServerInvokerServlet/default";
+ useRemotingContentTypeAttribute = "";
+ }
+
+ String locatorURI = "servlet://127.0.0.1:8080/" + path + "/?datatype=test&marshaller=org.jboss.test.remoting.marshall.TestMarshaller&unmarshaller=org.jboss.test.remoting.marshall.TestUnmarshaller" + useRemotingContentTypeAttribute;
+ serverLocator = new InvokerLocator(locatorURI);
+ }
}
\ No newline at end of file
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ContentTypeTestClient.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestInvocationHandler.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestInvocationHandler.java 2010-08-05 01:46:03 UTC (rev 6027)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestInvocationHandler.java 2010-08-05 01:48:10 UTC (rev 6028)
@@ -1,114 +1,114 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.test.remoting.transport.servlet.marshal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import org.jboss.logging.Logger;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.marshal.MarshalFactory;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-
-
-/**
- * For JBREM-1145.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright August 17, 2009
- * </p>
- */
-public class TestInvocationHandler implements ServerInvocationHandler
-{
- public static String GET_NUMBER_OF_MARSHALLERS = "getNumberOfMarshallers";
- public static String GET_NUMBER_OF_UNMARSHALLERS = "getNumberOfUnmarshallers";
- public static String GET_NTH_MARSHALLER_TYPE = "getNthMarshallerType";
- public static String GET_NTH_UNMARSHALLER_TYPE = "getNthUnarshallerType";
- public static String RESET = "reset";
- public static String N = "n";
-
- private static Logger log = Logger.getLogger(TestInvocationHandler.class);
-
- static
- {
- MarshalFactory.addMarshaller("test", new TestMarshaller(), new TestUnMarshaller());
- }
-
- public void addListener(InvokerCallbackHandler callbackHandler) {}
-
- public Object invoke(final InvocationRequest invocation) throws Throwable
- {
- String s = (String) invocation.getParameter();
- log.info("command: " + s);
- if (RESET.equals(s))
- {
- log.info("doing reset");
- TestMarshaller.marshallers.clear();
- TestUnMarshaller.unmarshallers.clear();
- log.info("TestMarshaller.marshallers: " + TestMarshaller.marshallers);
- log.info("TestUnMarshaller.unmarshallers: " + TestUnMarshaller.unmarshallers);
- }
- else if (GET_NUMBER_OF_MARSHALLERS.equals(s))
- {
- return new Integer(TestMarshaller.marshallers.size());
- }
- else if (GET_NUMBER_OF_UNMARSHALLERS.equals(s))
- {
- return new Integer(TestUnMarshaller.unmarshallers.size());
- }
- else if (GET_NTH_MARSHALLER_TYPE.equals(s))
- {
- int n = Integer.valueOf((String)invocation.getRequestPayload().get(N)).intValue();
- return ((TestMarshaller)TestMarshaller.marshallers.get(n)).type;
- }
- else if (GET_NTH_UNMARSHALLER_TYPE.equals(s))
- {
- int n = Integer.valueOf((String)invocation.getRequestPayload().get(N)).intValue();
- return ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(n)).type;
- }
- else if ("abc".equals(s))
- {
- Map responseMap = invocation.getReturnPayload();
- if (responseMap == null)
- {
- responseMap = new HashMap();
- invocation.setReturnPayload(responseMap);
- }
- responseMap.put(HTTPMetadataConstants.CONTENTTYPE, "text/html");
- return invocation.getParameter();
- }
-
- return invocation.getParameter();
- }
-
- public void removeListener(InvokerCallbackHandler callbackHandler) {}
- public void setMBeanServer(MBeanServer server) {}
- public void setInvoker(ServerInvoker invoker) {}
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.servlet.marshal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.marshal.MarshalFactory;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+
+
+/**
+ * For JBREM-1145.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright August 17, 2009
+ * </p>
+ */
+public class TestInvocationHandler implements ServerInvocationHandler
+{
+ public static String GET_NUMBER_OF_MARSHALLERS = "getNumberOfMarshallers";
+ public static String GET_NUMBER_OF_UNMARSHALLERS = "getNumberOfUnmarshallers";
+ public static String GET_NTH_MARSHALLER_TYPE = "getNthMarshallerType";
+ public static String GET_NTH_UNMARSHALLER_TYPE = "getNthUnarshallerType";
+ public static String RESET = "reset";
+ public static String N = "n";
+
+ private static Logger log = Logger.getLogger(TestInvocationHandler.class);
+
+ static
+ {
+ MarshalFactory.addMarshaller("test", new TestMarshaller(), new TestUnMarshaller());
+ }
+
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ String s = (String) invocation.getParameter();
+ log.info("command: " + s);
+ if (RESET.equals(s))
+ {
+ log.info("doing reset");
+ TestMarshaller.marshallers.clear();
+ TestUnMarshaller.unmarshallers.clear();
+ log.info("TestMarshaller.marshallers: " + TestMarshaller.marshallers);
+ log.info("TestUnMarshaller.unmarshallers: " + TestUnMarshaller.unmarshallers);
+ }
+ else if (GET_NUMBER_OF_MARSHALLERS.equals(s))
+ {
+ return new Integer(TestMarshaller.marshallers.size());
+ }
+ else if (GET_NUMBER_OF_UNMARSHALLERS.equals(s))
+ {
+ return new Integer(TestUnMarshaller.unmarshallers.size());
+ }
+ else if (GET_NTH_MARSHALLER_TYPE.equals(s))
+ {
+ int n = Integer.valueOf((String)invocation.getRequestPayload().get(N)).intValue();
+ return ((TestMarshaller)TestMarshaller.marshallers.get(n)).type;
+ }
+ else if (GET_NTH_UNMARSHALLER_TYPE.equals(s))
+ {
+ int n = Integer.valueOf((String)invocation.getRequestPayload().get(N)).intValue();
+ return ((TestUnMarshaller)TestUnMarshaller.unmarshallers.get(n)).type;
+ }
+ else if ("abc".equals(s))
+ {
+ Map responseMap = invocation.getReturnPayload();
+ if (responseMap == null)
+ {
+ responseMap = new HashMap();
+ invocation.setReturnPayload(responseMap);
+ }
+ responseMap.put(HTTPMetadataConstants.CONTENTTYPE, "text/html");
+ return invocation.getParameter();
+ }
+
+ return invocation.getParameter();
+ }
+
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
}
\ No newline at end of file
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestInvocationHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestMarshaller.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestMarshaller.java 2010-08-05 01:46:03 UTC (rev 6027)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestMarshaller.java 2010-08-05 01:48:10 UTC (rev 6028)
@@ -1,66 +1,66 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.marshal;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-
-import org.jboss.logging.Logger;
-import org.jboss.remoting.marshal.Marshaller;
-import org.jboss.remoting.marshal.http.HTTPMarshaller;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-
-
-/**
- * Part of unit tests for JBREM-1145
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Rev$
- * <p>
- * Copyright Aug 20, 2009
- * </p>
- */
-public class TestMarshaller extends HTTPMarshaller
-{
- private static Logger log = Logger.getLogger(TestMarshaller.class);
-
- public static ArrayList marshallers = new ArrayList();
- private static final long serialVersionUID = -7528137229006015488L;
- public String type;
-
- public void write(Object dataObject, OutputStream output, int version) throws IOException
- {
- log.info(this + " writing " + dataObject);
- type = (dataObject instanceof String) ? HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING : HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING;
- super.write(dataObject, output, version);
- }
-
- public Marshaller cloneMarshaller() throws CloneNotSupportedException
- {
- TestMarshaller marshaller = new TestMarshaller();
- marshallers.add(marshaller);
- log.info("returning " + marshaller);
- return marshaller;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.marshal;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.remoting.marshal.http.HTTPMarshaller;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+
+
+/**
+ * Part of unit tests for JBREM-1145
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Rev$
+ * <p>
+ * Copyright Aug 20, 2009
+ * </p>
+ */
+public class TestMarshaller extends HTTPMarshaller
+{
+ private static Logger log = Logger.getLogger(TestMarshaller.class);
+
+ public static ArrayList marshallers = new ArrayList();
+ private static final long serialVersionUID = -7528137229006015488L;
+ public String type;
+
+ public void write(Object dataObject, OutputStream output, int version) throws IOException
+ {
+ log.info(this + " writing " + dataObject);
+ type = (dataObject instanceof String) ? HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING : HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING;
+ super.write(dataObject, output, version);
+ }
+
+ public Marshaller cloneMarshaller() throws CloneNotSupportedException
+ {
+ TestMarshaller marshaller = new TestMarshaller();
+ marshallers.add(marshaller);
+ log.info("returning " + marshaller);
+ return marshaller;
+ }
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestMarshaller.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestUnMarshaller.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestUnMarshaller.java 2010-08-05 01:46:03 UTC (rev 6027)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestUnMarshaller.java 2010-08-05 01:48:10 UTC (rev 6028)
@@ -1,93 +1,93 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.marshal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.remoting.marshal.UnMarshaller;
-import org.jboss.remoting.marshal.http.HTTPUnMarshaller;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-
-
-/**
- * Part of unit tests for JBREM-1145.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Rev$
- * <p>
- * Copyright Aug 20, 2009
- * </p>
- */
-public class TestUnMarshaller extends HTTPUnMarshaller
-{
- public static ArrayList unmarshallers = new ArrayList();
- private static final long serialVersionUID = -6422222480047910351L;
- public String type;
-
- public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
- {
- Object o = metadata.get(HTTPMetadataConstants.REMOTING_CONTENT_TYPE);
- if (o instanceof List)
- {
- type = (String) ((List) o).get(0);
- }
- else if (o instanceof String)
- {
- type = (String) o;
- }
- else
- {
- o = metadata.get(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_LC);
- log.info("remotingcontenttype: " + o);
- if (o instanceof List)
- {
- type = (String) ((List) o).get(0);
- }
- else if (o instanceof String)
- {
- type = (String) o;
- }
- else
- {
- log.warn(this + " unrecognized remotingContentType: " + o);
- }
- }
-
- o = super.read(inputStream, metadata, version);
- log.info(this + " read " + o);
- return o;
- }
-
- public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
- {
- TestUnMarshaller unmarshaller = new TestUnMarshaller();
- unmarshallers.add(unmarshaller);
- unmarshaller.setClassLoader(this.customClassLoader);
- log.info("returning " + unmarshaller, new Exception());
- return unmarshaller;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.marshal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.remoting.marshal.http.HTTPUnMarshaller;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+
+
+/**
+ * Part of unit tests for JBREM-1145.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Rev$
+ * <p>
+ * Copyright Aug 20, 2009
+ * </p>
+ */
+public class TestUnMarshaller extends HTTPUnMarshaller
+{
+ public static ArrayList unmarshallers = new ArrayList();
+ private static final long serialVersionUID = -6422222480047910351L;
+ public String type;
+
+ public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
+ {
+ Object o = metadata.get(HTTPMetadataConstants.REMOTING_CONTENT_TYPE);
+ if (o instanceof List)
+ {
+ type = (String) ((List) o).get(0);
+ }
+ else if (o instanceof String)
+ {
+ type = (String) o;
+ }
+ else
+ {
+ o = metadata.get(HTTPMetadataConstants.REMOTING_CONTENT_TYPE_LC);
+ log.info("remotingcontenttype: " + o);
+ if (o instanceof List)
+ {
+ type = (String) ((List) o).get(0);
+ }
+ else if (o instanceof String)
+ {
+ type = (String) o;
+ }
+ else
+ {
+ log.warn(this + " unrecognized remotingContentType: " + o);
+ }
+ }
+
+ o = super.read(inputStream, metadata, version);
+ log.info(this + " read " + o);
+ return o;
+ }
+
+ public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
+ {
+ TestUnMarshaller unmarshaller = new TestUnMarshaller();
+ unmarshallers.add(unmarshaller);
+ unmarshaller.setClassLoader(this.customClassLoader);
+ log.info("returning " + unmarshaller, new Exception());
+ return unmarshaller;
+ }
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/TestUnMarshaller.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6027 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:46:03 -0400 (Wed, 04 Aug 2010)
New Revision: 6027
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/remoting-servlet-service.xml
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/remoting-servlet-service.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/remoting-servlet-service.xml 2010-08-05 01:44:59 UTC (rev 6026)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/remoting-servlet-service.xml 2010-08-05 01:46:03 UTC (rev 6027)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=OK"
- display-name="Servlet transport Connector">
-
- <attribute name="InvokerLocator">
- servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=OK
- </attribute>
-
- <attribute name="Configuration">
- <config>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerOK</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=CR"
- display-name="Servlet transport Connector">
-
- <attribute name="InvokerLocator">
- servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=CR
- </attribute>
-
- <attribute name="Configuration">
- <config>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerCR</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=LF"
- display-name="Servlet transport Connector">
-
- <attribute name="InvokerLocator">
- servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=LF
- </attribute>
-
- <attribute name="Configuration">
- <config>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerLF</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
-</server>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=OK"
+ display-name="Servlet transport Connector">
+
+ <attribute name="InvokerLocator">
+ servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=OK
+ </attribute>
+
+ <attribute name="Configuration">
+ <config>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerOK</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=CR"
+ display-name="Servlet transport Connector">
+
+ <attribute name="InvokerLocator">
+ servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=CR
+ </attribute>
+
+ <attribute name="Configuration">
+ <config>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerCR</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,target=tests,version=LF"
+ display-name="Servlet transport Connector">
+
+ <attribute name="InvokerLocator">
+ servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=LF
+ </attribute>
+
+ <attribute name="Configuration">
+ <config>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.contenttype.TestInvocationHandlerLF</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+</server>
14 years, 3 months
JBoss Remoting SVN: r6026 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:44:59 -0400 (Wed, 04 Aug 2010)
New Revision: 6026
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml 2010-08-05 01:40:36 UTC (rev 6025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml 2010-08-05 01:44:59 UTC (rev 6026)
@@ -4,25 +4,65 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml 3291 2008-01-15 05:03:53Z ron.sigal(a)jboss.com $
+$Id: web.xml 4903 2009-03-24 07:33:10Z ron.sigal(a)jboss.com $
-->
<web-app>
<servlet>
- <servlet-name>ServerInvokerServlet</servlet-name>
+ <servlet-name>ServerInvokerServletOK</servlet-name>
<description>The ServerInvokerServlet receives requests via HTTP
protocol from within a web container and passes it onto the
ServletServerInvoker for processing.
</description>
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
- <param-name>invokerName</param-name>
- <param-value>jboss.remoting:host=localhost,port=8080,service=invoker,transport=servlet</param-value>
- <description>The servlet server invoker</description>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=OK</param-value>
+ <description>The servlet server invoker locator url</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
+
+ <servlet>
+ <servlet-name>ServerInvokerServletCR</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=CR</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ServerInvokerServletLF</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?version=LF</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
<servlet-mapping>
- <servlet-name>ServerInvokerServlet</servlet-name>
- <url-pattern>/ServerInvokerServlet/*</url-pattern>
+ <servlet-name>ServerInvokerServletOK</servlet-name>
+ <url-pattern>/ServerInvokerServlet/OK/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServletCR</servlet-name>
+ <url-pattern>/ServerInvokerServlet/CR/*</url-pattern>
</servlet-mapping>
-</web-app>
\ No newline at end of file
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServletLF</servlet-name>
+ <url-pattern>/ServerInvokerServlet/LF/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
14 years, 3 months
JBoss Remoting SVN: r6025 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:40:36 -0400 (Wed, 04 Aug 2010)
New Revision: 6025
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/ServletContentTypeTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerCR.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerLF.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerOK.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/ServletContentTypeTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/ServletContentTypeTestClient.java 2010-08-05 01:37:45 UTC (rev 6024)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/ServletContentTypeTestClient.java 2010-08-05 01:40:36 UTC (rev 6025)
@@ -1,60 +1,60 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
-
-import org.apache.log4j.Logger;
-import org.jboss.test.remoting.transport.http.contenttype.ContentTypeTestCase;
-
-/**
- * Unit tests for JBREM-1101.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version
- * <p>
- * Copyright Sep 1, 2009
- * </p>
- */
-public class ServletContentTypeTestClient extends ContentTypeTestCase
-{
- protected static Logger log = Logger.getLogger(ServletContentTypeTestClient.class);
-
- protected void setupServer(String contentType) throws Exception
- {
- locatorURI = "http://localhost:8080/servlet-invoker/ServerInvokerServlet";
-
- if (CONTENT_TYPE.equals(contentType))
- {
- locatorURI += "/OK";
- }
- if (INVALID_CONTENT_TYPE_CR.equals(contentType))
- {
- locatorURI += "/CR";
- }
- else if (INVALID_CONTENT_TYPE_LF.equals(contentType))
- {
- locatorURI += "/LF";
- }
-
- log.info("setting InvokerLocator to " + locatorURI);
- }
-}
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
+
+import org.apache.log4j.Logger;
+import org.jboss.test.remoting.transport.http.contenttype.ContentTypeTestCase;
+
+/**
+ * Unit tests for JBREM-1101.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Sep 1, 2009
+ * </p>
+ */
+public class ServletContentTypeTestClient extends ContentTypeTestCase
+{
+ protected static Logger log = Logger.getLogger(ServletContentTypeTestClient.class);
+
+ protected void setupServer(String contentType) throws Exception
+ {
+ locatorURI = "http://localhost:8080/servlet-invoker/ServerInvokerServlet";
+
+ if (CONTENT_TYPE.equals(contentType))
+ {
+ locatorURI += "/OK";
+ }
+ if (INVALID_CONTENT_TYPE_CR.equals(contentType))
+ {
+ locatorURI += "/CR";
+ }
+ else if (INVALID_CONTENT_TYPE_LF.equals(contentType))
+ {
+ locatorURI += "/LF";
+ }
+
+ log.info("setting InvokerLocator to " + locatorURI);
+ }
+}
+
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/ServletContentTypeTestClient.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerCR.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerCR.java 2010-08-05 01:37:45 UTC (rev 6024)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerCR.java 2010-08-05 01:40:36 UTC (rev 6025)
@@ -1,64 +1,64 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
-
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-
-/**
- * For JBREM-1101 unit tests.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Rev$
- * <p>
- * Copyright Sep 1, 2009
- * </p>
- */
-public class TestInvocationHandlerCR implements ServerInvocationHandler
-{
- public static String CONTENT_TYPE = "test/testContentType";
- public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
- public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
- public static String REQUEST = "testRequest";
- public static String RESPONSE = "testResponse";
-
- public void addListener(InvokerCallbackHandler callbackHandler) {}
- public Object invoke(final InvocationRequest invocation) throws Throwable
- {
- Map response = invocation.getReturnPayload();
- if (response != null)
- {
- response.put("Content-Type", INVALID_CONTENT_TYPE_CR);
- }
- return RESPONSE;
- }
- public void removeListener(InvokerCallbackHandler callbackHandler) {}
- public void setMBeanServer(MBeanServer server) {}
- public void setInvoker(ServerInvoker invoker) {}
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
+
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+/**
+ * For JBREM-1101 unit tests.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Rev$
+ * <p>
+ * Copyright Sep 1, 2009
+ * </p>
+ */
+public class TestInvocationHandlerCR implements ServerInvocationHandler
+{
+ public static String CONTENT_TYPE = "test/testContentType";
+ public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
+ public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
+ public static String REQUEST = "testRequest";
+ public static String RESPONSE = "testResponse";
+
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ Map response = invocation.getReturnPayload();
+ if (response != null)
+ {
+ response.put("Content-Type", INVALID_CONTENT_TYPE_CR);
+ }
+ return RESPONSE;
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerCR.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerLF.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerLF.java 2010-08-05 01:37:45 UTC (rev 6024)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerLF.java 2010-08-05 01:40:36 UTC (rev 6025)
@@ -1,64 +1,64 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
-
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-
-/**
- * For JBREM-1101 unit tests.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Rev$
- * <p>
- * Copyright Sep 1, 2009
- * </p>
- */
-public class TestInvocationHandlerLF implements ServerInvocationHandler
-{
- public static String CONTENT_TYPE = "test/testContentType";
- public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
- public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
- public static String REQUEST = "testRequest";
- public static String RESPONSE = "testResponse";
-
- public void addListener(InvokerCallbackHandler callbackHandler) {}
- public Object invoke(final InvocationRequest invocation) throws Throwable
- {
- Map response = invocation.getReturnPayload();
- if (response != null)
- {
- response.put("Content-Type", INVALID_CONTENT_TYPE_CR);
- }
- return RESPONSE;
- }
- public void removeListener(InvokerCallbackHandler callbackHandler) {}
- public void setMBeanServer(MBeanServer server) {}
- public void setInvoker(ServerInvoker invoker) {}
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
+
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+/**
+ * For JBREM-1101 unit tests.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Rev$
+ * <p>
+ * Copyright Sep 1, 2009
+ * </p>
+ */
+public class TestInvocationHandlerLF implements ServerInvocationHandler
+{
+ public static String CONTENT_TYPE = "test/testContentType";
+ public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
+ public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
+ public static String REQUEST = "testRequest";
+ public static String RESPONSE = "testResponse";
+
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ Map response = invocation.getReturnPayload();
+ if (response != null)
+ {
+ response.put("Content-Type", INVALID_CONTENT_TYPE_CR);
+ }
+ return RESPONSE;
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerLF.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerOK.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerOK.java 2010-08-05 01:37:45 UTC (rev 6024)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerOK.java 2010-08-05 01:40:36 UTC (rev 6025)
@@ -1,64 +1,64 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
-
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-
-/**
- * For JBREM-1101 unit tests.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Rev$
- * <p>
- * Copyright Sep 1, 2009
- * </p>
- */
-public class TestInvocationHandlerOK implements ServerInvocationHandler
-{
- public static String CONTENT_TYPE = "test/testContentType";
- public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
- public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
- public static String REQUEST = "testRequest";
- public static String RESPONSE = "testResponse";
-
- public void addListener(InvokerCallbackHandler callbackHandler) {}
- public Object invoke(final InvocationRequest invocation) throws Throwable
- {
- Map response = invocation.getReturnPayload();
- if (response != null)
- {
- response.put("Content-Type", CONTENT_TYPE);
- }
- return RESPONSE;
- }
- public void removeListener(InvokerCallbackHandler callbackHandler) {}
- public void setMBeanServer(MBeanServer server) {}
- public void setInvoker(ServerInvoker invoker) {}
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.contenttype;
+
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+/**
+ * For JBREM-1101 unit tests.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Rev$
+ * <p>
+ * Copyright Sep 1, 2009
+ * </p>
+ */
+public class TestInvocationHandlerOK implements ServerInvocationHandler
+{
+ public static String CONTENT_TYPE = "test/testContentType";
+ public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' + "y";
+ public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' + "y";
+ public static String REQUEST = "testRequest";
+ public static String RESPONSE = "testResponse";
+
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ Map response = invocation.getReturnPayload();
+ if (response != null)
+ {
+ response.put("Content-Type", CONTENT_TYPE);
+ }
+ return RESPONSE;
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/contenttype/TestInvocationHandlerOK.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6024 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:37:45 -0400 (Wed, 04 Aug 2010)
New Revision: 6024
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/CallbackTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/TestInvocationHandler.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/CallbackTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/CallbackTestClient.java 2010-08-05 01:36:49 UTC (rev 6023)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/CallbackTestClient.java 2010-08-05 01:37:45 UTC (rev 6024)
@@ -1,141 +1,141 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.callback;
-
-import java.util.HashMap;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.jboss.logging.XLevel;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.callback.Callback;
-import org.jboss.remoting.callback.HandleCallbackException;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.transport.Connector;
-
-
-/**
- * Unit test for pull callbacks over servlet transport: JBREM-1079.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version
- * <p>
- * Copyright Jan 16, 2009
- * </p>
- */
-public class CallbackTestClient extends TestCase
-{
- private static Logger log = Logger.getLogger(CallbackTestClient.class);
-
- private static boolean firstTime = true;
-
- protected String host;
- protected int port;
- protected String locatorURI;
- protected InvokerLocator serverLocator;
- protected Connector connector;
- protected TestInvocationHandler invocationHandler;
-
-
- public void setUp() throws Exception
- {
- if (firstTime)
- {
- firstTime = false;
- Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
- Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
- String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
- PatternLayout layout = new PatternLayout(pattern);
- ConsoleAppender consoleAppender = new ConsoleAppender(layout);
- Logger.getRootLogger().addAppender(consoleAppender);
- }
- }
-
-
- public void tearDown()
- {
- }
-
-
- public void testMethod() throws Throwable
- {
- log.info("entering " + getName());
-
- // Create client.
- locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
- locatorURI += "/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking";
- InvokerLocator clientLocator = new InvokerLocator(locatorURI);
- HashMap clientConfig = new HashMap();
- Client client = new Client(clientLocator, clientConfig);
- client.connect();
- log.info("client is connected");
-
- // Test connection.
- log.info("result: " + client.invoke("abc"));
- assertEquals(null, client.invoke("abc"));
- log.info("connection is good");
-
- // Install client side callback handlers.
- TestCallbackHandler callbackHandler1 = new TestCallbackHandler();
- TestCallbackHandler callbackHandler2 = new TestCallbackHandler();
- HashMap metadata = new HashMap();
- client.addListener(callbackHandler1, metadata);
- client.addListener(callbackHandler2, metadata);
-
- // Request callbacks.
- int COUNT = 100;
- for (int i = 0; i < COUNT; i++)
- {
- client.invoke("callback");
- }
-
- log.info("sleeping for 2000 ms");
- Thread.sleep(2000);
- log.info("waking up");
-
- // Verify all callbacks arrived.
- assertEquals(COUNT, callbackHandler1.counter);
- assertEquals(COUNT, callbackHandler1.counter);
-
- client.removeListener(callbackHandler1);
- client.removeListener(callbackHandler2);
- client.disconnect();
- log.info(getName() + " PASSES");
- }
-
-
- static class TestCallbackHandler implements InvokerCallbackHandler
- {
- public int counter;
-
- public void handleCallback(Callback callback) throws HandleCallbackException
- {
- counter++;
- }
- }
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.callback;
+
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.jboss.logging.XLevel;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.HandleCallbackException;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+
+
+/**
+ * Unit test for pull callbacks over servlet transport: JBREM-1079.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Jan 16, 2009
+ * </p>
+ */
+public class CallbackTestClient extends TestCase
+{
+ private static Logger log = Logger.getLogger(CallbackTestClient.class);
+
+ private static boolean firstTime = true;
+
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testMethod() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Create client.
+ locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
+ locatorURI += "/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking";
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connection.
+ log.info("result: " + client.invoke("abc"));
+ assertEquals(null, client.invoke("abc"));
+ log.info("connection is good");
+
+ // Install client side callback handlers.
+ TestCallbackHandler callbackHandler1 = new TestCallbackHandler();
+ TestCallbackHandler callbackHandler2 = new TestCallbackHandler();
+ HashMap metadata = new HashMap();
+ client.addListener(callbackHandler1, metadata);
+ client.addListener(callbackHandler2, metadata);
+
+ // Request callbacks.
+ int COUNT = 100;
+ for (int i = 0; i < COUNT; i++)
+ {
+ client.invoke("callback");
+ }
+
+ log.info("sleeping for 2000 ms");
+ Thread.sleep(2000);
+ log.info("waking up");
+
+ // Verify all callbacks arrived.
+ assertEquals(COUNT, callbackHandler1.counter);
+ assertEquals(COUNT, callbackHandler1.counter);
+
+ client.removeListener(callbackHandler1);
+ client.removeListener(callbackHandler2);
+ client.disconnect();
+ log.info(getName() + " PASSES");
+ }
+
+
+ static class TestCallbackHandler implements InvokerCallbackHandler
+ {
+ public int counter;
+
+ public void handleCallback(Callback callback) throws HandleCallbackException
+ {
+ counter++;
+ }
+ }
}
\ No newline at end of file
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/CallbackTestClient.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/TestInvocationHandler.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/TestInvocationHandler.java 2010-08-05 01:36:49 UTC (rev 6023)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/TestInvocationHandler.java 2010-08-05 01:37:45 UTC (rev 6024)
@@ -1,75 +1,75 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.callback;
-
-import java.util.HashSet;
-import java.util.Iterator;
-
-import javax.management.MBeanServer;
-
-import org.apache.log4j.Logger;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.Callback;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-
-public class TestInvocationHandler implements ServerInvocationHandler
-{
- private static Logger log = Logger.getLogger(TestInvocationHandler.class);
- private HashSet listeners = new HashSet();
-
- public void addListener(InvokerCallbackHandler callbackHandler)
- {
- listeners.add(callbackHandler);
- log.info("added " + callbackHandler);
- }
-
- public Object invoke(InvocationRequest invocation) throws Throwable
- {
- log.debug("invocation: " + invocation.getParameter());
- Iterator it = listeners.iterator();
- Callback callback = new Callback("callback");
- while (it.hasNext())
- {
- InvokerCallbackHandler handler = (InvokerCallbackHandler) it.next();
- handler.handleCallback(callback);
- log.debug("sent callback to " + handler);
- }
- return null;
- }
-
- public void removeListener(InvokerCallbackHandler callbackHandler)
- {
- listeners.remove(callbackHandler);
- log.info("removed " + callbackHandler);
- }
-
- public void setInvoker(ServerInvoker invoker)
- {
- }
-
- public void setMBeanServer(MBeanServer server)
- {
- }
-}
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.remoting.transport.servlet.callback;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javax.management.MBeanServer;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+public class TestInvocationHandler implements ServerInvocationHandler
+{
+ private static Logger log = Logger.getLogger(TestInvocationHandler.class);
+ private HashSet listeners = new HashSet();
+
+ public void addListener(InvokerCallbackHandler callbackHandler)
+ {
+ listeners.add(callbackHandler);
+ log.info("added " + callbackHandler);
+ }
+
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ log.debug("invocation: " + invocation.getParameter());
+ Iterator it = listeners.iterator();
+ Callback callback = new Callback("callback");
+ while (it.hasNext())
+ {
+ InvokerCallbackHandler handler = (InvokerCallbackHandler) it.next();
+ handler.handleCallback(callback);
+ log.debug("sent callback to " + handler);
+ }
+ return null;
+ }
+
+ public void removeListener(InvokerCallbackHandler callbackHandler)
+ {
+ listeners.remove(callbackHandler);
+ log.info("removed " + callbackHandler);
+ }
+
+ public void setInvoker(ServerInvoker invoker)
+ {
+ }
+
+ public void setMBeanServer(MBeanServer server)
+ {
+ }
+}
+
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/TestInvocationHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6023 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:36:49 -0400 (Wed, 04 Aug 2010)
New Revision: 6023
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ResponseCodeTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ServletInvokerNoExceptionTestClient.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ResponseCodeTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ResponseCodeTestClient.java 2010-08-05 01:35:57 UTC (rev 6022)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ResponseCodeTestClient.java 2010-08-05 01:36:49 UTC (rev 6023)
@@ -1,51 +1,51 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.test.remoting.transport.servlet;
-
-import org.jboss.test.remoting.transport.http.headers.ResponseCodeTestCase;
-
-/**
- * Unit test for JBREM-728.
- *
- * @author <a href="mailto:ron.sigal@jboss.com">Ron Sigal</a>
- * <p>
- * Copyright (c) November 24, 2007
- * </p>
- *
- */
-public class ResponseCodeTestClient extends ResponseCodeTestCase
-{
- protected String getTransport()
- {
- return "servlet";
- }
-
- protected void setupServer()
- {
- locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
- port = 8080;
- }
-
- protected void shutdownServer()
- {
- }
-}
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.servlet;
+
+import org.jboss.test.remoting.transport.http.headers.ResponseCodeTestCase;
+
+/**
+ * Unit test for JBREM-728.
+ *
+ * @author <a href="mailto:ron.sigal@jboss.com">Ron Sigal</a>
+ * <p>
+ * Copyright (c) November 24, 2007
+ * </p>
+ *
+ */
+public class ResponseCodeTestClient extends ResponseCodeTestCase
+{
+ protected String getTransport()
+ {
+ return "servlet";
+ }
+
+ protected void setupServer()
+ {
+ locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
+ port = 8080;
+ }
+
+ protected void shutdownServer()
+ {
+ }
+}
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ResponseCodeTestClient.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ServletInvokerNoExceptionTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ServletInvokerNoExceptionTestClient.java 2010-08-05 01:35:57 UTC (rev 6022)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ServletInvokerNoExceptionTestClient.java 2010-08-05 01:36:49 UTC (rev 6023)
@@ -1,59 +1,59 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.test.remoting.transport.servlet;
-
-import org.jboss.test.remoting.transport.web.WebInvokerTestClient;
-
-/**
- * This test is identical to ServletInvokerTestClient except that it, in the case
- * when an exception is thrown on the server, ServletServerInvoker is explicitly instructed
- * not to return the actual exception.
- *
- * See JBREM-813 and JBREM-675.
- *
- * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
- * @author <a href="mailto:ron.sigal@jboss.com">Ron Sigal</a>
- */
-public class ServletInvokerNoExceptionTestClient extends WebInvokerTestClient
-{
- public static final Integer ERROR_RESPONSE_CODE = new Integer(500);
-
- public String getLocatorURI()
- {
- return "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
- }
-
- public static void main(String[] args)
- {
- ServletInvokerNoExceptionTestClient client = new ServletInvokerNoExceptionTestClient();
- try
- {
- client.testPostInvocation();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.servlet;
+
+import org.jboss.test.remoting.transport.web.WebInvokerTestClient;
+
+/**
+ * This test is identical to ServletInvokerTestClient except that it, in the case
+ * when an exception is thrown on the server, ServletServerInvoker is explicitly instructed
+ * not to return the actual exception.
+ *
+ * See JBREM-813 and JBREM-675.
+ *
+ * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+ * @author <a href="mailto:ron.sigal@jboss.com">Ron Sigal</a>
+ */
+public class ServletInvokerNoExceptionTestClient extends WebInvokerTestClient
+{
+ public static final Integer ERROR_RESPONSE_CODE = new Integer(500);
+
+ public String getLocatorURI()
+ {
+ return "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
+ }
+
+ public static void main(String[] args)
+ {
+ ServletInvokerNoExceptionTestClient client = new ServletInvokerNoExceptionTestClient();
+ try
+ {
+ client.testPostInvocation();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
}
\ No newline at end of file
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ServletInvokerNoExceptionTestClient.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6022 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:35:57 -0400 (Wed, 04 Aug 2010)
New Revision: 6022
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory/SSLSocketFactoryClassNameTestCase.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory/SSLSocketFactoryClassNameTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory/SSLSocketFactoryClassNameTestCase.java 2010-08-05 01:35:20 UTC (rev 6021)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory/SSLSocketFactoryClassNameTestCase.java 2010-08-05 01:35:57 UTC (rev 6022)
@@ -1,44 +1,44 @@
-
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.test.remoting.transport.rmi.ssl.socketfactory;
-
-import org.jboss.test.remoting.socketfactory.SSLSocketFactoryClassNameTestRoot;
-
-
-/**
- * Unit test for JBREM-1014.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright Jul 18, 2008
- * </p>
- */
-public class SSLSocketFactoryClassNameTestCase extends SSLSocketFactoryClassNameTestRoot
-{
- protected String getTransport()
- {
- return "sslrmi";
- }
-}
-
+
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.rmi.ssl.socketfactory;
+
+import org.jboss.test.remoting.socketfactory.SSLSocketFactoryClassNameTestRoot;
+
+
+/**
+ * Unit test for JBREM-1014.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Jul 18, 2008
+ * </p>
+ */
+public class SSLSocketFactoryClassNameTestCase extends SSLSocketFactoryClassNameTestRoot
+{
+ protected String getTransport()
+ {
+ return "sslrmi";
+ }
+}
+
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/ssl/socketfactory/SSLSocketFactoryClassNameTestCase.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months
JBoss Remoting SVN: r6021 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-04 21:35:20 -0400 (Wed, 04 Aug 2010)
New Revision: 6021
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory/SocketFactoryClassNameTestCase.java
Log:
JBREM-1241: Added svn:eol-style subversion property.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory/SocketFactoryClassNameTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory/SocketFactoryClassNameTestCase.java 2010-08-05 01:34:49 UTC (rev 6020)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory/SocketFactoryClassNameTestCase.java 2010-08-05 01:35:20 UTC (rev 6021)
@@ -1,22 +1,22 @@
-package org.jboss.test.remoting.transport.rmi.socketfactory;
-
-import org.jboss.test.remoting.socketfactory.SocketFactoryClassNameTestRoot;
-
-
-/**
- *
- * Unit test for JBREM-1014.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright Jul 18, 2008
- * </p>
- */
-public class SocketFactoryClassNameTestCase extends SocketFactoryClassNameTestRoot
-{
- protected String getTransport()
- {
- return "rmi";
- }
+package org.jboss.test.remoting.transport.rmi.socketfactory;
+
+import org.jboss.test.remoting.socketfactory.SocketFactoryClassNameTestRoot;
+
+
+/**
+ *
+ * Unit test for JBREM-1014.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Jul 18, 2008
+ * </p>
+ */
+public class SocketFactoryClassNameTestCase extends SocketFactoryClassNameTestRoot
+{
+ protected String getTransport()
+ {
+ return "rmi";
+ }
}
\ No newline at end of file
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/rmi/socketfactory/SocketFactoryClassNameTestCase.java
___________________________________________________________________
Name: svn:eol-style
+ native
14 years, 3 months