eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ObsoleteObject':

Home

everywhere
www.exept.de
for:
[back]

Class: ObsoleteObject


Inheritance:

   nil
   |
   +--ObsoleteObject

  This class inherits NOTHING - most messages will lead into doesNotUnderstand:

Package:
stx:libboss
Category:
System-BinaryStorage
Version:
rev: 1.20 date: 2009/06/30 13:58:26
user: stefan
file: ObsoleteObject.st directory: libboss
module: stx stc-classLibrary: libboss
Author:
Claus Gittinger

Description:


This class is used for error handling during binary object restoration. 
Whenever an object whose class has changed (i.e. it was stored with a 
different layout/size) is about to be restored, it cannot be made an 
instance of the now existing class.
In this case, the BinaryInputManager will create a dummy class for the 
old (obsolete) object and make the restored object an instance of it. 
This dummy class will be a subclass of ObsoleteObject.
Thus, the restored obsolete object will (at least) provide the data
(i.e. the contents) of the original object - although it will obviously
not be able to implement the original protocol.

After the creation of the obsolete object, a signal will be raised (in 
BinaryInputManager), which can be caught by the application to provide
a replacement class and/or to try some automatic or semi-automatic object 
conversion.
The signal gets the obsolete object and the new class as parameters, so
a handler can extract instance values from the obsolete object and construct a
replacement object from those.

ObsoleteObject itself catches all messages, to avoid any use of the restored
object (in case conversion failed or the signal was ignored).

Read the documentatio on binary object storage for examples & code fragments,
on obsolete object handling and object migration.


Related information:

    BinaryObjectStorage
    BinaryIOManager
    PersistencyManager
    [binary object storage]

Class protocol:

Signal constants
o  obsoleteObjectSignal
return the signal raised when a message is sent to an Obsolete
signal.

initialization
o  initialize


Instance protocol:

message catching
o  doesNotUnderstand: aMessage
the only thing obsolete objects understand is that they don't understand
anything.

required protocol
o  basicAt: index
this method is required to allow cloning of the object

o  basicAt: index put: something
this method is required to allow restore of the object

o  basicInspect
this method is required to allow inspection of the object

o  basicSize
this method is required to allow restore of the object

o  become: index
this method is required to allow cloning of the object

o  becomeNil
this method is required to allow restore of the object

o  becomeSameAs: index
this method is required to allow cloning of the object

o  displayString
return a printed representation of the receiver for displaying.
This method is required to allow inspection of the object.

o  inspect
this method is required to allow inspection of the object

o  instVarAt: index
this method is required to allow inspection of the object

o  instVarAt: index put: something
this method is required to allow restore of the object

o  isKindOf: aClass
this method is required to allow restore of the object

o  readBinaryContentsFrom: stream manager: manager
this method is required to allow restore of the object

o  readBinaryContentsFromData: instvarArray manager: manager
this method is required to allow restore of the object



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 20:24:18 GMT