
  IDL Valuetype Demo

This directory contains a simple demo for IDL valuetypes.  It consists
of a server and a client.  The client passes several kinds of
valuetype objects to the server, the server looks at them and reports
on what it sees.

Compiling and Running the Example

    mvn install

The client should automatically contact the server and talk to it.
The output should be:

    Passing two integers: two longs: 774, 774
    Passing one integer twice: shared long: 774
    Passing two strings: shared string: hello
    Passing null: one or two null values
    Passing a list structure: list of length: 4 -- 1 2 3 4

  Notes on the Example

The ValueServer interface defines three methods: receive_long,
receive_string, and receive_list.  The first two methods use boxed
value parameters; the calls to these methods from the client
illustrate parameter sharing and null values.

The third method, receive_list, has a regular value type parameter,
Node.  A Node is an element of a linked list; there is an instance
field "next" in each node.  In the example, the client sets up a
circular list of four elements.  On the server side, this list is
taken apart and its distinct elements are counted.

The IDL type Node is implemented by demo.value.idl.NodeImpl.  It is
important that this class provides a no-argument constructor -- this
way, JacORB can pass such objects over the wire without the need for a
separate value factory.  The general rule is: if a value
implementation has the suffix "Impl" appended to the name of the IDL
value type, and provides a no-argument constructor, then there is no
need for a separate value factory.  (See
org.jacorb.orb.ORB.lookup_value_factory() for details.)
