AdventNet WiFi Mediation API, v1.0

com.adventnet.wifi.mediation
Class SNMPCredentials

java.lang.Object
  extended bycom.adventnet.wifi.mediation.SNMPCredentials

public class SNMPCredentials
extends java.lang.Object

Class holding the SNMP related properties,which are used for fetching information from the device or to configure the device using SNMP.

See Also:
Device

Field Summary
static int SNMP_PORT
          Constant to represent the SNMP PORT.
static int SNMP_RETRIES
          Constant to represent the SNMP retries.
static int SNMP_TIMEOUT
          Constant to represent the SNMP time out.
static int SNMP_v1
          Constant representing SNMP protocol version 1.
static int SNMP_v2c
          Constant representing SNMP protocol version v2c.
static int SNMP_VERSION
          Constant to represent the SNMP protocol version.
 
Constructor Summary
SNMPCredentials(int port, java.lang.String readCommunity)
          Constructs a SNMPCredentials with the given port and community strings.
SNMPCredentials(int port, java.lang.String readCommunity, java.lang.String writeCommunity)
          Constructs a SNMPCredentials with the given port and community strings.
 
Method Summary
 int getInterPacketDelay()
           
 int getPort()
          Returns the port in which the SNMP service is running.
 java.lang.String getReadCommunity()
          Returns the read community of the SNMP protocol used to communicate to the device.
 int getTimeout()
          Fetches the Request timeout in millisecond.
 int getVersion()
          Returns the version of the SNMP protocol to be used for communication with the device.
 java.lang.String getWriteCommunity()
          Returns the write community of the SNMP protocol, this write community is primarily used during configuration of the device to set values in the device.
 void setInterPacketDelay(int delay)
           
 void setPort(int port)
          API to specify the port in which the SNMP service is running.
 void setReadCommunity(java.lang.String readCommunity)
          Sets the read community of the SNMP protocol to be used to communicate to the device.
 void setTimeout(int timeout)
          Sets the request timeout in millisecond.
 void setVersion(int version)
          Sets the version of the SNMP protocol to be used for communication with the device.
 void setWriteCommunity(java.lang.String writeCommunity)
          Sets the write community of the SNMP protocol, this write community is primarily used during configuration of the device to set values in the device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNMP_PORT

public static int SNMP_PORT
Constant to represent the SNMP PORT. Whenever a SNMPCredentials class is instantiated its port value will default to the value(161) specified in this variable. The setPort method will not affect the status of this variable, it will impact the value of the specific instance on which it is used.


SNMP_v1

public static final int SNMP_v1
Constant representing SNMP protocol version 1.

See Also:
Constant Field Values

SNMP_v2c

public static final int SNMP_v2c
Constant representing SNMP protocol version v2c.

See Also:
Constant Field Values

SNMP_VERSION

public static int SNMP_VERSION
Constant to represent the SNMP protocol version. Whenever a SNMPCredentials class is instantiated its version value will default to the value specified in this variable. The setVersion method will not affect the status of this variable, it will impact the value of the specific instance on which it is used.


SNMP_RETRIES

public static int SNMP_RETRIES
Constant to represent the SNMP retries. Whenever a SNMPCredentials class is instantiated its retries value will default to the value specified in this variable. The setRetries method will not affect the status of this variable, it will impact the value of the specific instance on which it is used.


SNMP_TIMEOUT

public static int SNMP_TIMEOUT
Constant to represent the SNMP time out. Whenever a SNMPCredentials class is instantiated its timeout value will default to the value specified in this variable. The setTimeout method will not affect the status of this variable, it will impact the value of the specific instance on which it is used.

Constructor Detail

SNMPCredentials

public SNMPCredentials(int port,
                       java.lang.String readCommunity)
Constructs a SNMPCredentials with the given port and community strings.

Parameters:
port - the port at which the SNMP Service is running in the device.
readCommunity - the community string which is used to read data from the device.

SNMPCredentials

public SNMPCredentials(int port,
                       java.lang.String readCommunity,
                       java.lang.String writeCommunity)
Constructs a SNMPCredentials with the given port and community strings.

Parameters:
port - the port at which the SNMP Service is running in the device.
readCommunity - the community string which is used to read data from the device.
writeCommunity - the community string which is used during device configuration.
Method Detail

getPort

public int getPort()
Returns the port in which the SNMP service is running.

Returns:
port in which the SNMP service is running.

setPort

public void setPort(int port)
API to specify the port in which the SNMP service is running. This method will not have any impact on the static variable SNMP_PORT, this instead will set the port for the specific instance.

Parameters:
port - the port in which the SNMP service is running.

getVersion

public int getVersion()
Returns the version of the SNMP protocol to be used for communication with the device.

Returns:
version of the SNMP protocol to be used.

setVersion

public void setVersion(int version)
Sets the version of the SNMP protocol to be used for communication with the device. This method will not impact the value of SNMP_VERSION, but will set the value for the particular instance in which it is used.

Parameters:
version - the version of the SNMP protocol to be used.

getTimeout

public int getTimeout()
Fetches the Request timeout in millisecond.

Returns:
the request timeout value in millisecond.

setTimeout

public void setTimeout(int timeout)
Sets the request timeout in millisecond. This method will not impact the SNMP_TIMEOUT value but will set the time out value for the specific instance.

Parameters:
timeout - the request timeout value in millisecond.

setInterPacketDelay

public void setInterPacketDelay(int delay)

getInterPacketDelay

public int getInterPacketDelay()

setReadCommunity

public void setReadCommunity(java.lang.String readCommunity)
Sets the read community of the SNMP protocol to be used to communicate to the device.

Parameters:
readCommunity - the community of the SNMP protocol to be used.

getReadCommunity

public java.lang.String getReadCommunity()
Returns the read community of the SNMP protocol used to communicate to the device.

Returns:
community of the SNMP protocol to be used.

setWriteCommunity

public void setWriteCommunity(java.lang.String writeCommunity)
Sets the write community of the SNMP protocol, this write community is primarily used during configuration of the device to set values in the device.

Parameters:
writeCommunity - the write community

getWriteCommunity

public java.lang.String getWriteCommunity()
Returns the write community of the SNMP protocol, this write community is primarily used during configuration of the device to set values in the device.

Returns:
community of the SNMP protocol to be used.

AdventNet WiFi Mediation API, v1.0

Copyright © 2005 AdventNet Inc. All Rights Reserved.