com.tivoli.twg.engine.cluster
Class TWGClusterManagedObjectFactory

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGObject
      extended bycom.tivoli.twg.engine.TWGPersistentObject
          extended bycom.tivoli.twg.engine.TWGManagedObjectFactory
              extended bycom.tivoli.twg.engine.cluster.TWGClusterManagedObjectFactory
All Implemented Interfaces:
TWGBaseShadowedObject, TWGGetSetInterface, TWGManagedObjectLifeCycleListener, TWGServerCommandHandler, TWGShadowedObject

public class TWGClusterManagedObjectFactory
extends TWGManagedObjectFactory
implements TWGManagedObjectLifeCycleListener, TWGServerCommandHandler

Base class for representing the managed object factory for Clusters.


Field Summary
static java.lang.String MO_CLASS
          Name of TWGManagedObject class supported by factory
static java.lang.String NLSCLASS
          Name of NLS resource used for Cluster managed object support
 
Fields inherited from class com.tivoli.twg.engine.TWGManagedObjectFactory
INSTANCE_OF_CALLBACK, INSTANCE_OF_NO, INSTANCE_OF_NO_RESPONSE, INSTANCE_OF_YES
 
Fields inherited from class com.tivoli.twg.engine.TWGPersistentObject
CLASS_NAME, SIZEOF_BYTE, SIZEOF_CHAR, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_SHORT
 
Constructor Summary
TWGClusterManagedObjectFactory()
          Default constructor
TWGClusterManagedObjectFactory(java.lang.String managedObjectClassName)
          Constructor
 
Method Summary
 void Activate()
          Activate the topology processing.
static long createClusterGroup(long obj_id)
          Create cluster group for given cluster object ID, if not already created.
 void Deactivate()
          Deactivate the topology processing
 void Delete()
          Delete method
static IntValueSet getClustersForMOID(int moid)
          Return set of cluster object IDs which a given object is a member
static TWGClusterManagedObjectFactory GetFactory()
          Get instance of cluster managed object factory
 byte instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf, TWGManagedObject managedObject)
          Test a managed object instance for inclusion into a managed object factory class.
 void managedObjectChanged(TWGManagedObject twgmo, int reason)
          Notification method for TWGManagedObject type and/or content change.
 void managedObjectCreated(TWGManagedObject twgmo)
          Notification method for TWGManagedObject creation.
 void managedObjectDestroyed(TWGManagedObject twgmo)
          Notification method for TWGManagedObject deletion.
 void ServerCommandReceived(java.lang.String cmdname, Command cmd)
          Handler method for delivering TWGServerCommands for Native Managed Object specific commands
 void StartDiscoveryPass()
          Start a discovery pass: operation should return quickly, with actual discovery logic not being completed before the method returns.
 
Methods inherited from class com.tivoli.twg.engine.TWGManagedObjectFactory
ActivateAll, addDatabaseList, addMoClassAssociation, addTask, addTask, addTask, addTask, associateDatabaseTable, clearPingInterval, containsTask, containsTask, DeactivateAll, DiscoveryInterval, DiscoverySupported, DumpMOFTree, emptyDatabaseList, findDatabaseTables, findFactoryForManagedObject, findFactoryForManagedObject, findManagedObjectByFingerprint, freeLicense, getAddressEntryRecord, getAddressEntryShadow, getAgentPingInterval, getAllAssociatedManagedObjectIDs, getAllManagedObjectClassNames, getAllManagedObjectClassNamesAndOIDs, getAllManagedObjectSetAsIds, getAttributeIDList, getAttributeType, getAttributeValue, getAutoAddEnabled, getAutoAddSupported, getChildMOFSetAsIds, GetConShadowClass, getDatabaseList, getDatabaseList, GetFactoryForManagedObject, GetFactoryForManagedObject, getFilterImageSet, getImageSet, getLicense, getManagedObjectByFingerprint, getManagedObjectClassname, getManagedObjectSetAsIds, getManagedObjectSetAsIds, getMOFInstances, getMorphInterval, getName, getName, getNameKey, getOurAddressEntryRecord, getParentMOF, getParentMofIds, getPingInterval, getPingInterval, getPingSupported, getPingType, getResourceBundle, getRootMOF, GetShadowRecord, GetShadowVersion, getTaskListAsIds, getTaskListAsIds, getTaskListSize, getTreeOrderedMOFList, initialize, isAutoClientSecureEnabled, isRootMOF, licenseRequired, ProcessAllAutoDiscovery, ProcessAllImmedDiscovery, ProcessAllImmedDiscovery, removeMoClassAssociation, removeTask, removeTask, restoreData, saveData, setAddObjectClassname, setAddressEntryShadow, setAgentPingInterval, setAttributeValue, setAutoAddEnabled, setAutoClientSecure, setClientSecureSupport, SetDiscoveryInterval, SetDiscoverySupported, setEditObjectClassname, setFilterImageSet, setImageSet, setLicenseProductCode, setMorphInterval, setName, setName, SetObjectID, setPingInterval, setPingType, startDiscoveryDaemon, startPing, stopDiscoveryDaemon, toString, UpdateShadowVersion
 
Methods inherited from class com.tivoli.twg.engine.TWGPersistentObject
Destroy, enableAsyncWrites, fromPersistID, isNewPersistentStore, isSaveRequired, PersistID, restore, restoreAll, save, save, setSaveRequired, terminate, toPersistID
 
Methods inherited from class com.tivoli.twg.engine.TWGObject
AllObjects, AllObjects, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MO_CLASS

public static final java.lang.String MO_CLASS
Name of TWGManagedObject class supported by factory

See Also:
Constant Field Values

NLSCLASS

public static final java.lang.String NLSCLASS
Name of NLS resource used for Cluster managed object support

See Also:
Constant Field Values
Constructor Detail

TWGClusterManagedObjectFactory

public TWGClusterManagedObjectFactory()
                               throws java.lang.ClassNotFoundException
Default constructor

Throws:
java.lang.ClassNotFoundException - if MO class not loaded

TWGClusterManagedObjectFactory

public TWGClusterManagedObjectFactory(java.lang.String managedObjectClassName)
                               throws java.lang.ClassNotFoundException
Constructor

Throws:
java.lang.ClassNotFoundException - if MO class not loaded
Method Detail

Delete

public void Delete()
Delete method

Overrides:
Delete in class TWGManagedObjectFactory

GetFactory

public static TWGClusterManagedObjectFactory GetFactory()
Get instance of cluster managed object factory

Returns:
TWGClusterManagedObjectFactory instance

instanceOf

public byte instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf,
                       TWGManagedObject managedObject)
Test a managed object instance for inclusion into a managed object factory class. This method is used during managed object morphing. It is used by TWGEngine processes to determine the lowest level managed object factory class to which a managed object instance belongs. This method should be implemented by all managed object factory extension classes.

Overrides:
instanceOf in class TWGManagedObjectFactory
Parameters:
mofInstanceOf - Reference to TWGMofInstanceOf callback interface object.
managedObject - Reference of managed object instance to be tested.
Returns:
byte see TWGManagedObjectFactory.

Activate

public void Activate()
              throws ManagedObjectFactoryActivateException
Activate the topology processing.

Overrides:
Activate in class TWGManagedObjectFactory
Throws:
ManagedObjectFactoryActivateException - if error

Deactivate

public void Deactivate()
Deactivate the topology processing

Overrides:
Deactivate in class TWGManagedObjectFactory

StartDiscoveryPass

public void StartDiscoveryPass()
Start a discovery pass: operation should return quickly, with actual discovery logic not being completed before the method returns. The default method does nothing.

Overrides:
StartDiscoveryPass in class TWGManagedObjectFactory

managedObjectCreated

public void managedObjectCreated(TWGManagedObject twgmo)
Notification method for TWGManagedObject creation.

Specified by:
managedObjectCreated in interface TWGManagedObjectLifeCycleListener
Parameters:
twgmo - - Reference to newly created TWGManagedObject

managedObjectDestroyed

public void managedObjectDestroyed(TWGManagedObject twgmo)
Notification method for TWGManagedObject deletion. Used to remove references to managed object in cluster members.

Specified by:
managedObjectDestroyed in interface TWGManagedObjectLifeCycleListener
Parameters:
twgmo - - Reference to TWGManagedObject to be deleted

managedObjectChanged

public void managedObjectChanged(TWGManagedObject twgmo,
                                 int reason)
Notification method for TWGManagedObject type and/or content change.

Specified by:
managedObjectChanged in interface TWGManagedObjectLifeCycleListener
Parameters:
twgmo - - Reference to modified TWGManagedObject
reason - - reason for change notification

getClustersForMOID

public static IntValueSet getClustersForMOID(int moid)
Return set of cluster object IDs which a given object is a member

Parameters:
moid - - persistent managed object ID of possible cluster member

ServerCommandReceived

public void ServerCommandReceived(java.lang.String cmdname,
                                  Command cmd)
Handler method for delivering TWGServerCommands for Native Managed Object specific commands

Specified by:
ServerCommandReceived in interface TWGServerCommandHandler
Parameters:
cmdname - - name of extension command
cmd - - command instance received

createClusterGroup

public static long createClusterGroup(long obj_id)
Create cluster group for given cluster object ID, if not already created.

Parameters:
obj_id - - object ID of cluster object