summaryrefslogtreecommitdiff
path: root/examples/gnu/classpath
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-28 14:58:47 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-28 14:58:47 +0000
commitb4d90cf568ce1999de5f84004dbbe888b9627aad (patch)
treebcefe369d2d037f5f09699087832bbcfb58d6738 /examples/gnu/classpath
parent793f8b61e8f3e6dd73460f2f9a3d14ced54a44c5 (diff)
downloadclasspath-b4d90cf568ce1999de5f84004dbbe888b9627aad.tar.gz
2005-10-28 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHolder.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHolder.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java: Deleted. * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHolder.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHolder.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHolder.java: New files. * examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java: References updated.
Diffstat (limited to 'examples/gnu/classpath')
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java2
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/DemoServer.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java)10
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java)32
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java)16
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java40
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java56
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java)9
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java)19
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHolder.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHolder.java)14
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java)9
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java)17
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHolder.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHolder.java)14
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java)15
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java)44
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHolder.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java)32
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java)11
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java)18
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java)31
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java (renamed from examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java)37
19 files changed, 234 insertions, 192 deletions
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
index 99046a8da..f53609cf7 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
@@ -72,7 +72,7 @@ public class Demo
{
public void run()
{
- comServer.start_server(args);
+ DemoServer.start_server(args);
}
}.start();
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/DemoServer.java
index d4e0c56b2..d7b1a7771 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/DemoServer.java
@@ -1,4 +1,4 @@
-/* comServer.java --
+/* DemoServer.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication;
-import gnu.classpath.examples.CORBA.SimpleCommunication.communication.comServant;
+import gnu.classpath.examples.CORBA.SimpleCommunication.communication.DemoServant;
import org.omg.CORBA.ORB;
@@ -47,7 +47,7 @@ import java.io.PrintStream;
/**
* This is the server class that handles the client requests,
- * delegating the functionality to the {@link comServant}.
+ * delegating the functionality to the {@link DemoServant}.
*
* When starting, the server writes the IOR.txt file into the current
* folder. With the information, stored in this file, the server
@@ -62,7 +62,7 @@ import java.io.PrintStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class comServer
+public class DemoServer
{
public static void main(String[] args)
@@ -78,7 +78,7 @@ public class comServer
final ORB orb = org.omg.CORBA.ORB.init(args, null);
// Create the servant and register it with the ORB.
- comServant tester = new comServant();
+ DemoServant tester = new DemoServant();
orb.connect(tester);
// Storing the IOR reference.
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java
index 08d1759d8..c07b77b17 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java
@@ -1,4 +1,4 @@
-/* comServant.java --
+/* DemoServant.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,6 @@ import org.omg.CORBA.DoubleHolder;
import org.omg.CORBA.ShortHolder;
import org.omg.CORBA.StringHolder;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.PrintStream;
-
/**
* This class handles the actual server functionality in this test
* application. When the client calls the remote method, this
@@ -62,8 +56,8 @@ import java.io.PrintStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class comServant
- extends _comTesterImplBase
+public class DemoServant
+ extends _DemoTesterImplBase
{
/**
* The field, that can be set and checked by remote client.
@@ -129,7 +123,7 @@ public class comServant
/**
* Accept and return the structures.
*/
- public returnThis passStructure(passThis in_structure)
+ public StructureToReturn passStructure(StructureToPass in_structure)
{
System.out.println("SERVER: ***** Transferring structures");
System.out.println("SERVER: Received " + in_structure.a + ":" +
@@ -137,7 +131,7 @@ public class comServant
);
// Create and send back the returned structure.
- returnThis r = new returnThis();
+ StructureToReturn r = new StructureToReturn();
r.c = in_structure.a + in_structure.b;
r.n = 555;
r.arra = new int[] { 11, 22, 33 };
@@ -147,14 +141,14 @@ public class comServant
/**
* Pass and return the tree structure
*/
- public void passTree(nodeHolder tree)
+ public void passTree(TreeNodeHolder tree)
{
System.out.println("SERVER: ***** Transferring tree");
StringBuffer b = new StringBuffer();
// This both creates the tree string representation
- // and changes the node names.
+ // and changes the TreeNode names.
getImage(b, tree.value);
System.out.println("SERVER: The tree was: " + b + ", returning changed.");
}
@@ -190,11 +184,11 @@ public class comServant
*
* @param parameter specifies which exception will be thrown.
*
- * @throws ourUserException for the non negative parameter.
+ * @throws WeThrowThisException for the non negative parameter.
* @throws BAD_OPERATION for the negative parameter.
*/
public void throwException(int parameter)
- throws ourUserException
+ throws WeThrowThisException
{
System.out.println("SERVER: ***** Testing exceptions");
if (parameter > 0)
@@ -202,7 +196,7 @@ public class comServant
System.out.println("SERVER: Throwing the user exception, " +
"specific field = "+parameter
);
- throw new ourUserException(parameter);
+ throw new WeThrowThisException(parameter);
}
else
{
@@ -215,12 +209,12 @@ public class comServant
/**
* Visit all tree nodes, getting the string representation
- * and adding '++' to the node names.
+ * and adding '++' to the TreeNode names.
*
* @param b the buffer to collect the string representation.
- * @param n the rott tree node.
+ * @param n the rott tree TreeNode.
*/
- private void getImage(StringBuffer b, node n)
+ private void getImage(StringBuffer b, TreeNode n)
{
b.append(n.name);
n.name = n.name + "++";
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester.java
index 495807eb9..f3766f325 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester.java
@@ -1,4 +1,4 @@
-/* comTester.java --
+/* DemoTester.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import org.omg.CORBA.StringHolder;
/**
* The interface of our remote object. Some IDL compiles split it
- * into "comTester" and "comTesterOperations", but we do not see
+ * into "DemoTester" and "comTesterOperations", but we do not see
* much sense in doing this here.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public interface comTester
+public interface DemoTester
{
/**
* Passes wide (UTF-16) string and narrow (ISO8859_1) string.
@@ -77,14 +77,14 @@ public interface comTester
/**
* Passes and returns the structures.
*/
- returnThis passStructure(passThis in_structure);
+ StructureToReturn passStructure(StructureToPass in_structure);
/**
* Pass and return the tree structure
*
- * @param tree the root node of the tree.
+ * @param tree the root TreeNode of the tree.
*/
- void passTree(nodeHolder tree);
+ void passTree(TreeNodeHolder tree);
/**
* Just prints the "Hello" message.
@@ -102,10 +102,10 @@ public interface comTester
void theField(int newTheField);
/**
- * Throws either 'ourUserException' with the 'ourField' field
+ * Throws either 'WeThrowThisException' with the 'ourField' field
* initialised to the passed positive value
* or system exception (if the parameter is zero or negative).
*/
void throwException(int parameter)
- throws ourUserException;
+ throws WeThrowThisException;
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
index 5cf372b26..732b00cfb 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
@@ -57,7 +57,7 @@ import java.io.IOException;
* where the program has been started.
*
* The IOR.txt file is written by the server
- * {@link gnu.classpath.examples.CORBA.SimpleCommunication.comServer}.
+ * {@link gnu.classpath.examples.CORBA.SimpleCommunication.DemoServer}.
* The server should be reachable over Internet, unless blocked by
* security tools.
*
@@ -83,7 +83,7 @@ public class DirectTest
/**
* The invocation target.
*/
- comTester object;
+ DemoTester object;
/**
* Get the object reference.
@@ -102,7 +102,7 @@ public class DirectTest
String ior = new String(c);
DirectTest we = new DirectTest();
- we.object = (comTester) orb.string_to_object(ior);
+ we.object = (DemoTester) orb.string_to_object(ior);
we.Demo();
orb.shutdown(false);
}
@@ -199,11 +199,11 @@ public class DirectTest
{
System.out.println("***** Pass structure");
- passThis arg = new passThis();
+ StructureToPass arg = new StructureToPass();
arg.a = "A";
arg.b = "B";
- returnThis r = object.passStructure(arg);
+ StructureToReturn r = object.passStructure(arg);
System.out.println(" Fields of the returned structure:");
@@ -257,15 +257,15 @@ public class DirectTest
// +-- bb
System.out.println("***** Pass and return the tree.");
- node n = nod("Root");
+ TreeNode n = nod("Root");
- n.children = new node[] { nod("a"), nod("b") };
- n.children [ 1 ].children = new node[] { nod("ba"), nod("bb") };
- n.children [ 1 ].children [ 0 ].children = new node[] { nod("bac") };
+ n.children = new TreeNode[] { nod("a"), nod("b") };
+ n.children [ 1 ].children = new TreeNode[] { nod("ba"), nod("bb") };
+ n.children [ 1 ].children [ 0 ].children = new TreeNode[] { nod("bac") };
- nodeHolder nh = new nodeHolder(n);
+ TreeNodeHolder nh = new TreeNodeHolder(n);
- // The server should add '++' to each node name.
+ // The server should add '++' to each TreeNode name.
object.passTree(nh);
// Convert the returned tree to some strig representation.
@@ -288,7 +288,7 @@ public class DirectTest
object.throwException(123);
throw new InternalError();
}
- catch (ourUserException uex)
+ catch (WeThrowThisException uex)
{
System.out.println(" The user exception with field " + uex.ourField +
", has been thrown on remote side."
@@ -312,9 +312,9 @@ public class DirectTest
/**
* Get the string representation of the passed tree.
* @param b the string buffer to accumulate the representation.
- * @param n the tree (root node).
+ * @param n the tree (root TreeNode).
*/
- private void getImage(StringBuffer b, node n)
+ private void getImage(StringBuffer b, TreeNode n)
{
b.append(n.name);
b.append(": (");
@@ -328,15 +328,15 @@ public class DirectTest
}
/**
- * Create a node with the given header.
+ * Create a TreeNode with the given header.
*
- * @param hdr the node header.
- * @return the created node.
+ * @param hdr the TreeNode header.
+ * @return the created TreeNode.
*/
- private node nod(String hdr)
+ private TreeNode nod(String hdr)
{
- node n = new node();
- n.children = new node[ 0 ];
+ TreeNode n = new TreeNode();
+ n.children = new TreeNode[ 0 ];
n.name = hdr;
return n;
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java
index 977fb4282..9c908e520 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/RequestTest.java
@@ -1,3 +1,39 @@
+/* RequestTest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+ GNU Classpath is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU Classpath 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU Classpath; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
@@ -7,14 +43,10 @@ import java.io.FileReader;
import java.io.IOException;
import org.omg.CORBA.BAD_OPERATION;
-import org.omg.CORBA.ByteHolder;
-import org.omg.CORBA.DoubleHolder;
import org.omg.CORBA.ExceptionList;
import org.omg.CORBA.NVList;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
-import org.omg.CORBA.ShortHolder;
-import org.omg.CORBA.StringHolder;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.UnknownUserException;
@@ -25,7 +57,7 @@ import org.omg.CORBA.UnknownUserException;
* where the program has been started.
*
* The IOR.txt file is written by the server
- * {@link gnu.classpath.examples.CORBA.SimpleCommunication.comServer}.
+ * {@link gnu.classpath.examples.CORBA.SimpleCommunication.DemoServer}.
* The server should be reachable over Internet, unless blocked by
* security tools.
*
@@ -106,7 +138,6 @@ public class RequestTest
throw new InternalError();
}
testSystemException();
- testUserException();
testWideNarrowStrings();
}
@@ -135,13 +166,6 @@ public class RequestTest
Request r =
object._create_request(null, "passSimple", orb.create_list(0), null);
- ByteHolder a_byte = new ByteHolder((byte) 0);
- ShortHolder a_short = new ShortHolder((short) 3);
- StringHolder a_string = new StringHolder("[string 4]");
-
- // This is an 'out' parameter; the value must not be passed to servant.
- DoubleHolder a_double = new DoubleHolder(56.789);
-
r.add_inout_arg().insert_octet((byte) 0);
r.add_in_arg().insert_long(2);
r.add_inout_arg().insert_short((short) 3);
@@ -188,7 +212,7 @@ public class RequestTest
try
{
ExceptionList exList = orb.create_exception_list();
- exList.add(ourUserExceptionHelper.type());
+ exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1),
@@ -217,7 +241,7 @@ public class RequestTest
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
- exList.add(ourUserExceptionHelper.type());
+ exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
@@ -228,7 +252,7 @@ public class RequestTest
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
- ourUserException our_exception = ourUserExceptionHelper.extract(uku.except);
+ WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java
index 2a680b91b..d17e91fba 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java
@@ -1,4 +1,4 @@
-/* passThis.java --
+/* StructureToPass.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,9 +44,14 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class passThis
+public class StructureToPass
implements org.omg.CORBA.portable.IDLEntity
{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
/**
* The first string, stored in this structure (defined as
* "narrow string").
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java
index 6b9f4ce01..c41ebe237 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java
@@ -1,4 +1,4 @@
-/* passThisHelper.java --
+/* StructureToPassHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
-import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
@@ -46,17 +45,17 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
- * The helper operations for the {@link passThis}.
+ * The helper operations for the {@link StructureToPass}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public abstract class passThisHelper
+public abstract class StructureToPassHelper
{
/**
- * The repository ID of the {@link passThis}.
+ * The repository ID of the {@link StructureToPass}.
*/
private static String id =
- "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis:1.0";
+ "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass:1.0";
/**
* Get the repository id.
@@ -69,9 +68,9 @@ public abstract class passThisHelper
/**
* Read the structure from the CDR stram.
*/
- public static passThis read(InputStream istream)
+ public static StructureToPass read(InputStream istream)
{
- passThis value = new passThis();
+ StructureToPass value = new StructureToPass();
value.a = istream.read_string();
value.b = istream.read_wstring();
return value;
@@ -88,13 +87,13 @@ public abstract class passThisHelper
members [ 0 ] = new StructMember("a", member, null);
member = ORB.init().create_string_tc(0);
members [ 1 ] = new StructMember("b", member, null);
- return ORB.init().create_struct_tc(passThisHelper.id(), "passThis", members);
+ return ORB.init().create_struct_tc(StructureToPassHelper.id(), "StructureToPass", members);
}
/**
* Write the structure into the CDR stream.
*/
- public static void write(OutputStream ostream, passThis value)
+ public static void write(OutputStream ostream, StructureToPass value)
{
ostream.write_string(value.a);
ostream.write_wstring(value.b);
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHolder.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHolder.java
index 0d93cbaf6..5bbe6908e 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHolder.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHolder.java
@@ -6,32 +6,32 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
-public final class passThisHolder
+public final class StructureToPassHolder
implements Streamable
{
- public passThis value;
+ public StructureToPass value;
- public passThisHolder()
+ public StructureToPassHolder()
{
}
- public passThisHolder(passThis initialValue)
+ public StructureToPassHolder(StructureToPass initialValue)
{
value = initialValue;
}
public void _read(InputStream i)
{
- value = passThisHelper.read(i);
+ value = StructureToPassHelper.read(i);
}
public org.omg.CORBA.TypeCode _type()
{
- return passThisHelper.type();
+ return StructureToPassHelper.type();
}
public void _write(OutputStream o)
{
- passThisHelper.write(o, value);
+ StructureToPassHelper.write(o, value);
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java
index b7c3923ce..5dc843ae8 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java
@@ -1,4 +1,4 @@
-/* returnThis.java --
+/* StructureToReturn.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,9 +44,14 @@ import org.omg.CORBA.portable.IDLEntity;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class returnThis
+public class StructureToReturn
implements IDLEntity
{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
/**
* The string field.
*/
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java
index 79838d75c..42fb7a574 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java
@@ -1,4 +1,4 @@
-/* returnThisHelper.java --
+/* StructureToReturnHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,6 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
-import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
@@ -46,17 +45,17 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
- * This class defines the helper operations for {@link returnThis}.
+ * This class defines the helper operations for {@link StructureToReturn}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public abstract class returnThisHelper
+public abstract class StructureToReturnHelper
{
/**
* The repository id.
*/
private static String _id =
- "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis:1.0";
+ "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn:1.0";
/**
* Return the repository id.
@@ -69,9 +68,9 @@ public abstract class returnThisHelper
/**
* Read the structure from the CDR stream.
*/
- public static returnThis read(InputStream istream)
+ public static StructureToReturn read(InputStream istream)
{
- returnThis value = new returnThis();
+ StructureToReturn value = new StructureToReturn();
value.n = istream.read_long();
value.c = istream.read_wstring();
value.arra = new int[ 3 ];
@@ -95,7 +94,7 @@ public abstract class returnThisHelper
member = ORB.init().get_primitive_tc(TCKind.tk_long);
member = ORB.init().create_array_tc(3, member);
members [ 2 ] = new StructMember("arra", member, null);
- return ORB.init().create_struct_tc(returnThisHelper.id(), "returnThis",
+ return ORB.init().create_struct_tc(StructureToReturnHelper.id(), "StructureToReturn",
members
);
}
@@ -103,7 +102,7 @@ public abstract class returnThisHelper
/**
* Write the structure to the CDR stream.
*/
- public static void write(OutputStream ostream, returnThis value)
+ public static void write(OutputStream ostream, StructureToReturn value)
{
ostream.write_long(value.n);
ostream.write_wstring(value.c);
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHolder.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHolder.java
index 294e37ac3..c70f9cfcc 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHolder.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHolder.java
@@ -10,25 +10,25 @@ import org.omg.CORBA.portable.Streamable;
/**
* The holder for the structure, returned from the server.
*/
-public final class returnThisHolder
+public final class StructureToReturnHolder
implements Streamable
{
/**
* The enclosed structure.
*/
- public returnThis value = null;
+ public StructureToReturn value = null;
/**
* Create the empty holder.
*/
- public returnThisHolder()
+ public StructureToReturnHolder()
{
}
/**
* Crate the holder with the defined initial value.
*/
- public returnThisHolder(returnThis initialValue)
+ public StructureToReturnHolder(StructureToReturn initialValue)
{
value = initialValue;
}
@@ -38,7 +38,7 @@ public final class returnThisHolder
*/
public void _read(InputStream in)
{
- value = returnThisHelper.read(in);
+ value = StructureToReturnHelper.read(in);
}
/**
@@ -46,7 +46,7 @@ public final class returnThisHolder
*/
public TypeCode _type()
{
- return returnThisHelper.type();
+ return StructureToReturnHelper.type();
}
/**
@@ -55,6 +55,6 @@ public final class returnThisHolder
*/
public void _write(OutputStream out)
{
- returnThisHelper.write(out, value);
+ StructureToReturnHelper.write(out, value);
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java
index 527d02d06..b267f39ea 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java
@@ -1,4 +1,4 @@
-/* node.java --
+/* TreeNode.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,12 +44,17 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
-public class node
+public class TreeNode
implements org.omg.CORBA.portable.IDLEntity
{
- /** The node name */
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
+ /** The TreeNode name */
public String name = null;
- /** The node children. */
- public node[] children = null;
+ /** The TreeNode children. */
+ public TreeNode[] children = null;
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java
index 8d4121cda..f111d0eac 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java
@@ -1,4 +1,4 @@
-/* nodeHelper.java --
+/* TreeNodeHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,13 +51,13 @@ import org.omg.CORBA.portable.OutputStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public abstract class nodeHelper
+public abstract class TreeNodeHelper
{
/**
- * The node repository id, used to identify the structure.
+ * The TreeNode repository id, used to identify the structure.
*/
private static String _id =
- "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/node:1.0";
+ "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode:1.0";
/**
* Caches the typecode, allowing to compute it only once.
@@ -66,21 +66,21 @@ public abstract class nodeHelper
/**
* This is used to handle the recursive object references in
- * CORBA - supported way. The tree node definition is recursive,
- * as the node contains the sequence of the nodes as its field.
+ * CORBA - supported way. The tree TreeNode definition is recursive,
+ * as the TreeNode contains the sequence of the nodes as its field.
*/
private static boolean active;
/**
- * Extract the tree node from the unversal CORBA wrapper, Any.
+ * Extract the tree TreeNode from the unversal CORBA wrapper, Any.
*/
- public static node extract(Any a)
+ public static TreeNode extract(Any a)
{
return read(a.create_input_stream());
}
/**
- * Get the node string identifer.
+ * Get the TreeNode string identifer.
*/
public static String id()
{
@@ -88,9 +88,9 @@ public abstract class nodeHelper
}
/**
- * Insert the node into the universal CORBA wrapper, Any.
+ * Insert the TreeNode into the universal CORBA wrapper, Any.
*/
- public static void insert(Any a, node that)
+ public static void insert(Any a, TreeNode that)
{
OutputStream out = a.create_output_stream();
a.type(type());
@@ -99,22 +99,22 @@ public abstract class nodeHelper
}
/**
- * Read the node from the common data reprentation (CDR) stream.
+ * Read the TreeNode from the common data reprentation (CDR) stream.
*/
- public static node read(InputStream istream)
+ public static TreeNode read(InputStream istream)
{
- node value = new node();
+ TreeNode value = new TreeNode();
value.name = istream.read_string();
int _len0 = istream.read_long();
- value.children = new node[ _len0 ];
+ value.children = new TreeNode[ _len0 ];
for (int i = 0; i < value.children.length; ++i)
- value.children [ i ] = nodeHelper.read(istream);
+ value.children [ i ] = TreeNodeHelper.read(istream);
return value;
}
/**
- * Get the node type code definition.
+ * Get the TreeNode type code definition.
*/
public static synchronized TypeCode type()
{
@@ -131,7 +131,7 @@ public abstract class nodeHelper
return ORB.init().create_recursive_tc(_id);
active = true;
- // List all memebers of the node structure.
+ // List all memebers of the TreeNode structure.
StructMember[] members = new StructMember[ 2 ];
TypeCode memberType;
memberType = ORB.init().create_string_tc(0);
@@ -139,7 +139,7 @@ public abstract class nodeHelper
memberType = ORB.init().create_recursive_tc("");
members [ 1 ] = new StructMember("children", memberType, null);
typeCode =
- ORB.init().create_struct_tc(nodeHelper.id(), "node", members);
+ ORB.init().create_struct_tc(TreeNodeHelper.id(), "TreeNode", members);
active = false;
}
}
@@ -148,13 +148,13 @@ public abstract class nodeHelper
}
/**
- * Write the node into the common data reprentation (CDR) stream.
+ * Write the TreeNode into the common data reprentation (CDR) stream.
*/
- public static void write(OutputStream ostream, node value)
+ public static void write(OutputStream ostream, TreeNode value)
{
ostream.write_string(value.name);
ostream.write_long(value.children.length);
for (int i = 0; i < value.children.length; ++i)
- nodeHelper.write(ostream, value.children [ i ]);
+ TreeNodeHelper.write(ostream, value.children [ i ]);
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHolder.java
index 8e4913912..ec180ce57 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHolder.java
@@ -1,4 +1,4 @@
-/* nodeHolder.java --
+/* TreeNodeHolder.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,57 +44,57 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
/**
- * The node holder is a wrapper about the node data structure. It
- * can be used where the node must be passed both to and from
+ * The TreeNode holder is a wrapper about the TreeNode data structure. It
+ * can be used where the TreeNode must be passed both to and from
* the method being called. The same structure holds the tree,
- * as it can be represented as a root node with children.
+ * as it can be represented as a root TreeNode with children.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class nodeHolder
+public class TreeNodeHolder
implements Streamable
{
/**
- * Stores the node value.
+ * Stores the TreeNode value.
*/
- public node value;
+ public TreeNode value;
/**
- * Creates the node holder with the null initial value.
+ * Creates the TreeNode holder with the null initial value.
*/
- public nodeHolder()
+ public TreeNodeHolder()
{
}
/**
- * Creates the node holder with the given initial value.
+ * Creates the TreeNode holder with the given initial value.
*/
- public nodeHolder(node initialValue)
+ public TreeNodeHolder(TreeNode initialValue)
{
value = initialValue;
}
/**
- * Reads the node value from the common data representation (CDR)
+ * Reads the TreeNode value from the common data representation (CDR)
* stream.
*/
public void _read(InputStream in)
{
- value = nodeHelper.read(in);
+ value = TreeNodeHelper.read(in);
}
/**
- * Writes the node value into common data representation (CDR)
+ * Writes the TreeNode value into common data representation (CDR)
* stream.
* @return
*/
public TypeCode _type()
{
- return nodeHelper.type();
+ return TreeNodeHelper.type();
}
public void _write(OutputStream out)
{
- nodeHelper.write(out, value);
+ TreeNodeHelper.write(out, value);
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java
index 51ea5f2d6..cf20d61ec 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java
@@ -1,4 +1,4 @@
-/* ourUserException.java --
+/* WeThrowThisException.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,10 +49,15 @@ import org.omg.CORBA.portable.IDLEntity;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class ourUserException
+public class WeThrowThisException
extends UserException
implements IDLEntity
{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
/**
* Our specific field, transferred to client.
*/
@@ -63,7 +68,7 @@ public class ourUserException
*
* @param _ourField the value of our specific field.
*/
- public ourUserException(int _ourField)
+ public WeThrowThisException(int _ourField)
{
ourField = _ourField;
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java
index 8c499df64..4d5eee74b 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java
@@ -1,4 +1,4 @@
-/* ourUserExceptionHelper.java --
+/* WeThrowThisExceptionHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,14 +50,14 @@ import org.omg.CORBA.TypeCode;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public abstract class ourUserExceptionHelper
+public abstract class WeThrowThisExceptionHelper
{
/**
* The exception repository id. This name is also used to find the
* mapping local CORBA class.
*/
private static String _id =
- "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException:1.0";
+ "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException:1.0";
/**
* Get the exception repository id.
@@ -71,7 +71,7 @@ public abstract class ourUserExceptionHelper
* Extract the exception from the given Any where it might be
* wrapped.
*/
- public static ourUserException extract(Any a)
+ public static WeThrowThisException extract(Any a)
{
return read(a.create_input_stream());
}
@@ -79,9 +79,9 @@ public abstract class ourUserExceptionHelper
/**
* Read the exception from the CDR stream.
*/
- public static ourUserException read(org.omg.CORBA.portable.InputStream istream)
+ public static WeThrowThisException read(org.omg.CORBA.portable.InputStream istream)
{
- ourUserException value = new ourUserException(0);
+ WeThrowThisException value = new WeThrowThisException(0);
// The repository ID is not used
istream.read_string();
@@ -98,8 +98,8 @@ public abstract class ourUserExceptionHelper
TypeCode member = null;
member = ORB.init().get_primitive_tc(TCKind.tk_long);
members [ 0 ] = new StructMember("ourField", member, null);
- return ORB.init().create_struct_tc(ourUserExceptionHelper.id(),
- "ourUserException", members
+ return ORB.init().create_struct_tc(WeThrowThisExceptionHelper.id(),
+ "WeThrowThisException", members
);
}
@@ -107,7 +107,7 @@ public abstract class ourUserExceptionHelper
* Write the exception into the CDR stream.
*/
public static void write(org.omg.CORBA.portable.OutputStream ostream,
- ourUserException value
+ WeThrowThisException value
)
{
ostream.write_string(id());
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java
index 4c8f5b94c..237c23086 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java
@@ -1,4 +1,4 @@
-/* _comTesterImplBase.java --
+/* _DemoTesterImplBase.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,13 +53,16 @@ import org.omg.CORBA.portable.ResponseHandler;
/**
* The base for the class that is actually implementing the functionality
- * of the object on the server side ({@link comServant} of our case).
+ * of the object on the server side ({@link DemoServant} of our case).
+ *
+ * Following CORBA standards, the name of this class must start from
+ * underscore and end by the "ImplBase".
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public abstract class _comTesterImplBase
+public abstract class _DemoTesterImplBase
extends ObjectImpl
- implements comTester, InvokeHandler
+ implements DemoTester, InvokeHandler
{
/**
* When the server receives the request message from client, it
@@ -138,7 +141,7 @@ public abstract class _comTesterImplBase
}
else
/*
- Throws either 'ourUserException' with the 'ourField' field
+ Throws either 'WeThrowThisException' with the 'ourField' field
initialised to the passed positive value
or system exception (if the parameter is zero or negative).
*/
@@ -150,21 +153,21 @@ public abstract class _comTesterImplBase
throwException(parameter);
out = rh.createReply();
}
- catch (ourUserException exception)
+ catch (WeThrowThisException exception)
{
out = rh.createExceptionReply();
- ourUserExceptionHelper.write(out, exception);
+ WeThrowThisExceptionHelper.write(out, exception);
}
}
else
/* Passes and returns the structures. */
if (a_method.equals("passStructure"))
{
- passThis in_structure = passThisHelper.read(in);
- returnThis result = null;
+ StructureToPass in_structure = StructureToPassHelper.read(in);
+ StructureToReturn result = null;
result = passStructure(in_structure);
out = rh.createReply();
- returnThisHelper.write(out, result);
+ StructureToReturnHelper.write(out, result);
}
else
/* Passes and returns the string sequence. */
@@ -180,11 +183,11 @@ public abstract class _comTesterImplBase
/** Pass and return the tree structure */
if (a_method.equals("passTree"))
{
- nodeHolder tree = new nodeHolder();
- tree.value = nodeHelper.read(in);
+ TreeNodeHolder tree = new TreeNodeHolder();
+ tree.value = TreeNodeHelper.read(in);
passTree(tree);
out = rh.createReply();
- nodeHelper.write(out, tree.value);
+ TreeNodeHelper.write(out, tree.value);
}
else
@@ -201,6 +204,6 @@ public abstract class _comTesterImplBase
public String[] _ids()
{
// They are the same as for the stub.
- return _comTesterStub._ids;
+ return _DemoTesterStub._ids;
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java
index b71cd8e86..c8e0ccd6d 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java
@@ -1,4 +1,4 @@
-/* _comTesterStub.java --
+/* _DemoTesterStub.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,23 +55,26 @@ import org.omg.CORBA.portable.RemarshalException;
* side. It has all the same methods as the actual implementation
* on the server side. These methods contain the code for remote
* invocation.
+ *
+ * Following CORBA standards, the name of this class must start from
+ * underscore and end by the "Stub".
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class _comTesterStub
+public class _DemoTesterStub
extends ObjectImpl
- implements comTester
+ implements DemoTester
{
/**
- * A string array of comTester repository ids.
+ * A string array of DemoTester repository ids.
*/
public static String[] _ids =
{
- "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester:1.0"
+ "IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester:1.0"
};
/**
- * Return an array of comTester repository ids.
+ * Return an array of DemoTester repository ids.
*/
public String[] _ids()
{
@@ -217,7 +220,7 @@ public class _comTesterStub
/**
Passes and returns the structures.
*/
- public returnThis passStructure(passThis in_structure)
+ public StructureToReturn passStructure(StructureToPass in_structure)
{
InputStream in = null;
try
@@ -226,13 +229,13 @@ public class _comTesterStub
OutputStream out = _request("passStructure", true);
// Write the structure, using its helper.
- passThisHelper.write(out, in_structure);
+ StructureToPassHelper.write(out, in_structure);
// Invoke the method.
in = _invoke(out);
// Read the returned structer, using another helper.
- returnThis result = returnThisHelper.read(in);
+ StructureToReturn result = StructureToReturnHelper.read(in);
return result;
}
catch (ApplicationException ex)
@@ -253,7 +256,7 @@ public class _comTesterStub
/**
* Pass and return the tree structure
*/
- public void passTree(nodeHolder tree)
+ public void passTree(TreeNodeHolder tree)
{
InputStream in = null;
try
@@ -261,15 +264,15 @@ public class _comTesterStub
// Get the stream where the parameters must be written.
OutputStream out = _request("passTree", true);
- // Write the tree (node with its chilred, grandchildren and so on),
+ // Write the tree (TreeNode with its chilred, grandchildren and so on),
// using the appropriate helper.
- nodeHelper.write(out, tree.value);
+ TreeNodeHelper.write(out, tree.value);
// Call the method.
in = _invoke(out);
// Read the returned tree.
- tree.value = nodeHelper.read(in);
+ tree.value = TreeNodeHelper.read(in);
}
catch (ApplicationException ex)
{
@@ -382,10 +385,10 @@ public class _comTesterStub
* of the positive value of this argument, and system
* exception otherwise.
*
- * @throws ourUserException
+ * @throws WeThrowThisException
*/
public void throwException(int parameter)
- throws ourUserException
+ throws WeThrowThisException
{
InputStream in = null;
try
@@ -408,9 +411,9 @@ public class _comTesterStub
// If this is the user exception we expect to catch, read and throw
// it here. The system exception, if thrown, is handled by _invoke.
- if (id.equals("IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException:1.0")
+ if (id.equals("IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException:1.0")
)
- throw ourUserExceptionHelper.read(in);
+ throw WeThrowThisExceptionHelper.read(in);
else
throw new MARSHAL(id);
}