WebObjects 5.2

com.webobjects.eocontrol
Class EOKeyValueArchiving.Support

java.lang.Object
  |
  +--com.webobjects.eocontrol.EOKeyValueArchiving.Support
Enclosing class:
EOKeyValueArchiving

public abstract static class EOKeyValueArchiving.Support
extends Object

EOKeyValueArchiving.Support is an abstract class that defines a mechanism for one class to provide EOKeyValueArchiving behavior on behalf of another class. Subclasses of EOKeyValueArchiving.Support archive and unarchive objects of a different class. Subclasses of EOKeyValueArchiving.Support are needed to provide archiving for classes whose code WebObjects or you don't own and that don't implement EOKeyValueArchiving.

A subclass of EOKeyValueArchiving.Support need to implement the methods encodeWithKeyValueArchiver and decodeObjectWithKeyValueUnarchiver to archive and unarchive objects of a specific non-EOKeyValueArchiving class. You can also override the methods awakeFromKeyValueUnarchiver and finishInitializationWithKeyValueUnarchiver, EOKeyValueArchiving.Support's implementations of these methods do nothing.

EOKeyValueArchiving.Support manages a registry of Support classes for classes that don't implement EOKeyValueArchiving. The methods setSupportForClass and supportForClass are used to register and access the EOKeyValueArchiving.Support classes for performing archiving on non-EOKeyValueArchiving objects.

See Also:
EOKeyValueArchiving

Constructor Summary
EOKeyValueArchiving.Support()
           
 
Method Summary
 void awakeFromKeyValueUnarchiver(Object receiver, EOKeyValueUnarchiver unarchiver)
          Asks the receiver to awake the object receiver after the EOKeyValueUnarchiver unarchiver has unarchived all objects from an archive.
abstract  Object decodeObjectWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
          Asks the receiver to re(create) the an object from the EOKeyValueUnarchiver unarchiver.
abstract  void encodeWithKeyValueArchiver(Object receiver, EOKeyValueArchiver archiver)
          Asks the receiver to archive the state of receiver into the EOKeyValueArchiver archiver.
 void finishInitializationWithKeyValueUnarchiver(Object receiver, EOKeyValueUnarchiver unarchiver)
          Asks the receiver to finish initializing the object receiver after the EOKeyValueUnarchiver unarchiver has unarchived and awaken all objects from an archive.
static void setSupportForClass(EOKeyValueArchiving.Support support, Class aClass)
          Sets the support object used for archiving and unarchiving for instances of aClass to support.
static EOKeyValueArchiving.Support supportForClass(Class aClass)
          Returns the support object used for archiving and unarchiving for instances of aClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOKeyValueArchiving.Support

public EOKeyValueArchiving.Support()
Method Detail

awakeFromKeyValueUnarchiver

public void awakeFromKeyValueUnarchiver(Object receiver,
                                        EOKeyValueUnarchiver unarchiver)
Asks the receiver to awake the object receiver after the EOKeyValueUnarchiver unarchiver has unarchived all objects from an archive. This method is invoked at the end of an unarchiving process of an EOKeyValueUnarchiver, when all objects have been unarchived, but before they are asked to finish initialization.
Parameters:
receiver - the object to awake
unarchiver - the EOKeyValueUnarchiver
See Also:
EOKeyValueUnarchiver, finishInitializationWithKeyValueUnarchiver(Object, EOKeyValueUnarchiver)

decodeObjectWithKeyValueUnarchiver

public abstract Object decodeObjectWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Asks the receiver to re(create) the an object from the EOKeyValueUnarchiver unarchiver.
Parameters:
unarchiver - the EOKeyValueUnarchiver
Returns:
the unarchived object
See Also:
EOKeyValueUnarchiver

encodeWithKeyValueArchiver

public abstract void encodeWithKeyValueArchiver(Object receiver,
                                                EOKeyValueArchiver archiver)
Asks the receiver to archive the state of receiver into the EOKeyValueArchiver archiver.
Parameters:
receiver - the object to archive
archiver - the EOKeyValueArchiver
See Also:
EOKeyValueArchiver

finishInitializationWithKeyValueUnarchiver

public void finishInitializationWithKeyValueUnarchiver(Object receiver,
                                                       EOKeyValueUnarchiver unarchiver)
Asks the receiver to finish initializing the object receiver after the EOKeyValueUnarchiver unarchiver has unarchived and awaken all objects from an archive. This method is invoked at the end of an unarchiving process of an EOKeyValueUnarchiver, when all objects have been unarchived and after they have been asked to awake.
Parameters:
receiver - the object to finish initializing
unarchiver - the EOKeyValueUnarchiver
See Also:
EOKeyValueUnarchiver, awakeFromKeyValueUnarchiver(Object, EOKeyValueUnarchiver)

setSupportForClass

public static void setSupportForClass(EOKeyValueArchiving.Support support,
                                      Class aClass)
Sets the support object used for archiving and unarchiving for instances of aClass to support.
Parameters:
support - the support object
aClass - the class to support
See Also:
supportForClass(Class)

supportForClass

public static EOKeyValueArchiving.Support supportForClass(Class aClass)
Returns the support object used for archiving and unarchiving for instances of aClass.
Parameters:
aClass - the class to support
Returns:
the support object
See Also:
setSupportForClass(EOKeyValueArchiving.Support, Class)

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.