com.tivoli.twg.snmp
Class TWGRemoteMIB

java.lang.Object
  extended bycom.tivoli.twg.snmp.TWGRemoteMIB

public class TWGRemoteMIB
extends java.lang.Object

This class will allow access to the MIB resources on the Director Server.

It allows looking up information for a particular OID, and compilation of a new MIB into the repository on the server.

See Also:
TWGMIBItem2

Constructor Summary
TWGRemoteMIB()
          Construct An an instance of the remote services.
 
Method Summary
protected  void finalize()
           
 java.lang.String formatOID(java.lang.String oid)
          This method will take a dotted decimal string and return the last readable equivalent based on the MIB respository.
 boolean MIBCompile(java.lang.String mibFileName)
          Used to submit a MIB file on the host machine to the server for compilation.
 boolean MIBCompileAsync(java.lang.String mibFileName)
          INTERNAL USE ONLY
 TWGMIBItem2 OIDLookup(java.lang.String OID)
          Used to retrieve information about a particular OID from the repository on the server.
 TWGMIBItem2 trapLookup(java.lang.String trapOID)
          Used to retrieve information about a particular trap from the repository on the server.
 TWGMIBItem2 typeLookup(java.lang.String typeName)
          Used to retrieve information about a particular type from the repository on the server.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGRemoteMIB

public TWGRemoteMIB()
Construct An an instance of the remote services. It will attempt to initialize communications with the Director Server.

Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

OIDLookup

public TWGMIBItem2 OIDLookup(java.lang.String OID)
Used to retrieve information about a particular OID from the repository on the server.

Parameters:
OID - the OID of the attribute for which information is desired. This should be in dotted decimal notation, for example: 1.2.3.4.5
Returns:
TWGMIBItem2: The information about the OID, or null if the OID was not found in the the servers MID repository.

typeLookup

public TWGMIBItem2 typeLookup(java.lang.String typeName)
Used to retrieve information about a particular type from the repository on the server.

Parameters:
typeName - the type name of the attribute for which information is desired.
Returns:
TWGMIBItem2: information about the type, or null if the type name was not found in the the servers MID repository.

trapLookup

public TWGMIBItem2 trapLookup(java.lang.String trapOID)
Used to retrieve information about a particular trap from the repository on the server.

Parameters:
trapOID - the trap OID of the attribute for which information is desired. This should be in dotted decimal notation, for example: 1.2.3.4.5
Returns:
TWGMIBItem2: information about the trap OID, or null if the trap OID was not found in the the servers MID repository.

formatOID

public java.lang.String formatOID(java.lang.String oid)
This method will take a dotted decimal string and return the last readable equivalent based on the MIB respository. So "1.3.6.1" would become "internet". OIDs for which can not be completely resolved will be returned as the nearest possible resolution. So "1.3.6.1.5" would come back as "internet.5".

Parameters:
oid - the dotted decimal string to translate
Returns:
a string containing the OID translated as must as possible

MIBCompile

public boolean MIBCompile(java.lang.String mibFileName)
Used to submit a MIB file on the host machine to the server for compilation. Once compiled, the information contained in the MIB will become available to all queries using OIDLookup(). The file MUST be accessible on the host machine, NOT the server. This Method will not return to the caller until after the compilation has been completed on the server.

Returns:
boolean, The status of the operation.

MIBCompileAsync

public boolean MIBCompileAsync(java.lang.String mibFileName)
INTERNAL USE ONLY

Used to submit a MIB file on the host machine to the server for compilation. Once compiled, the information contained in the MIB will become available to all queries using OIDLookup(). The file MUST be accessible on the host machine, NOT the server. This Method differs from MIBCompile() in that it will return immediately, only providing the status of the transmition of the MIB file to the server, the compilation may not have completed.

Returns:
boolean, The status of the operation.