Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.snmp.beans
Class OneNTServiceBean

    java.lang.Object
      |
      +--uk.co.westhawk.snmp.beans.SNMPBean
            |
            +--uk.co.westhawk.snmp.beans.SNMPRunBean
                  |
                  +--uk.co.westhawk.snmp.beans.OneNTServiceBean

All Implemented Interfaces:
  java.util.Observer, java.lang.Runnable

public class OneNTServiceBean
extends SNMPRunBean
implements java.util.Observer

This bean collects information about one NT network service installed on a NT server. The NT mib is described in the LAN Manager MIB II for Windows NT Objects . You will have to register to the MSDN before accessing this page.

The properties in the parent classes should be set, before calling the action() method. Via a PropertyChangeEvent the application/applet will be notified.

Version:
  $Revision: 1.13 $ $Date: 2006/01/25 18:08:56 $
Author:
  Birgit Arkesteijn
See Also:
  `SNMPBean.setHost(java.lang.String)`, `SNMPBean.setPort(int)`, `SNMPBean.setCommunityName(java.lang.String)`, `SNMPRunBean.setUpdateInterval(int)`, `setIndex(String)`, `SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)`, `SNMPBean.action()`, `GetPdu_vec`, `NTServiceNamesBean`

Field Summary
`static int` | `can_be_paused`
`static int` | `can_be_uninstalled`
`static int` | `cannot_be_paused`
`static int` | `cannot_be_uninstalled`
`static java.lang.String[]` | `msg_inst_state`
`static java.lang.String[]` | `msg_oper_state`

Fields inherited from class uk.co.westhawk.snmp.beans.SNMPRunBean
`interval, me, running`

Fields inherited from class uk.co.westhawk.snmp.beans.SNMPBean
`bindAddr, community, context, host, message, port, propertyChangeListener, socketType`

Constructor Summary
`OneNTServiceBean()` The default constructor.
`OneNTServiceBean(java.lang.String h, int p)` The constructor that will set the host and the port no.
`OneNTServiceBean(java.lang.String h, int p, java.lang.String b)` The constructor that will set the host, the port no and the local bind address.

Method Summary
`void` | `action()` This method starts sending the SNMP request.
`boolean` | `getCanBePaused()` Returns if the NT network service can be paused.
`boolean` | `getCanBeUninstalled()` Returns if the NT network service can be uninstalled.
`java.lang.String` | `getIndex()` Returns the index of the NT network service.
`java.lang.String` | `getInstalledState()` Returns the installation status of the NT network service.
`java.util.Date` | `getLastUpdateDate()` Returns the date of the moment when this bean was last updated.
`java.lang.String` | `getName()` Returns the name of the NT network service.
`java.lang.String` | `getOperatingState()` Returns the operating status of the NT network service.
`void` | `run()` The run method according to the Runnable interface.
`void` | `setIndex(java.lang.String ind)` Sets the index of the NT network service that will be requested.
`void` | `update(java.util.Observable obs, java.lang.Object ov)` The update method according to the Observer interface, it will be called when the Pdu response is received.

Methods inherited from class uk.co.westhawk.snmp.beans.SNMPRunBean
`getUpdateInterval, isRunning, setRunning, setUpdateInterval, setUpdateInterval`

Methods inherited from class uk.co.westhawk.snmp.beans.SNMPBean
`addPropertyChangeListener, firePropertyChange, getBindAddress, getCommunityName, getHost, getMessage, getPort, getSocketType, isHostPortReachable, removePropertyChangeListener, setBindAddress, setCommunityName, setHost, setMessage, setPort, setPort, setSocketType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### msg_inst_state

    public static final java.lang.String[] msg_inst_state

### msg_oper_state

    public static final java.lang.String[] msg_oper_state

### cannot_be_uninstalled

    public static final int cannot_be_uninstalled

See Also:
  Constant Field Values

### can_be_uninstalled

    public static final int can_be_uninstalled

See Also:
  Constant Field Values

### cannot_be_paused

    public static final int cannot_be_paused

See Also:
  Constant Field Values

### can_be_paused

    public static final int can_be_paused

See Also:
  Constant Field Values

Constructor Detail

### OneNTServiceBean

    public OneNTServiceBean()

  The default constructor.

### OneNTServiceBean

    public OneNTServiceBean(java.lang.String h,
                            int p)

  The constructor that will set the host and the port no.

Parameters:
  `h` - the hostname
  `p` - the port no
See Also:
  `SNMPBean.setHost(java.lang.String)`, `SNMPBean.setPort(int)`

### OneNTServiceBean

    public OneNTServiceBean(java.lang.String h,
                            int p,
                            java.lang.String b)

  The constructor that will set the host, the port no and the local bind address.

Parameters:
  `h` - the hostname
  `p` - the port no
  `b` - the local bind address
Since:
  4_14
See Also:
  `SNMPBean.setHost(java.lang.String)`, `SNMPBean.setPort(int)`, `SNMPBean.setBindAddress(java.lang.String)`

Method Detail

### setIndex

    public void setIndex(java.lang.String ind)

  Sets the index of the NT network service that will be requested.

  Parameters:
    `ind` - the index
  See Also:
    `getIndex()`, `NTServiceNamesBean.getIndex(String)`

### getIndex

    public java.lang.String getIndex()

  Returns the index of the NT network service.

  Returns:
    the index
  See Also:
    `setIndex(String)`

### getName

    public java.lang.String getName()

  Returns the name of the NT network service.

  Returns:
    the name

### getInstalledState

    public java.lang.String getInstalledState()

  Returns the installation status of the NT network service.

  Returns:
    the installation status
  See Also:
    `msg_inst_state`

### getOperatingState

    public java.lang.String getOperatingState()

  Returns the operating status of the NT network service.

  Returns:
    the operating status
  See Also:
    `msg_oper_state`

### getCanBeUninstalled

    public boolean getCanBeUninstalled()

  Returns if the NT network service can be uninstalled.

  Returns:
    the uninstalled option
  See Also:
    `can_be_uninstalled`, `cannot_be_uninstalled`

### getCanBePaused

    public boolean getCanBePaused()

  Returns if the NT network service can be paused.

  Returns:
    the paused option
  See Also:
    `can_be_paused`, `cannot_be_paused`

### getLastUpdateDate

    public java.util.Date getLastUpdateDate()

  Returns the date of the moment when this bean was last updated. This might be null when the first time the update was not finished.

  Returns:
    the last update date

### action

    public void action()

  This method starts sending the SNMP request. All properties should be set before this method is called. The actual sending will take place in the run method. It makes a new snmp context and initialises all variables before starting.

  Specified by:
    `action` in class `SNMPBean`

### run

    public void run()

  The run method according to the Runnable interface. This method will send the Pdu request, if the previous one is not still in flight.

  Specified by:
    `run` in interface `java.lang.Runnable`
  Specified by:
    `run` in class `SNMPRunBean`
  See Also:
    `SNMPRunBean.isRunning()`

### update

    public void update(java.util.Observable obs,
                       java.lang.Object ov)

  The update method according to the Observer interface, it will be called when the Pdu response is received. The property change event is fired.

  Specified by:
    `update` in interface `java.util.Observer`
  See Also:
    `SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD