org.elkoserver.server.context
Interface ObjectCompletionWatcher

All Known Implementing Classes:
Cap, Chat, ContextKeyCap, Definer, Invisible, TalkPrefs

public interface ObjectCompletionWatcher

Interface implemented by mods that wish to be notified when their object creation is finished.

Creating a Context, User, or Item object by the context server may entail the creation of one or more mod objects (i.e., instances of some subclass of Mod) that are attached to it. Sometimes a mod's initialization requires access to the object it is attached to or to other mods attached to that same object. However, when a mod's constructor is called, the mod is not yet attached to the object. Consequently, information about the mod's object environment is not available to the mod constructor.

To enable initialization operations based on the object environment, mods may implement this interface. Once all of the mods associated with an object have been created and attached to it, the server will invoke the objectIsComplete() method of each of that object's mods that implement this interface.

This interface is only useful when implemented by subclasses of Mod.


Method Summary
 void objectIsComplete()
          Do what needs to be done now that you are in a finished object environment.
 

Method Detail

objectIsComplete

void objectIsComplete()
Do what needs to be done now that you are in a finished object environment.

This method will be called automatically by the server's object creation mechanism upon completion of the creation of an object to which the mod implementing this interface is attached.

Note: if an object has more than one mod that implements this interface, the order in which the various mods' implementations of this method will be called is undefined.