|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGObject
com.tivoli.twg.engine.TWGPersistentObject
com.tivoli.twg.engine.TWGManagedObjectFactory
TWG Managed Object class. This class is the base class for all managed object types. All managed object extension classes are extensions of this class. This class provides the following function: 1) Maintains an accessable container for all managed objects types. That is, for every extended type of managed object, there exists a collection containing the object IDs of every currently existing object of the class type. Sub-class types are not included in the container. 2) Maintains a collection of every known extension to managed object. This information is typically used during the persistent restore operation at server launch time. It is used to verify registered managed object types.
Field Summary | |
---|---|
static byte |
INSTANCE_OF_CALLBACK
|
static byte |
INSTANCE_OF_NO
|
static byte |
INSTANCE_OF_NO_RESPONSE
|
static byte |
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 | |
---|---|
TWGManagedObjectFactory()
Default constructor for base TWGManagedObjectFactory instance |
|
TWGManagedObjectFactory(java.lang.String m_o_cname)
Constructor for creating new TWGManagedObjectFactory instance (usually used by default constructor for TWGManagedObjectFactory subclasses for implementing their creation constructors). |
Method Summary | |
---|---|
protected void |
Activate()
Activate method. |
static void |
ActivateAll()
Activate all TWGManagedObjectFactory instances |
void |
addDatabaseList(java.lang.String tableName)
Add a database table to the database table list. |
static void |
addMoClassAssociation(java.lang.String mo_cname,
int oid)
Add an object ID to a managed object factory's managed object association set. |
void |
addTask(long task_oid)
Add a task to the task list using task object reference. |
static void |
addTask(java.lang.String mo_classname,
long task_oid)
Add a task to the task list for a given managed object class using task object ID Note: this method can be used for associating tasks with managed object classes during extension initializaton. |
static void |
addTask(java.lang.String mo_classname,
TWGTask task)
Add a task to the task list for a given managed object class using task object reference. |
void |
addTask(TWGTask task)
Add a task to the task list using task object reference. |
static void |
associateDatabaseTable(java.lang.String mo_class,
java.lang.String db_class)
Associate database table class with give managed object class |
void |
clearPingInterval()
Clear ping interval. |
boolean |
containsTask(long taskOid)
Check if task identifier exists in task list. |
boolean |
containsTask(TWGTask task)
Check if task object reference exists in task list. |
protected void |
Deactivate()
Deactivate method. |
static void |
DeactivateAll()
Deactivate all TWGManagedObjectFactory instances |
void |
Delete()
Delete method : clean up associations |
long |
DiscoveryInterval()
Get automatic discovery interval, in milliseconds |
boolean |
DiscoverySupported()
Discovery supported method (default is false) |
static void |
DumpMOFTree()
Dump MOF tree (debug) |
void |
emptyDatabaseList()
Empties the database table list. |
static StringValueSet |
findDatabaseTables(java.lang.String mo_class)
Find string list containing names of registered database tables |
static TWGManagedObjectFactory |
findFactoryForManagedObject(java.lang.String className)
Get TWGManagedObjectFactory for given TWGManagedObject class name |
static TWGManagedObjectFactory |
findFactoryForManagedObject(TWGManagedObject obj)
Get TWGManagedObjectFactory for given TWGManagedObject |
static TWGManagedObject |
findManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
Find managed object by fingerprint. |
void |
freeLicense(TWGManagedObject mo)
Free license for client of our ManagedObject class |
static byte[] |
getAddressEntryRecord(TWGManagedObject obj)
Get address entry record for given managed object |
java.lang.String |
getAddressEntryShadow()
Get address shadow class name. |
long |
getAgentPingInterval()
Get agent ping interrval in milliseconds. |
int[] |
getAllAssociatedManagedObjectIDs()
Get array of all managed object IDs associated with the factory |
static java.lang.String[] |
getAllManagedObjectClassNames()
Get string array of all managed object class names represented by all managed object factories. |
static LongKeyTable |
getAllManagedObjectClassNamesAndOIDs()
Get set of all managed object factory ID and corresponding managed object class names tuples currently registered in the factory. |
static IntValueSet |
getAllManagedObjectSetAsIds()
Get all managed objects IDS. |
java.lang.String[] |
getAttributeIDList()
Attribute ID enumeration : this method returns a list of strings containing the String names of the attributes supported for a given object. |
int |
getAttributeType(java.lang.String id)
Get type of attribute value for given attribute |
DataValue |
getAttributeValue(java.lang.String id,
java.util.Locale loc)
Get value of attribute with given ID. |
boolean |
getAutoAddEnabled()
Returns current setting of Auto-Add feature : subclasses should replace this method with their own implementations. |
boolean |
getAutoAddSupported()
Indicates if auto-add of unknown clients is supported : subclasses should replace this method to return 'true' if feature is supported. |
IntValueSet |
getChildMOFSetAsIds()
Get set of all child managed object factory IDs. |
java.lang.String |
GetConShadowClass()
Get name of console shadow class. |
StringValueSet |
getDatabaseList()
Return the database table list for the instance. |
StringValueSet |
getDatabaseList(boolean traverseParent)
Return the database table list. |
static TWGManagedObjectFactory |
GetFactoryForManagedObject(java.lang.String mo_classname)
Return the managed object factory instance for a given TWGManagedObject subclass. |
static TWGManagedObjectFactory |
GetFactoryForManagedObject(TWGManagedObject mo)
Look up managed object factory instance for a given TWGManagedObject instance. |
long |
getFilterImageSet()
Get default filter image set object ID |
int |
getImageSet()
Get image set. |
boolean |
getLicense(TWGManagedObject mo)
Get license for client of our ManagedObject class |
protected TWGManagedObject |
getManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
Get managed object by managed object fingerprint |
java.lang.String |
getManagedObjectClassname()
Get TWGManagedObject classname |
IntValueSet |
getManagedObjectSetAsIds(boolean includeChildren)
Get TWGManagedObjectSetAsIds. |
static IntValueSet |
getManagedObjectSetAsIds(java.lang.String mofClassName,
boolean includeChildren)
Get TWGManagedObjectSet. |
static TWGManagedObjectFactory[] |
getMOFInstances()
Get list of all MOF instances |
long |
getMorphInterval()
Get morph interval. |
java.lang.String |
getName()
Get name for this instance. |
java.lang.String |
getName(java.util.Locale locale)
Get name for this instance. |
java.lang.String |
getNameKey()
Get name key |
protected byte[] |
getOurAddressEntryRecord(TWGManagedObject obj)
Default address entry record support : unsupported. |
TWGManagedObjectFactory |
getParentMOF()
Return reference to parent MOF |
int[] |
getParentMofIds()
Get list of parent managed object factory IDs for this factory |
long |
getPingInterval()
Get ping interrval in milliseconds. |
long |
getPingInterval(boolean traverseParent)
Get ping interval in milliseconds. |
boolean |
getPingSupported()
Ping supported method (default is false) |
int |
getPingType()
Ping type getter method. |
java.lang.String |
getResourceBundle()
Get resource bundle name for this instance |
static TWGManagedObjectFactory |
getRootMOF()
Return reference to root MOF |
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. |
IntValueSet |
getTaskListAsIds()
Return list of associated tasks for specified managed object factory reference. |
static IntValueSet |
getTaskListAsIds(java.lang.String mofClassName)
Return list of associated tasks for specified managed object factory class name. |
int |
getTaskListSize()
Get size of task list. |
static java.util.Vector |
getTreeOrderedMOFList()
Get tree-ordered list of managed object factories. |
static void |
initialize()
Managed object factory initializer. |
byte |
instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf,
TWGManagedObject mo)
Test a managed object instance for inclusion into a managed object factory class. |
boolean |
isAutoClientSecureEnabled()
Test if automatic secure of unsecure clients option is enabled |
boolean |
isRootMOF()
If instance is root MOF, return true |
boolean |
licenseRequired()
Test if license is required for clients of this class |
static long |
ProcessAllAutoDiscovery()
Check for any automatic discovery requests which are due to be run, or elapse time for those not yet due. |
static void |
ProcessAllImmedDiscovery()
Process immediate discovery request |
static void |
ProcessAllImmedDiscovery(LongValueSet mof_ids)
Process immediate discovery request on given MOFs |
static void |
removeMoClassAssociation(java.lang.String mo_cname,
int oid)
Remove an object ID from a managed object factory's managed object class association set. |
void |
removeTask(long task_oid)
Remove a task from the task list. |
void |
removeTask(TWGTask task)
Remove a task from the task list. |
protected void |
restoreData(TWGPersistentObjectDictionary dictionary,
boolean resolveObjectReferences)
Restore support for persistant object. |
protected void |
saveData(TWGPersistentObjectDictionary dictionary)
Save support for persistant object. |
protected void |
setAddObjectClassname(java.lang.String add_classname)
Set name of add-object JavaBean (used by console to allow creation of new managed objects). |
protected void |
setAddressEntryShadow(java.lang.String classname)
Set address shadow class name. |
void |
setAgentPingInterval(long intr)
Set agent ping interval, in milliseconds. |
boolean |
setAttributeValue(java.lang.String id,
DataValue val)
Set value of attribute with given ID |
boolean |
setAutoAddEnabled(boolean enab)
Change setting of auto-add feature : subclasses should replace thid method with their own implementations. |
void |
setAutoClientSecure(boolean enab)
Set automatic secure of unsecure clients option, if supported |
protected void |
setClientSecureSupport(boolean supported)
Set support for client secure/unsecure feature |
void |
SetDiscoveryInterval(long intr)
Set automatic discovery interval, in milliseconds |
protected void |
SetDiscoverySupported(boolean flg)
Set discovery supported flag |
protected void |
setEditObjectClassname(java.lang.String edit_classname)
Set name of edit-object JavaBean (used by console to allow edit of existing managed objects). |
protected void |
setFilterImageSet(long flt_imgset)
Set default filter image set object ID |
void |
setImageSet(int oid)
Set image set. |
protected void |
setLicenseProductCode(int code)
Set license product code for managed objects |
void |
setMorphInterval(long intr)
Set morph interval, in milliseconds. |
void |
setName(java.lang.String newName)
Set name to literal value (no resource bundle) |
void |
setName(java.lang.String newNameKey,
java.lang.String newResourceBundle)
Set name key for this instance. |
void |
SetObjectID(long oid)
Set object ID. |
void |
setPingInterval(long intr)
Set ping interval, in milliseconds. |
protected void |
setPingType(int pingType)
Set ping type. |
static void |
startDiscoveryDaemon()
Start automatic discovery timer object |
void |
StartDiscoveryPass()
Start a discovery pass: operation should return quickly, with actual discovery logic not being completed before the method returns. |
boolean |
startPing()
Default ping method for managed object factory. |
static void |
stopDiscoveryDaemon()
Stop automatic discovery timer object |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
UpdateShadowVersion()
Update object state version. |
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 |
public static final byte INSTANCE_OF_CALLBACK
public static final byte INSTANCE_OF_NO_RESPONSE
public static final byte INSTANCE_OF_YES
public static final byte INSTANCE_OF_NO
Constructor Detail |
public TWGManagedObjectFactory() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if classname can't be loadedpublic TWGManagedObjectFactory(java.lang.String m_o_cname) throws java.lang.ClassNotFoundException
m_o_cname
- - TWGManagedObject classname associated with factory
java.lang.ClassNotFoundException
- if classname can't be loadedMethod Detail |
public java.lang.String toString()
Object.toString()
public void Delete()
Delete
in class TWGObject
public void SetObjectID(long oid) throws DuplicateObjectIDException
SetObjectID
in class TWGObject
oid
- - new object ID, or INVALID_OBJECT_ID if none
DuplicateObjectIDException
- if ID is duplicatepublic static void initialize() throws ManagedObjectFactoryInitException
ManagedObjectFactoryInitException
- if error during initpublic static void DumpMOFTree()
public static TWGManagedObject findManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
protected TWGManagedObject getManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
fingerprint
- - managed object fingerprint
public static TWGManagedObjectFactory GetFactoryForManagedObject(java.lang.String mo_classname)
mo_classname
- - name of TWGManagedObject subclass
public static TWGManagedObjectFactory GetFactoryForManagedObject(TWGManagedObject mo)
mo
- - TWGManagedObject instance
public static void ActivateAll() throws ManagedObjectFactoryActivateException
ManagedObjectFactoryActivateException
- if activation
failedprotected void Activate() throws ManagedObjectFactoryActivateException
ManagedObjectFactoryActivateException
- if an error
prevents proper activation of the factory.public static void DeactivateAll() throws ManagedObjectFactoryDeactivateException
ManagedObjectFactoryActivateException
- if deactivation
failed
ManagedObjectFactoryDeactivateException
protected void Deactivate() throws ManagedObjectFactoryDeactivateException
ManagedObjectFactoryDeactivateException
- if an error
prevents proper deactivation of the factory.public boolean DiscoverySupported()
protected void SetDiscoverySupported(boolean flg)
flg
- - set to true if discovery supported, else falsepublic long DiscoveryInterval()
public void SetDiscoveryInterval(long intr)
intr
- - new interval, in millisecondspublic static long ProcessAllAutoDiscovery()
public static void ProcessAllImmedDiscovery()
public static void ProcessAllImmedDiscovery(LongValueSet mof_ids)
public void StartDiscoveryPass() throws ManagedObjectFactoryDiscoverException
ManagedObjectFactoryDiscoverException
- if error starting
discovery passprotected void saveData(TWGPersistentObjectDictionary dictionary) throws TWGPersistentObjectSaveException
saveData
in class TWGPersistentObject
TWGPersistentObjectSaveException
- if error on saveprotected void restoreData(TWGPersistentObjectDictionary dictionary, boolean resolveObjectReferences) throws TWGPersistentObjectRestoreException
restoreData
in class TWGPersistentObject
resolveObjectReferences
- used to indicate if object references should be resolved during restore.
TWGPersistentObjectRestoreException
- if restore errorpublic static IntValueSet getTaskListAsIds(java.lang.String mofClassName) throws ManagedObjectFactoryUnregisteredClassException
mofClassName
- - TWGManagedObjectFactory class name to query.
ManagedObjectFactoryUnregisteredClassException
- if
classname not currently registered with managed object factory.public IntValueSet getTaskListAsIds()
public static void addMoClassAssociation(java.lang.String mo_cname, int oid)
mo_cname
- - TWGManagedObject class name supported by
TWGManagedObjectFactory to
add the specified managed object association.oid
- Managed object ID to be removed.public static void removeMoClassAssociation(java.lang.String mo_cname, int oid)
mo_cname
- TWGManagedObject class name supported by
TWGManagedObjectFactory from which to
remove the specified managed object association.oid
- Managed object ID to be removed.public java.lang.String getName(java.util.Locale locale)
locale
- Locale to be used for the name look-up.
public java.lang.String getName()
public void setName(java.lang.String newNameKey, java.lang.String newResourceBundle)
newNameKey
- Resource key for name to be given to this instance.newResourceBundle
- Name of resource bundle (or null if none)public void setName(java.lang.String newName)
newName
- Name string for instancepublic java.lang.String getNameKey()
public java.lang.String getResourceBundle()
public void UpdateShadowVersion()
UpdateShadowVersion
in interface TWGBaseShadowedObject
public long GetShadowVersion()
GetShadowVersion
in interface TWGBaseShadowedObject
public java.lang.String GetConShadowClass()
GetConShadowClass
in interface TWGBaseShadowedObject
public byte[] GetShadowRecord(java.util.Locale locale)
GetShadowRecord
in interface TWGBaseShadowedObject
locale
- - Locale of requested data
public boolean getPingSupported()
public void clearPingInterval()
public long getPingInterval()
public long getPingInterval(boolean traverseParent)
traverseParent
- TRUE: class chain will be traversed until
a non-deferred ping interval is found. FALSE: Parent chain
is not traversed. Instance ping interval is returned.
public void setPingInterval(long intr)
intr
- - new interval, in millisecondspublic void setAgentPingInterval(long intr)
intr
- - new interval, in millisecondspublic long getAgentPingInterval()
public long getMorphInterval()
public void setMorphInterval(long intr)
intr
- new interval (in milliseconds)public StringValueSet getDatabaseList()
public StringValueSet getDatabaseList(boolean traverseParent)
traverseParent
- TRUE: the returned database table list will
include all parent lists. FALSE: Return only the table list
associated with this MOF instance.
public void addDatabaseList(java.lang.String tableName)
tableName
- Name of the database table. Duplicates are not checked for.public void emptyDatabaseList()
public byte instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf, TWGManagedObject mo)
mofInstanceOf
- Reference to TWGMofInstanceOf callback interface object.mo
- Reference of managed object instance to be tested.public int[] getAllAssociatedManagedObjectIDs()
public void setImageSet(int oid)
public int getImageSet()
protected void setAddressEntryShadow(java.lang.String classname)
classname
- - name of AddressEntryShadow class (null = none)public java.lang.String getAddressEntryShadow()
public static byte[] getAddressEntryRecord(TWGManagedObject obj)
obj
- - Managed object to request address encoding for
protected byte[] getOurAddressEntryRecord(TWGManagedObject obj)
obj
- - Managed object to request address encoding for
public static TWGManagedObjectFactory findFactoryForManagedObject(TWGManagedObject obj)
obj
- - object whose factory is to be found
public static TWGManagedObjectFactory findFactoryForManagedObject(java.lang.String className)
public boolean isRootMOF()
public static TWGManagedObjectFactory[] getMOFInstances()
public java.lang.String getManagedObjectClassname()
public static java.util.Vector getTreeOrderedMOFList()
public TWGManagedObjectFactory getParentMOF()
public static TWGManagedObjectFactory getRootMOF()
public static IntValueSet getManagedObjectSetAsIds(java.lang.String mofClassName, boolean includeChildren) throws ManagedObjectFactoryUnregisteredClassException
mofClassName
- Name of target managed object factory.includeChildren
- TRUE: include managed object instances
for all child managed object factory classes. FALSE: return only
managed object instances for the specified managed object factory
class.
ManagedObjectFactoryUnregisteredClassException
- if
classname not currently registered with managed object factory.public IntValueSet getManagedObjectSetAsIds(boolean includeChildren)
includeChildren
- TRUE: include managed object instances
for all child managed object factory classes. FALSE: return only
managed object instances for the specified managed object factory
class.
ManagedObjectFactoryUnregisteredClassException
- if
classname not currently registered with managed object factory.public IntValueSet getChildMOFSetAsIds()
public static IntValueSet getAllManagedObjectSetAsIds()
public int[] getParentMofIds()
public java.lang.String[] getAttributeIDList()
getAttributeIDList
in interface TWGGetSetInterface
public DataValue getAttributeValue(java.lang.String id, java.util.Locale loc)
getAttributeValue
in interface TWGGetSetInterface
id
- - attribute ID requestedloc
- - locale to use for value, if applicable
public boolean setAttributeValue(java.lang.String id, DataValue val)
setAttributeValue
in interface TWGGetSetInterface
id
- - attribute ID to be setval
- - attribute value to be set
public int getAttributeType(java.lang.String id)
getAttributeType
in interface TWGGetSetInterface
id
- - attribute ID
public int getPingType()
protected void setPingType(int pingType)
pingType
- Current ping type for instance.
See TWGPing class documentation.
TWGPing.PING_TYPE_NOT_SUPPORTED
TWGPing.PING_TYPE_SERVER_DRIVES_INDIVIDUAL
TWGPing.PING_TYPE_AGENT_DRIVES_INDIVIDUALpublic boolean startPing()
public static void addTask(java.lang.String mo_classname, TWGTask task) throws TWGPersistentObjectSaveException
mo_classname
- - name of managed object classtask
- - Task object reference to be added to the task list.
TWGPersistentObjectSaveException
- if error during updatepublic static void addTask(java.lang.String mo_classname, long task_oid) throws TWGPersistentObjectSaveException
mo_classname
- - name of managed object classtask_oid
- - task object ID to be added
TWGPersistentObjectSaveException
- if error during updatepublic void addTask(TWGTask task)
task
- Task object reference to be added to the task list.public void addTask(long task_oid)
task_oid
- - task object ID to be addedpublic void removeTask(TWGTask task)
task
- Task object reference to be removed.public void removeTask(long task_oid)
task_oid
- - object identity of taskpublic int getTaskListSize()
public boolean containsTask(long taskOid)
taskOid
- Task object ID to search for existance.
public boolean containsTask(TWGTask task)
task
- Task object to search for existance.
protected void setFilterImageSet(long flt_imgset)
flt_imgset
- - image set object ID for default filterpublic long getFilterImageSet()
public static java.lang.String[] getAllManagedObjectClassNames()
public static LongKeyTable getAllManagedObjectClassNamesAndOIDs()
public static StringValueSet findDatabaseTables(java.lang.String mo_class)
mo_class
- - name of managed object class
public static void associateDatabaseTable(java.lang.String mo_class, java.lang.String db_class)
mo_class
- - managed object classdb_class
- - database class to be associated with mo_classprotected void setAddObjectClassname(java.lang.String add_classname)
add_classname
- - name of add-object JavaBeanprotected void setEditObjectClassname(java.lang.String edit_classname)
edit_classname
- - name of edit-object JavaBeanprotected void setLicenseProductCode(int code)
code
- - product code (0=none)public final boolean getLicense(TWGManagedObject mo)
mo
- - managed object to get licenses for
public final void freeLicense(TWGManagedObject mo)
mo
- - managed object to release licenses forpublic final boolean licenseRequired()
public void setAutoClientSecure(boolean enab)
enab
- - true if enable, false if disablepublic boolean isAutoClientSecureEnabled()
protected void setClientSecureSupport(boolean supported)
supported
- - true if feature supported, false if notpublic boolean getAutoAddSupported()
public boolean getAutoAddEnabled()
public boolean setAutoAddEnabled(boolean enab)
enab
- - true if enabled, false if disabled
public static void startDiscoveryDaemon()
public static void stopDiscoveryDaemon()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |