Tidied up some really ancient and really incorrect documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6749 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -57,68 +57,19 @@ import static com.threerings.presents.Log.log;
|
|||||||
* notifications ceasing when a subscriber has relinquished its subscription. Always unregister all
|
* notifications ceasing when a subscriber has relinquished its subscription. Always unregister all
|
||||||
* listeners when they no longer need to hear from an object.
|
* listeners when they no longer need to hear from an object.
|
||||||
*
|
*
|
||||||
* <p> When there is any change to the the object's fields data, an event is generated which is
|
* <p> When there is any change to the the object's properties (which must be effected via the
|
||||||
* dispatched to all listeners of the object, notifying them of that change and effecting that
|
* setter methods), an event is generated which is dispatched to all listeners of the object,
|
||||||
* change to the copy of the object maintained at each client. In this way, both a repository of
|
* notifying them of that change and effecting that change to the copy of the object maintained at
|
||||||
* shared information and a mechanism for asynchronous notification are made available as a
|
* each client. In this way, both a repository of shared information and a mechanism for
|
||||||
* fundamental application building blocks.
|
* asynchronous notification are made available as a fundamental application building blocks.
|
||||||
*
|
*
|
||||||
* <p> To define what information is shared, an application creates a distributed object
|
* <p> Distributed object fields can be any of the following set of primitive types:
|
||||||
* declaration which is much like a class declaration except that it is transformed into a proper
|
* <pre>{@code
|
||||||
* derived class of <code>DObject</code> by a script. A declaration looks something like this:
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* public dclass RoomObject
|
|
||||||
* {
|
|
||||||
* public String description;
|
|
||||||
* public int[] occupants;
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* which is converted into an actual Java class that looks like this:
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* public class RoomObject extends DObject
|
|
||||||
* {
|
|
||||||
* public String getDescription ()
|
|
||||||
* {
|
|
||||||
* // ...
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public void setDescription (String description)
|
|
||||||
* {
|
|
||||||
* // ...
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public int[] getOccupants ()
|
|
||||||
* {
|
|
||||||
* // ...
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public void setOccupants (int[] occupants)
|
|
||||||
* {
|
|
||||||
* // ...
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public void setOccupantsAt (int index, int value)
|
|
||||||
* {
|
|
||||||
* // ...
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* These method calls on the actual distributed object will result in the proper attribute change
|
|
||||||
* events being generated and dispatched.
|
|
||||||
*
|
|
||||||
* <p> Note that distributed object fields can be any of the following set of primitive types:
|
|
||||||
*
|
|
||||||
* <code><pre>
|
|
||||||
* boolean, byte, short, int, long, float, double
|
* boolean, byte, short, int, long, float, double
|
||||||
* Boolean, Byte, Short, Integer, Long, Float, Double, String
|
* Boolean, Byte, Short, Integer, Long, Float, Double, String
|
||||||
* boolean[], byte[], short[], int[], long[], float[], double[], String[]
|
* boolean[], byte[], short[], int[], long[], float[], double[], String[]
|
||||||
* </pre></code>
|
* }</pre>
|
||||||
*
|
* as well as custom types that implement {@link Streamable}.
|
||||||
* Fields of type {@link Streamable} can also be used.
|
|
||||||
*/
|
*/
|
||||||
public class DObject
|
public class DObject
|
||||||
implements Streamable
|
implements Streamable
|
||||||
|
|||||||
Reference in New Issue
Block a user