|
|||||||||||
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.TWGManagedObject
com.tivoli.twg.snmp.TWGSNMPDevice
This class represents a base level SNMP Device. This is the class that all other TWGSNMPxxxx device types are derived from. It represents the existance of an SNMP agent at a particular IP address, and the existance of at least part of MIB II.
SNMP
,
SNMPContext
,
SNMPPDU
,
SNMPEntity
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME
|
protected static com.tivoli.twg.snmp.TWGSNMPDeviceTracker |
deviceTracker
|
protected static com.tivoli.twg.snmp.SNMPDisc |
Engine
|
protected static SNMP |
Stack
|
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 | |
---|---|
TWGSNMPDevice()
INTERNAL USE ONLY Construct A TWGSNMPDevice instance into the system. |
|
TWGSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks,
com.tivoli.twg.snmp.SNMPDeviceData deviceData)
Construct A TWGSNMPDevice instance into the system. |
|
TWGSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks,
java.lang.String context,
int subNet)
Deprecated. Use one of the above |
|
TWGSNMPDevice(java.lang.String address,
java.lang.String context,
int subNet)
Construct a TWGSNMPDevice instance into the system. |
Method Summary | |
---|---|
protected void |
advanceCurrentAddressInUse()
Increment the index of the current address in use |
protected static TWGSNMPDevice |
CheckAdd(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks,
com.tivoli.twg.snmp.SNMPDeviceData deviceData)
Check for the object passed in. |
protected void |
copyTo(TWGManagedObject managedObject)
Copy instance data to another managed object. |
void |
Delete()
INTERNAL USE ONLY Destructor for TWGSNMPDevice: remove object from lists |
void |
Destroy()
INTERNAL USE ONLY Destroy for TWGSNMPDevice: send delete to NetMgr |
static void |
DiscoveryStart()
INTERNAL USE ONLY |
protected static boolean |
exists(byte[] engineID)
Check to see if a particular address is already known. |
java.lang.String |
GetAddress()
Query the IP address of this SNMP Device. |
com.tivoli.twg.snmp.SNMPAddressBlock[] |
GetAddressList()
Query the IP address list of this SNMP Device. |
java.lang.String |
getAttributeDescription(java.lang.String id,
java.util.Locale loc)
Get description string for given attribute in given locale |
java.lang.String[] |
getAttributeIDList()
Attribute ID enumeration : this method is expected to return 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 |
java.lang.String |
getAttributeValueString(java.lang.String id,
java.util.Locale loc)
Get descriptive value string for given attribute in given locale. |
java.lang.String |
GetContext()
Query the Context (Community Name) of this SNMP Device. |
static long |
GetCount()
Deprecated. use TWGSNMPDeviceObjectFactory.getManagedObjectSetAsIds |
static TWGSNMPDevice |
GetDeviceFromID(long ID)
Locate the instance of an SNMP Device by Object ID. |
long |
GetDeviceID()
Used to retrieve the Object ID assigned to this object by Director. |
byte[] |
getEngineID()
Query the SnmpEngineID of this SNMP Device. |
com.tivoli.twg.engine.TWGManagedObjectFingerprint |
getFingerprint()
Get fingerprint. |
byte[] |
getOurAddressEntryRecord()
INTERNAL USE ONLY |
protected static TWGSNMPDevice |
GetSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
Locate the instance of an SNMP Device by its address. |
static TWGSNMPDevice |
GetSNMPDevice(java.lang.String address)
Deprecated. |
protected static int |
getSNMPDeviceID(byte[] engineID)
Check to see if a particular address is an SNMP Device, and if so, what device ID has been assigned to it. |
protected static int |
GetSNMPDeviceID(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
Check to see if a particular address is an SNMP Device, and if so, what device ID has been assigned to it. |
protected static int |
GetSNMPDeviceID(java.lang.String address)
Check to see if a particular address is an SNMP Device, and if so, what device ID has been assigned to it. |
static com.tivoli.twg.snmp.SNMPDisc |
GetSNMPDiscEngine()
INTERNAL USE ONLY |
static SNMP |
GetSNMPStack()
Acquire a reference to an instance of the default SNMP stack in use by this JVM. |
void |
GetSubNetMask()
Deprecated. Does nothing |
java.lang.String |
GetTitle()
Return the title used for this SNMP Device |
int |
getVersion()
Get the SNMP version for this device |
static boolean |
Initialize()
INTERNAL USE ONLY |
boolean |
isEncryptionEnabled()
Test if managed object 'encryption enabled' flag is set |
boolean |
IsIP()
Deprecated. always returns true |
void |
managedObjectChanged(TWGManagedObject managedObject,
int reason)
Implemented method as part of the TWGManagedObjectLifeCycleListener |
void |
managedObjectCreated(TWGManagedObject managedObject)
Implemented method as part of the TWGManagedObjectLifeCycleListener |
void |
managedObjectDestroyed(TWGManagedObject managedObject)
Implemented method as part of the TWGManagedObjectLifeCycleListener |
protected void |
PingStatusChange(boolean responded)
INTERNAL USE ONLY |
protected void |
restoreData(TWGPersistentObjectDictionary dictionary,
boolean resolveObjectReferences)
INTERNAL USE ONLY Method for restoring persistent object data. |
protected void |
saveData(TWGPersistentObjectDictionary dictionary)
INTERNAL USE ONLY Method for saving persistent object data. |
protected boolean |
SetAddressList(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
Change the IP address list of this SNMP Device. |
boolean |
setAttributeValue(java.lang.String id,
DataValue val)
Set value of attribute with given ID |
boolean |
SetContext(java.lang.String context)
Change the Context (Community Name) of this SNMP Device. |
void |
SetObjectID(long oid)
INTERNAL USE ONLY |
int |
SetPingRetries(int retries)
Deprecated. Does nothing, always returns zero |
int |
SetPingTimeout(int timeout)
Deprecated. Does nothing, always returns zero |
void |
SetSubnetMask(int mask)
Deprecated. Does nothing |
void |
SetSubnetMask(java.lang.String mask)
Deprecated. Does nothing |
void |
SetTitle(java.lang.String title)
Set the title used for this SNMP Device |
protected boolean |
setVersion(int newVersion)
Set the SNMP version for this device. |
static void |
ShutDown()
INTERNAL USE ONLY |
boolean |
startPing()
Start a ping on this SNMP Device. |
boolean |
startPingWithReauthenticate()
Default ping with reauthenticate method for SNMP device. |
java.lang.String |
SubnetMask()
Deprecated. Does nothing, always returns null |
int |
SubnetMaskRaw()
Deprecated. always returns zero |
Methods inherited from class com.tivoli.twg.engine.TWGPersistentObject |
---|
enableAsyncWrites, fromPersistID, initialize, 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 java.lang.String CLASSNAME
protected static com.tivoli.twg.snmp.TWGSNMPDeviceTracker deviceTracker
protected static SNMP Stack
protected static com.tivoli.twg.snmp.SNMPDisc Engine
Constructor Detail |
public TWGSNMPDevice(java.lang.String address, java.lang.String context, int subNet)
address
- An IP address, in string format.context
- An SNMP V1 Community name.subNet
- The subnet on which this device exists.public TWGSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks, com.tivoli.twg.snmp.SNMPDeviceData deviceData)
addressBlocks
- An array of addressing information.public TWGSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks, java.lang.String context, int subNet)
addressBlocks
- An array of addressing information.context
- An SNMP V1 Community name.subNet
- The subnet on which this device exists.public TWGSNMPDevice()
Method Detail |
public void managedObjectCreated(TWGManagedObject managedObject)
managedObjectCreated
in interface TWGManagedObjectLifeCycleListener
managedObject
- - Reference to newly created TWGManagedObjectTWGManagedObjectLifeCycleListener
public void managedObjectDestroyed(TWGManagedObject managedObject)
managedObjectDestroyed
in interface TWGManagedObjectLifeCycleListener
managedObject
- - Reference to TWGManagedObject to be deletedTWGManagedObjectLifeCycleListener
public void managedObjectChanged(TWGManagedObject managedObject, int reason)
managedObjectChanged
in interface TWGManagedObjectLifeCycleListener
managedObject
- - Reference to modified TWGManagedObjectreason
- - reason for change notificationTWGManagedObjectLifeCycleListener
public boolean IsIP()
protected void copyTo(TWGManagedObject managedObject)
copyTo
in class TWGManagedObject
managedObject
- target managed object.public void SetObjectID(long oid) throws DuplicateObjectIDException
SetObjectID
in class TWGManagedObject
oid
- - new object ID, or INVALID_OBJECT_ID if none
DuplicateObjectIDException
- if ID is duplicatepublic final long GetDeviceID()
public static final boolean Initialize() throws TWGSNMPException
TWGSNMPException
public static final void DiscoveryStart() throws TWGSNMPException
TWGSNMPException
public static final void ShutDown()
public final java.lang.String GetTitle()
public final void SetTitle(java.lang.String title)
title
- The new title to use when representing this SNMP Device
throughout the system.public static final SNMP GetSNMPStack()
public static final com.tivoli.twg.snmp.SNMPDisc GetSNMPDiscEngine()
public boolean startPing()
startPing
in class TWGManagedObject
public boolean startPingWithReauthenticate()
startPingWithReauthenticate
in class TWGManagedObject
public final void GetSubNetMask()
public final int SetPingRetries(int retries)
retries
- the new retry count
public final int SetPingTimeout(int timeout)
timeout
- the new Ping timeout value, in Msecs
protected final void PingStatusChange(boolean responded)
public static long GetCount()
protected static boolean exists(byte[] engineID)
engineID
- snmpEngineID of device
protected static int GetSNMPDeviceID(java.lang.String address)
address
- a dotted decimal version of an IP address
protected static int GetSNMPDeviceID(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
addressBlocks
- address block array
protected static int getSNMPDeviceID(byte[] engineID)
engineID
- snmpEngineID of device
protected static final TWGSNMPDevice CheckAdd(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks, com.tivoli.twg.snmp.SNMPDeviceData deviceData)
addressBlocks
- array of SNMPAddressBlocks containing address information
public static TWGSNMPDevice GetSNMPDevice(java.lang.String address)
protected static TWGSNMPDevice GetSNMPDevice(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
addressBlocks
-
public static TWGSNMPDevice GetDeviceFromID(long ID)
ID
- a managed object identifier
public java.lang.String GetAddress()
protected void advanceCurrentAddressInUse()
public com.tivoli.twg.snmp.SNMPAddressBlock[] GetAddressList()
protected boolean SetAddressList(com.tivoli.twg.snmp.SNMPAddressBlock[] addressBlocks)
addressBlocks
-
public int getVersion()
protected boolean setVersion(int newVersion)
public java.lang.String GetContext()
public boolean SetContext(java.lang.String context)
context
- the new context (Community Name) for this SNMP Device
public byte[] getEngineID()
public final int SubnetMaskRaw()
public final java.lang.String SubnetMask()
public final void SetSubnetMask(int mask)
mask
- int New Sub-net to store for this SNMP Devicepublic final void SetSubnetMask(java.lang.String mask)
mask
- int New Sub-net to store for this SNMP Deviceprotected void saveData(TWGPersistentObjectDictionary dictionary) throws TWGPersistentObjectSaveException
saveData
in class TWGManagedObject
dictionary
- used to collect persistent object.
TWGPersistentObjectSaveException
- thrown to abort save procedure.protected void restoreData(TWGPersistentObjectDictionary dictionary, boolean resolveObjectReferences) throws TWGPersistentObjectRestoreException
restoreData
in class TWGManagedObject
dictionary
- used to restore persistent object.resolveObjectReferences
- used to indicate if object references should be
resolved during restore.
TWGPersistentObjectRestoreException
- thrown to abort restore procedure.public void Delete()
Delete
in class TWGManagedObject
public void Destroy() throws TWGObjectDestroyException
Destroy
in class TWGManagedObject
TWGObjectDestroyException
- if error during destroypublic java.lang.String[] getAttributeIDList()
getAttributeIDList
in interface TWGGetSetInterface
getAttributeIDList
in class TWGManagedObject
public DataValue getAttributeValue(java.lang.String id, java.util.Locale loc)
getAttributeValue
in interface TWGGetSetInterface
getAttributeValue
in class TWGManagedObject
id
- - attribute ID requestedloc
- - locale to use for value, if applicable
public boolean setAttributeValue(java.lang.String id, DataValue val)
setAttributeValue
in interface TWGGetSetInterface
setAttributeValue
in class TWGManagedObject
id
- - attribute ID to be setval
- - attribute value to be set
public int getAttributeType(java.lang.String id)
getAttributeType
in interface TWGGetSetInterface
getAttributeType
in class TWGManagedObject
id
- - attribute ID
public java.lang.String getAttributeDescription(java.lang.String id, java.util.Locale loc)
getAttributeDescription
in interface TWGGetSetDescInterface
getAttributeDescription
in class TWGManagedObject
id
- - attribute IDloc
- - locale to use for description
public java.lang.String getAttributeValueString(java.lang.String id, java.util.Locale loc)
getAttributeValueString
in interface TWGGetSetDescInterface
getAttributeValueString
in class TWGManagedObject
id
- - attribute IDloc
- - locale to use for description
public boolean isEncryptionEnabled()
isEncryptionEnabled
in class TWGManagedObject
public com.tivoli.twg.engine.TWGManagedObjectFingerprint getFingerprint()
getFingerprint
in class TWGManagedObject
public byte[] getOurAddressEntryRecord()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |