Deprecated API

Deprecated Classes
com.adventnet.snmp.mibs.MibModuleCompliance
          This class incorrectly assumes that the ModuleCompliance construct can have only one Module. Instead, the classes ModuleCompliance and ModuleComplianceModule can be used. 
 

Deprecated Fields
com.adventnet.snmp.snmp2.SnmpAPI.BITSTRING
          This variable has been deprecated in SNMPv2 protocol. 
com.adventnet.snmp.snmp2.SnmpSession.IP
          Since all the SNMP communications go through a single transport provider, this is not needed. 
com.adventnet.snmp.snmp2.SnmpAPI.NSAP
          This variable has been deprecated in SNMPv2 protocol 
com.adventnet.snmp.snmp2.SnmpAPI.Standard_Prefix
          instead use the setOIDPrefix(SnmpOID oid) and getOIDPrefix() methods. 
com.adventnet.snmp.snmp2.SnmpSession.TRANSPORT_PROVIDER
          Since all the SNMP communications go through a single transport provider, this is not needed. 
com.adventnet.snmp.snmp2.SnmpAPI.UINTEGER32
          This variable has been deprecated in SNMP protocol. 
 

Deprecated Methods
com.adventnet.snmp.beans.SnmpTrapReceiver.cleanup()
          Replaced by stop() method. 
com.adventnet.snmp.snmp2.SnmpSession.get(SnmpOID)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
pdu.addNull(oid);
pdu.setCommand(SnmpAPI.GET_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar var = null;
if(response_pdu != null)
{
var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.snmp2.SnmpSession.get(String)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
pdu.addNull(new SnmpOID(oidString));
pdu.setCommand(SnmpAPI.GET_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar var = null;
if(response_pdu != null)
{
var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.mibs.AgentCapabilitiesModule.getAccess()
          Since 3.0. Instead you can use getAccess() in ACVariation class. 
com.adventnet.snmp.snmp2.SnmpPDU.getAddress()
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
InetAddress address = opt.getRemoteAddress();
 

com.adventnet.snmp.mibs.MibModule.getAgentCapabilities()
          since 4.0 . Instead you can use the method getDefinedAgentCapabilities 
com.adventnet.snmp.beans.SnmpRequestServer.getAttemptPartial()
          SnmpRequestServer cannot get the partial data. It is specifically for SnmpTarget bean which does synchronous comm.. 
com.adventnet.snmp.snmp2.SnmpAPI.getCommunityTable()
          use the following instead
getSecurityProvider().getTable(1); // where 1 stands for v1 security model.
 
com.adventnet.snmp.beans.SnmpTrapReceiver.getcontextID()
          Replaced with getContextID() 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getCreationRequires()
          Since 3.0. Instead you can use getCreationObjects() in ACVariation class. 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getDefval()
          Since 3.0. Instead you can use getDefVal() in ACVariation class. 
com.adventnet.snmp.mibs.MibModule.getFilename()
          since 2.1 . Instead you can use the method getFileName() 
com.adventnet.snmp.snmp2.SnmpSession.getLocalAddresses()
          use the following instead.
UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions();
String[] local_address = opt.getLocalAddresses();
 
com.adventnet.snmp.snmp2.SnmpSession.getLocalPort()
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions();
int local_port = opt.getLocalPort();
 

com.adventnet.snmp.snmp2.SnmpSession.getnext(SnmpOID)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
pdu.addNull(oid);
pdu.setCommand(SnmpAPI.GETNEXT_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar var = null;
if(response_pdu != null)
{
var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.snmp2.SnmpSession.getnext(String)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
pdu.addNull(new SnmpOID(oidString));
pdu.setCommand(SnmpAPI.GETNEXT_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar var = null;
if(response_pdu != null)
{
var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.mibs.MibNode.getObjectNames()
          use the getObjects method instead. 
com.adventnet.snmp.beans.SnmpServer.getOverwriteCMI()
          Instead use isOverwriteCMI() method. 
com.adventnet.snmp.mibs.MibOperations.getOverwriteCMI()
          since 4.0, replaced by MibOperations.isOverwriteCMI() 
com.adventnet.snmp.snmp2.SnmpSession.getPeername()
          use the following instead.
UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions(); opt.getRemoteHost();
 
com.adventnet.snmp.snmp2.SnmpSession.getProtocol()
          since all SNMP communications go through only a transportProvider, this method is not at all necessary. 
com.adventnet.snmp.snmp2.SnmpSession.getReceiveBufferSize()
          instead use the getReceiveBufferSize method available in UDPProtocolOptions. 
com.adventnet.snmp.snmp2.SnmpPDU.getRemoteHost()
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
String remoteHost = opt.getRemoteHost();
 

com.adventnet.snmp.snmp2.SnmpSession.getRemotePort()
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions();
opt.getRemotePort();
 

com.adventnet.snmp.snmp2.SnmpPDU.getRemotePort()
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
int remotePort = opt.getRemotePort();
 

com.adventnet.snmp.mibs.MibNode.getRevdescription()
          since 4.0. Instead you can use the method getRevisionDescriptions() 
com.adventnet.snmp.mibs.MibNode.getRevision()
          since 4.0. Instead you can use the method getRevisions() 
com.adventnet.snmp.snmp2.SnmpSession.getSASClient()
          use the following instead
SASProtocolOptions opt = (SASProtocolOptions)snmpSession.getProtocolOptions();
SASClient sasclient = opt.getSASClient();
 
com.adventnet.snmp.snmp2.SnmpSession.getSASProtocol()
          use the following instead.

SASProtocolOptions opt = (SASProtocolOptions)snmpSession.getProtocolOptions();
int sasprotocol = opt.getProtocol();
 

com.adventnet.snmp.snmp2.SnmpSession.getSnmpClientsSize()
          use the following instead

int snmpClientsSize = (snmpSession.getSnmpClients()).size();  

com.adventnet.snmp.snmp2.SnmpSession.getStartLocalPort()
          now the "open(Applet)" method will throw an SnmpException if it is unable to connect to the SAServer. When such an exception is received, the user should decide whether "open(void)" method should be called or not. 
com.adventnet.snmp.mibs.MibNode.getSubid()
          since 4.0. Instead you can use the method getSubID() 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getSyntax()
          Since 3.0. Instead you can use getSyntax() in ACVariation class 
com.adventnet.snmp.mibs.MibOperations.getThrowFileNotFound()
            
com.adventnet.snmp.snmp2.SnmpAPI.getUSMTable()
          use the following instead.
 SnmpApi.getSecurityProvider().getTable(USM_SECURITY_MODEL); // where USM_SECURITY_MODEL = 3
 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getVariation()
          Since 3.0 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getVariationDescription()
          Since 3.0. Instead you can use getDescription() in ACVariation class. 
com.adventnet.snmp.mibs.AgentCapabilitiesModule.getWriteSyntax()
          Since 3.0. Instead you can use getWriteSyntax() in ACVariation class. 
com.adventnet.snmp.snmp2.SnmpSession.open(Applet)
          use the following instead

SnmpAPI api = new SnmpAPI();
SnmpSession ses = new SnmpSession(api);
SASProtocolOptions opt = new SASProtocolOptions();
opt.setApplet(applet);
ses.setProtocolOptions(opt);
ses.open();
 

com.adventnet.snmp.snmp2.SnmpSession.set(SnmpOID, SnmpVar)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
SnmpVarBind varbind = new SnmpVarBind(oid, var);
pdu.addVariableBinding(varbind);
pdu.setCommand(SnmpAPI.SET_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar response_var = null;
if(response_pdu != null)
{
response_var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.snmp2.SnmpSession.set(String, String, byte)
          use the following instead

SnmpPDU pdu = new SnmpPDU();
SnmpVar variable = SnmpVar.createVariable(setString, type);
SnmpOID oid = new SnmpOID(oidString);
SnmpVarBind varbind = new SnmpVarBind(oid, variable);
pdu.addVariableBinding(varbind);
pdu.setCommand(SnmpAPI.SET_REQ_MSG);
SnmpPDU response_pdu = snmpSession.syncSend(pdu);

SnmpVar var = null;
if(response_pdu != null)
{
var = response_pdu.getVariable(0);
}
 

com.adventnet.snmp.snmp2.SnmpPDU.setAddress(InetAddress)
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
opt.setRemoteAddress(address);
 

com.adventnet.snmp.beans.SnmpRequestServer.setAttemptPartial(boolean)
          SnmpRequestServer cannot get partial data by enabling the flag. It is specific for SnmpTarget bean which does synchronous comm.. 
com.adventnet.snmp.beans.SnmpTrapReceiver.setcontextID(byte[])
          Replaced with setContextID(byte[] ctxtID) 
com.adventnet.snmp.snmp2.SnmpPDU.setDNSLookup(boolean)
          since no lookup will be done unnecessarily. 
com.adventnet.snmp.snmp2.SnmpSession.setLocalAddresses(String[])
          use the following instead.
UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions(); opt.setLocalAddresses(local_addrs);
 
com.adventnet.snmp.snmp2.SnmpSession.setLocalPort(int)
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions();
opt.setLocalPort(local_port);
 

com.adventnet.snmp.snmp2.SnmpSession.setPeername(String)
          use the following instead.
UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions(); opt.setRemoteHost(peername);
 
com.adventnet.snmp.snmp2.SnmpSession.setProtocol(int)
          Since all the SNMP communications go through a single transport provider, this is not needed. 
com.adventnet.snmp.snmp2.SnmpSession.setReceiveBufferSize(int)
          instead use the setReceiveBufferSize method available in UDPProtocolOptions. 
com.adventnet.snmp.snmp2.SnmpPDU.setRemoteHost(String)
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
opt.setRemoteHost(host);
 

com.adventnet.snmp.snmp2.SnmpSession.setRemotePort(int)
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)snmpSession.getProtocolOptions();
opt.setRemotePort(port);
 

com.adventnet.snmp.snmp2.SnmpPDU.setRemotePort(int)
          use the following instead.

UDPProtocolOptions opt = (UDPProtocolOptions)SnmpPDU.getProtocolOptions();
opt.setRemotePort(port);
 

com.adventnet.snmp.snmp2.SnmpSession.setSASProtocol(int)
          use the following instead.

SASProtocolOptions opt = new SASProtocolOptions();
opt.setApplet(applet);
opt.setProtocol(SASClient.TCP_PROTOCOL); //or SASClient.HTTP_PROTOCOL
snmpSession.setProtocolOptions(opt);
snmpSession.open();
 

com.adventnet.snmp.snmp2.SnmpSession.setSocketParms(int, int)
          since a new transportProvider implementation for udp has been added, this method no longer becomes necessary. 
com.adventnet.snmp.snmp2.SnmpSession.setStartLocalPort(int)
          now the "open(Applet)" method will throw an SnmpException if it is unable to connect to the SAServer. When such an exception is received, the user should decide whether "open(void)" method should be called or not. 
com.adventnet.snmp.mibs.MibOperations.setThrowFileNotFound(boolean)
            
com.adventnet.snmp.snmp2.SnmpAPI.setupStdOutErr()
          please use the logging framework instead. 
com.adventnet.snmp.snmp2.SnmpAPI.setupStdOutErr(String)
          please use the logging framework instead. 
 



Copyright (c)AdventNet Inc., 1996-2004