public class SnmpIfAdmin extends Object
SnmpIfAdmin class.
Modifier and Type | Field and Description |
---|---|
static int |
DOWN
Constant
DOWN=2 |
static int |
NULL
Constant
NULL=0 |
static int |
TESTING
Constant
TESTING=3 |
static int |
UP
Constant
UP=1 |
Constructor and Description |
---|
SnmpIfAdmin(int nodeid,
InetAddress inetAddress,
String community)
Construct a SnmpIfAdmin object from inetaddress object
|
SnmpIfAdmin(int nodeid,
SnmpAgentConfig agent)
Construct a SnmpIfAdmin object from a SnmpPeer object
|
Modifier and Type | Method and Description |
---|---|
int |
getIfAdminStatus(int ifindex)
Get desired admin interface status.
|
static String |
getReadableAdminStatus(int value)
Get status in readable human format.
|
boolean |
isIfAdminStatusDown()
isIfAdminStatusDown
|
boolean |
isIfAdminStatusUp()
isIfAdminStatusUp
|
static boolean |
isValidState(int status)
isValidState
|
boolean |
setIfAdmin(int ifindex,
int value)
Set admin interface status to value.
|
boolean |
setIfAdminDown(int ifindex)
setIfAdminDown
|
boolean |
setIfAdminUp(int ifindex)
Set admin interface status to "up".
|
public static final int NULL
NULL=0
public static final int UP
UP=1
public static final int DOWN
DOWN=2
public static final int TESTING
TESTING=3
public SnmpIfAdmin(int nodeid, SnmpAgentConfig agent) throws SocketException
nodeid
- a int.agent
- a SnmpAgentConfig
object.SocketException
- if any.SocketException
- if any.public SnmpIfAdmin(int nodeid, InetAddress inetAddress, String community) throws SocketException, Exception
inetAddress
- a InetAddress
object.community
- a String
object.nodeid
- a int.SocketException
- if any.SocketException
- if any.Exception
- if any.public boolean setIfAdminUp(int ifindex) throws SQLException
Set admin interface status to "up".
ifindex
- interface index to setSnmpBadConversionException
- Throw if returned code is not an integerSQLException
- if any.public boolean setIfAdminDown(int ifindex) throws SQLException
setIfAdminDown
ifindex
- a int.SQLException
- if any.public boolean isIfAdminStatusUp()
isIfAdminStatusUp
public boolean isIfAdminStatusDown()
isIfAdminStatusDown
public int getIfAdminStatus(int ifindex)
Get desired admin interface status.
ifindex
- interface index to getSnmpBadConversionException
- Throw if returned code is not an integerpublic static String getReadableAdminStatus(int value)
Get status in readable human format.
value
- a int.public boolean setIfAdmin(int ifindex, int value) throws SQLException
Set admin interface status to value.
ifindex
- interface index to setvalue
- desired interface status valueSnmpBadConversionException
- Throw if returned code is not an integerSQLException
- if any.public static boolean isValidState(int status)
isValidState
status
- a int.Copyright © 2021. All rights reserved.