com.tivoli.twg.snmp
Class TWGSNMPDeviceObjectFactory

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.snmp.TWGSNMPDeviceObjectFactory
All Implemented Interfaces:
TWGBaseShadowedObject, TWGGetSetInterface, TWGShadowedObject

public class TWGSNMPDeviceObjectFactory
extends TWGManagedObjectFactory

Base class for representing the managed object factory for SNMP clients.


Field Summary
protected static java.lang.String[] FILTER_SET
           
protected static java.lang.String[] IMAGE_SET
           
static java.lang.String MO_CLASS
           
 
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
TWGSNMPDeviceObjectFactory()
          INTERNAL USE ONLY
TWGSNMPDeviceObjectFactory(java.lang.String m_o_cname)
          INTERNAL USE ONLY
 
Method Summary
protected  void Activate()
          INTERNAL USE ONLY
 void Deactivate()
          INTERNAL USE ONLY
static java.lang.String[] getAllProfileNames()
          This method returns all of the SNMPv3 user profile names stored.
 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.
static short getDefaultVersion()
          Returns the default version of SNMP to use for communication.
static com.tivoli.twg.snmp.TWGSnmpDiscoveryData GetDiscoveryData()
          INTERNAL USE ONLY
static TWGSNMPDeviceObjectFactory GetFactory()
          Get instance of native managed object factory
protected  TWGManagedObject getManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
          Get managed object by managed object fingerprint
protected  byte[] getOurAddressEntryRecord(TWGManagedObject obj)
          Address entry record support method.
static com.tivoli.twg.snmp.SNMPv3Profile getProfileData(java.lang.String profileName)
          This method returns the SNMPv3 user profile data for the given profile name.
static com.tivoli.twg.snmp.TWGSnmpTrapObserver GetTrapObserver()
          Get the instance of the TWGSnmpTrapObserver used by the Director Server
 byte instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf, TWGManagedObject mo)
          Test a managed object instance for inclusion into a managed object factory class.
protected  void restoreData(TWGPersistentObjectDictionary dictionary, boolean resolveObjectReferences)
          INTERNAL USE ONLY
protected  void saveData(TWGPersistentObjectDictionary dictionary)
          INTERNAL USE ONLY
 boolean setAutoAddEnabled(boolean enable)
          Change setting of auto-add feature : subclasses should replace this method with their own implementations.
static void SetDiscoveryData(com.tivoli.twg.snmp.TWGSnmpDiscoveryData newData)
          INTERNAL USE ONLY
 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, Delete, DiscoveryInterval, DiscoverySupported, DumpMOFTree, emptyDatabaseList, findDatabaseTables, findFactoryForManagedObject, findFactoryForManagedObject, findManagedObjectByFingerprint, freeLicense, getAddressEntryRecord, getAddressEntryShadow, getAgentPingInterval, getAllAssociatedManagedObjectIDs, getAllManagedObjectClassNames, getAllManagedObjectClassNamesAndOIDs, getAllManagedObjectSetAsIds, getAttributeIDList, getAttributeType, getAttributeValue, getChildMOFSetAsIds, GetConShadowClass, getDatabaseList, getDatabaseList, GetFactoryForManagedObject, GetFactoryForManagedObject, getFilterImageSet, getImageSet, getLicense, getManagedObjectClassname, getManagedObjectSetAsIds, getManagedObjectSetAsIds, getMOFInstances, getMorphInterval, getName, getName, getNameKey, getParentMOF, getParentMofIds, getPingInterval, getPingInterval, getPingSupported, getPingType, getResourceBundle, getRootMOF, GetShadowRecord, GetShadowVersion, getTaskListAsIds, getTaskListAsIds, getTaskListSize, getTreeOrderedMOFList, initialize, isAutoClientSecureEnabled, isRootMOF, licenseRequired, ProcessAllAutoDiscovery, ProcessAllImmedDiscovery, ProcessAllImmedDiscovery, removeMoClassAssociation, removeTask, removeTask, setAddObjectClassname, setAddressEntryShadow, setAgentPingInterval, setAttributeValue, 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
See Also:
Constant Field Values

IMAGE_SET

protected static final java.lang.String[] IMAGE_SET

FILTER_SET

protected static final java.lang.String[] FILTER_SET
Constructor Detail

TWGSNMPDeviceObjectFactory

public TWGSNMPDeviceObjectFactory()
                           throws java.lang.ClassNotFoundException
INTERNAL USE ONLY

Default constructor

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

TWGSNMPDeviceObjectFactory

public TWGSNMPDeviceObjectFactory(java.lang.String m_o_cname)
                           throws java.lang.ClassNotFoundException
INTERNAL USE ONLY

Constructor for creating a subclass of this factory.

Parameters:
m_o_cname - - TWGManagedObject classname associated with factory
Throws:
java.lang.ClassNotFoundException - if MO class not loaded
Method Detail

GetFactory

public static TWGSNMPDeviceObjectFactory GetFactory()
Get instance of native managed object factory

Returns:
TWGSNMPDeviceObjectFactory instance

GetTrapObserver

public static com.tivoli.twg.snmp.TWGSnmpTrapObserver GetTrapObserver()
Get the instance of the TWGSnmpTrapObserver used by the Director Server

Returns:
TWGSnmpTrapObserver instance

Activate

protected void Activate()
                 throws ManagedObjectFactoryActivateException
INTERNAL USE ONLY

Activate the topology processing.

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

getAutoAddSupported

public boolean getAutoAddSupported()
Indicates if auto-add of unknown clients is supported : subclasses should replace this method to return 'true' if feature is supported. Default implementation returns false.

Overrides:
getAutoAddSupported in class TWGManagedObjectFactory
Returns:
boolean true if auto-add feature is supported

getAutoAddEnabled

public boolean getAutoAddEnabled()
Returns current setting of Auto-Add feature : subclasses should replace this method with their own implementations.

Overrides:
getAutoAddEnabled in class TWGManagedObjectFactory
Returns:
boolean true if enabled, false if not (default)

setAutoAddEnabled

public boolean setAutoAddEnabled(boolean enable)
Change setting of auto-add feature : subclasses should replace this method with their own implementations.

Overrides:
setAutoAddEnabled in class TWGManagedObjectFactory
Parameters:
enable - - true if enabled, false if disabled
Returns:
boolean new setting (false if not implemented)

Deactivate

public void Deactivate()
INTERNAL USE ONLY

Deactivate the topology processing

Overrides:
Deactivate in class TWGManagedObjectFactory

StartDiscoveryPass

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

Overrides:
StartDiscoveryPass in class TWGManagedObjectFactory
Throws:
ManagedObjectFactoryDiscoverException - if error starting discovery pass

instanceOf

public byte instanceOf(com.tivoli.twg.engine.TWGMofInstanceOf mofInstanceOf,
                       TWGManagedObject mo)
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 instace belongs. This method should bve inplemented by all managed object factory extension classes.

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

getManagedObjectByFingerprint

protected TWGManagedObject getManagedObjectByFingerprint(com.tivoli.twg.engine.TWGManagedObjectFingerprint fingerprint)
Get managed object by managed object fingerprint

Overrides:
getManagedObjectByFingerprint in class TWGManagedObjectFactory
Parameters:
fingerprint - - managed object fingerprint
Returns:
managed object, or null if not found

getOurAddressEntryRecord

protected byte[] getOurAddressEntryRecord(TWGManagedObject obj)
Address entry record support method. This method generates a single record encoding to be interpreted by TWGNativeAddressEntry. The record simply consists of the compressed unicode encoding of the current best IPC path. should be subclassed by MOF subclasses in order to provide support for encoding address records. Each address record must consist of a list of records (1 or more), ordered from superclass to subclass, with each record consisting of an overall record length (SHORT) and a magic number (SHORT), followed by class-specific data.

Overrides:
getOurAddressEntryRecord in class TWGManagedObjectFactory
Parameters:
obj - - Managed object to request address encoding for
Returns:
byte array containing encoded address record, or null no support

GetDiscoveryData

public static final com.tivoli.twg.snmp.TWGSnmpDiscoveryData GetDiscoveryData()
INTERNAL USE ONLY


SetDiscoveryData

public static final void SetDiscoveryData(com.tivoli.twg.snmp.TWGSnmpDiscoveryData newData)
INTERNAL USE ONLY


getDefaultVersion

public static final short getDefaultVersion()
Returns the default version of SNMP to use for communication.

Returns:
the default SNMP version

getAllProfileNames

public static final java.lang.String[] getAllProfileNames()
This method returns all of the SNMPv3 user profile names stored.

Returns:
array of profile names

getProfileData

public static final com.tivoli.twg.snmp.SNMPv3Profile getProfileData(java.lang.String profileName)
This method returns the SNMPv3 user profile data for the given profile name.

Parameters:
profileName - profile to get info on
Returns:
SNMPv3 profile data

saveData

protected void saveData(TWGPersistentObjectDictionary dictionary)
                 throws TWGPersistentObjectSaveException
INTERNAL USE ONLY

Method for saving persistent object data.

Overrides:
saveData in class TWGManagedObjectFactory
Throws:
TWGPersistentObjectSaveException - thrown to abort save procedure.

restoreData

protected void restoreData(TWGPersistentObjectDictionary dictionary,
                           boolean resolveObjectReferences)
                    throws TWGPersistentObjectRestoreException
INTERNAL USE ONLY

Method for restoring persistent object data.

Overrides:
restoreData in class TWGManagedObjectFactory
Parameters:
resolveObjectReferences - used to indicate if object references should be resolved during restore.
Throws:
TWGPersistentObjectRestoreException - thrown to abort restore procedure.