org.opennms.web.element
Class SnmpIfAdmin

java.lang.Object
  extended by org.opennms.web.element.SnmpIfAdmin

public class SnmpIfAdmin
extends Object

Author:
micmas Per modificare il modello associato al commento di questo tipo generato, aprire Finestra>Preferenze>Java>Generazione codice>Codice e commenti

Field Summary
static int DOWN
           
static int NULL
           
static int TESTING
           
static int UP
           
 
Constructor Summary
SnmpIfAdmin(int nodeid, InetAddress inetAddress, String community)
          Construct a SnmpIfAdmin object from inetaddress object
SnmpIfAdmin(int nodeid, org.opennms.netmgt.snmp.SnmpAgentConfig agent)
          Construct a SnmpIfAdmin object from a SnmpPeer object
 
Method Summary
 int getIfAdminStatus(int ifindex)
           Get desired admin interface status.
static String getReadableAdminStatus(int value)
           Get status in readable human format.
 boolean isIfAdminStatusDown()
           
 boolean isIfAdminStatusUp()
           
static boolean isValidState(int status)
           
 boolean setIfAdmin(int ifindex, int value)
           Set admin interface status to value.
 boolean setIfAdminDown(int ifindex)
           
 boolean setIfAdminUp(int ifindex)
           Set admin interface status to "up".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final int NULL
See Also:
Constant Field Values

UP

public static final int UP
See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

TESTING

public static final int TESTING
See Also:
Constant Field Values
Constructor Detail

SnmpIfAdmin

public SnmpIfAdmin(int nodeid,
                   org.opennms.netmgt.snmp.SnmpAgentConfig agent)
            throws SocketException
Construct a SnmpIfAdmin object from a SnmpPeer object

Parameters:
snmpPeer -
conn -
Throws:
SocketException
Exception

SnmpIfAdmin

public SnmpIfAdmin(int nodeid,
                   InetAddress inetAddress,
                   String community)
            throws SocketException,
                   Exception
Construct a SnmpIfAdmin object from inetaddress object

Parameters:
inetAddress -
conn -
community -
Throws:
SocketException
Exception
Method Detail

setIfAdminUp

public boolean setIfAdminUp(int ifindex)
                     throws SQLException

Set admin interface status to "up".

Parameters:
ifindex - interface index to set
Returns:
The status of interface
Throws:
SnmpBadConversionException - Throw if returned code is not an integer
SQLException

setIfAdminDown

public boolean setIfAdminDown(int ifindex)
                       throws SQLException
Throws:
SQLException

isIfAdminStatusUp

public boolean isIfAdminStatusUp()

isIfAdminStatusDown

public boolean isIfAdminStatusDown()

getIfAdminStatus

public int getIfAdminStatus(int ifindex)

Get desired admin interface status.

Parameters:
ifindex - interface index to get
Returns:
The status of interface
Throws:
SnmpBadConversionException - Throw if returned code is not an integer

getReadableAdminStatus

public static String getReadableAdminStatus(int value)

Get status in readable human format.

Parameters:
ifindex - interface index to get
Returns:
The status of interface in human format

setIfAdmin

public boolean setIfAdmin(int ifindex,
                          int value)
                   throws SQLException

Set admin interface status to value.

Parameters:
ifindex - interface index to set
value - desired interface status value
Returns:
The status of interface after operation
Throws:
SnmpBadConversionException - Throw if returned code is not an integer
SQLException

isValidState

public static boolean isValidState(int status)


Copyright © 2009. All Rights Reserved.