Loading and dumping strategies define all aspects of SST marshaling with the Swapper. They are much like configurations in that you declaratively define the behavior they require and the strategies coordinate the loader or dumper activities accordingly.
For example, when a dumper needs to calculate the object dumping replacement for a particular object, it typically sends dumpingReplacementForReplacer: to the object itself. Sending this method allows objects to play a role in deciding how they are dumped. Unfortunately, there can only be one definition of this method for a particular class. If two systems need to override this method, a fundamental conflict occurs.
The Swapper routes all such messages through the strategy. This design gives you a centralize point of control over the messages sent to the objects being marshaled. For example, the standard SST by-reference marshaling strategy uses the method sstBRDumpingReplacementForReplacer: rather than dumpingReplacementForReplacer: to define their dumping behavior. This is programmed by overriding the standard strategy method as shown below:
dumpingReplacementFor: anObject for: replacer ^anObject sstBRDumpingReplacementForReplacer: replacer
Notice that this method simply redispatches the request but with a new, method selector (sstBR and so on) which is specific to the marshaling scheme. Similar methods defined on strategies are given below.
Note that the BR marshaling scheme is layered on top of the standard the Swapper scheme. You should consider layering your marshaling requirements in this way to avoid conflicts when your systems must be used in concert with others'.