com.BobCo.snapins
Class SysDescrSnapIn

java.lang.Object
  extended bycom.BobCo.snapins.SysDescrSnapIn
All Implemented Interfaces:
com.tivoli.twg.snmp.SNMPRemoteResponse, com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

public class SysDescrSnapIn
extends java.lang.Object
implements com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2, com.tivoli.twg.snmp.SNMPRemoteResponse

The SystemSnapIn class is a sample SNMP info browser. It implements the TWGSNMPInfoBrowserInterface and is registered to display inforation about the sysDescr mib object.


Field Summary
 
Fields inherited from interface com.tivoli.twg.snmp.SNMPRemoteResponse
AUTHORIZATION_ERROR, BAD_VALUE, COMMIT_FAILED, DECODE_ERROR, GENERAL_ERROR, GET, GETBULK, GETNEXT, INCONSISTENT_NAME, INCONSISTENT_VALUE, INFORM, NO_ACCESS, NO_CREATION, NO_ERROR, NO_SUCH_NAME, NOT_WRITEABLE, READ_ONLY, RESOURCE_UNAVAILABLE, SEND_ERROR, SESSION_CLOSED, SET, TIMEOUT, TOO_BIG, UNDO_FAILED, WRONG_ENCODING, WRONG_LENGTH, WRONG_TYPE, WRONG_VALUE, WRONG_VERSION
 
Constructor Summary
SysDescrSnapIn()
          Constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to the snap-in.
 javax.swing.JPanel getDisplayWindow()
          The getDisplayWindow method is used to return a JPanel that will be displayed by the caller.
 com.tivoli.twg.snmp.TWGMIBItem2 getMIBItem()
          Retrieve the SNMP MIB Data object that is being displayed by the snap-in.
 int getStatus()
          Retrieve the current status of the snap-in.
 java.lang.String getStatusText()
          Retrieve a text string that describes the current status of the snap-in.
 com.tivoli.twg.guilibs.WindowAttributes getWindowAttributes()
          Retrieve the current window attributes
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener from the snap-in.
 void response(com.tivoli.twg.snmp.SNMPRemoteRequest caller, long moid, int requestType, long requestID, com.tivoli.twg.snmputils.VariableBinding[] vbl, long errorIndex)
           
 void setMIBItem(long moid, java.lang.String OID)
          Set the MIB info that the snap-in will display, no value.
 void setMIBItem(long moid, java.lang.String rawoid, java.lang.String OID)
          Set the MIB info that the snap-in will display, with value.
 void setMIBItem(long MOID, java.lang.String RawOID, java.lang.String OID, java.lang.String Value, com.tivoli.twg.libs.ServiceNode sn)
          For use with an old server.
 void setResp(int RC, java.lang.String OID, java.lang.Object Value)
          For use with an old server.
 void setStatus(int newStatus)
          Set the current status of the snap-in.
 void setStatusText(java.lang.String newStatusText)
          Set the current status text message for the snap-in.
 void setWindowAttributes(com.tivoli.twg.guilibs.WindowAttributes wa)
          This method is called by the parent of the snap-in to update the window attributes so that they match the rest of the current user console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SysDescrSnapIn

public SysDescrSnapIn()
Constructor. The snap-in interface requires a default constructor that does not have any parameters.

Method Detail

getDisplayWindow

public javax.swing.JPanel getDisplayWindow()
The getDisplayWindow method is used to return a JPanel that will be displayed by the caller. The snap-in is responsible for the contents and appearance of the panel.

Specified by:
getDisplayWindow in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

getStatus

public int getStatus()
Retrieve the current status of the snap-in. Status values should be one of the constants defined in TWGSNMPConstants.

Specified by:
getStatus in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

setStatus

public void setStatus(int newStatus)
Set the current status of the snap-in. Status values should be one of the constants defined in TWGSNMPConstants. After changing the status, any property change listeners are notified of the change.

Specified by:
setStatus in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2
Parameters:
newStatus - - a TWGSNMPConstants status value indicating the new status of the fino browser.

getStatusText

public java.lang.String getStatusText()
Retrieve a text string that describes the current status of the snap-in. This string may be used by the parent of the snap-in to update the status area at the bottom of the window.

Specified by:
getStatusText in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

setStatusText

public void setStatusText(java.lang.String newStatusText)
Set the current status text message for the snap-in.

Specified by:
setStatusText in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2
Parameters:
newStatusText - - the string that reflects the new status of the info browser.

getMIBItem

public com.tivoli.twg.snmp.TWGMIBItem2 getMIBItem()
Retrieve the SNMP MIB Data object that is being displayed by the snap-in.

Specified by:
getMIBItem in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2
See Also:
TWGMIBItem2

setMIBItem

public void setMIBItem(long moid,
                       java.lang.String rawoid,
                       java.lang.String OID)
Set the MIB info that the snap-in will display, with value.

Specified by:
setMIBItem in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

setMIBItem

public void setMIBItem(long moid,
                       java.lang.String OID)
Set the MIB info that the snap-in will display, no value.

Specified by:
setMIBItem in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

setMIBItem

public void setMIBItem(long MOID,
                       java.lang.String RawOID,
                       java.lang.String OID,
                       java.lang.String Value,
                       com.tivoli.twg.libs.ServiceNode sn)
For use with an old server. snap-ins are not allowed with old browser, but this has to be here anyway for use with the default browser

Specified by:
setMIBItem in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

setResp

public void setResp(int RC,
                    java.lang.String OID,
                    java.lang.Object Value)
For use with an old server. snap-ins are not allowed with old browser, but this has to be here anyway for use with the default browser


response

public void response(com.tivoli.twg.snmp.SNMPRemoteRequest caller,
                     long moid,
                     int requestType,
                     long requestID,
                     com.tivoli.twg.snmputils.VariableBinding[] vbl,
                     long errorIndex)
Specified by:
response in interface com.tivoli.twg.snmp.SNMPRemoteResponse

setWindowAttributes

public void setWindowAttributes(com.tivoli.twg.guilibs.WindowAttributes wa)
This method is called by the parent of the snap-in to update the window attributes so that they match the rest of the current user console.

Specified by:
setWindowAttributes in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

getWindowAttributes

public com.tivoli.twg.guilibs.WindowAttributes getWindowAttributes()
Retrieve the current window attributes

Specified by:
getWindowAttributes in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to the snap-in.

Specified by:
addPropertyChangeListener in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from the snap-in.

Specified by:
removePropertyChangeListener in interface com.tivoli.twg.snmp.TWGSNMPInfoBrowserInterface2