The readField()/writeField() methods are for marshalling objects that have
basic streamers defined for them (String, Integer, Boolean) and not other arbitrary objects. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3863 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -158,13 +158,13 @@ public class CompoundEvent extends DEvent
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_events);
|
||||
out.writeObject(_events);
|
||||
}
|
||||
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_events = ins.readField(StreamableArrayList);
|
||||
_events = ins.readObject();
|
||||
}
|
||||
|
||||
/** The object manager that we'll post ourselves to when we're
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ElementUpdatedEvent extends NamedEvent
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_value);
|
||||
out.writeObject(_value);
|
||||
out.writeInt(_index);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ElementUpdatedEvent extends NamedEvent
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_value = ins.readField(Object);
|
||||
_value = ins.readObjct();
|
||||
_index = ins.readInt();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,13 +71,13 @@ public class EntryAddedEvent extends NamedEvent
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_entry);
|
||||
out.writeObject(_entry);
|
||||
}
|
||||
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_entry = ins.readField(DSetEntry);
|
||||
_entry = ins.readObject();
|
||||
}
|
||||
|
||||
protected var _entry :DSetEntry;
|
||||
|
||||
@@ -90,13 +90,13 @@ public class EntryRemovedEvent extends NamedEvent
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_key);
|
||||
out.writeObject(_key);
|
||||
}
|
||||
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_key = ins.readField(Comparable);
|
||||
_key = ins.readObject();
|
||||
}
|
||||
|
||||
protected var _key :Comparable;
|
||||
|
||||
@@ -89,13 +89,13 @@ public class EntryUpdatedEvent extends NamedEvent
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_entry);
|
||||
out.writeObject(_entry);
|
||||
}
|
||||
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_entry = ins.readField(DSetEntry);
|
||||
_entry = ins.readObject();
|
||||
}
|
||||
|
||||
protected var _entry :DSetEntry;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class AuthRequest extends UpstreamMessage
|
||||
{
|
||||
super.writeObject(out);
|
||||
|
||||
out.writeField(_creds);
|
||||
out.writeObject(_creds);
|
||||
out.writeField(_version);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class AuthRequest extends UpstreamMessage
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_creds = ins.readField(Credentials);
|
||||
_creds = ins.readObject();
|
||||
_version = ins.readField(String);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class AuthResponse extends DownstreamMessage
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_data = ins.readField(AuthResponseData);
|
||||
_data = ins.readObject();
|
||||
}
|
||||
|
||||
protected var _data :AuthResponseData;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BootstrapData
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
clientOid = ins.readInt();
|
||||
services = ins.readField(StreamableArrayList);
|
||||
services = ins.readObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class BootstrapNotification extends DownstreamMessage
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_data = ins.readField(BootstrapData);
|
||||
_data = ins.readObject();
|
||||
}
|
||||
|
||||
/** The data associated with this notification. */
|
||||
|
||||
@@ -47,13 +47,13 @@ public class ForwardEventRequest extends UpstreamMessage
|
||||
public override function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeField(_event);
|
||||
out.writeObject(_event);
|
||||
}
|
||||
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_event = ins.readField(DEvent);
|
||||
_event = ins.readObject();
|
||||
}
|
||||
|
||||
public override function toString () :String
|
||||
|
||||
Reference in New Issue
Block a user