com.tivoli.twg.engine
Interface TWGBaseShadowedObject

All Known Subinterfaces:
TWGConsoleSpecShadowedObject, TWGShadowedObject
All Known Implementing Classes:
TWGActiveConsole, TWGAssociation, TWGConfigPanelBeans, TWGContentInfoBeans, TWGDatabase, TWGExtension, TWGFilter, TWGImageSet, TWGManagedObject, TWGManagedObjectFactory, TWGManagedObjectSet, TWGManagedObjectStatusGroup, TWGManagedObjectStatusSet, TWGPopupEvent, TWGPrivToken, TWGRelationship, TWGRelationshipSet, TWGTask, TWGUser

public interface TWGBaseShadowedObject

Interface implemented by classes which are shadowed to the Director Console. This interface works in conjunction with several static methods of the TWGActiveConsole class to implement an edge-triggered, object-delta-based update stream to maintain a set of shadowed objects on one or more remote consoles. Each class which implements the TWGShadowedObject or TWGConsoleSpecShadowedObject interfaces (which are derived from TWGBaseShadowedObject) must do the following: 1) include a non-persistent long value which will contain a "version" or "timestamp" value, which will be updated by calling TWGActiveConsole.nextShadowVersion(). This value must be updated whenever an attribute which is shadowed to the remote consoles is changed. After the value is saved, TWGActiveConsole.objectUpdated() should be called (this can wait until after a set of updates is completed). 2) implement all interface methods 3) include all attributes which are to be shadowed into the data block returned by GetShadowRecord(). 4) implement a TWGConxxxx class (which is a subclass of the TWGConObject class) for the console to use to receive the shadow record.


Method Summary
 java.lang.String GetConShadowClass()
          Get name of console shadow class.
 byte[] GetShadowRecord(java.util.Locale locale)
          Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class.
 long GetShadowVersion()
          Get object state version.
 void UpdateShadowVersion()
          Update object state version.
 

Method Detail

UpdateShadowVersion

public void UpdateShadowVersion()
Update object state version. This method must call the TWGActiveConsole.nextShadowVersion() to update its internal state_version attribute (a 'long' instance variable). This method should be called by any methods of the object's class or subclasses which modify attributes which are send to the shadow objects on the console).


GetShadowVersion

public long GetShadowVersion()
Get object state version. This returns value of state_version.

Returns:
state_version attribute value

GetConShadowClass

public java.lang.String GetConShadowClass()
Get name of console shadow class. This returns the name of TWGConObject subclass which is used to hold the attributes shadowed to the console.

Returns:
com.tivoli.twg.engine.TWGConObject subclass which object shadows to

GetShadowRecord

public byte[] GetShadowRecord(java.util.Locale locale)
Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class. This data is delivered along with the ObjectID (so the ObjectID shouldn't be included in the shadowed data record).

Parameters:
locale - - Locale requested (for any locale-specific content)
Returns:
byte array containing opaque data representation of attribute values to be delivered to the console shadow class.