/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// java imports
//
// jmx imports
//
// SNMP Runtime import
//
/* NPCTE fix for bugId 4492741, esc 0 */
/* end of NPCTE fix for bugId 4492741 */
/**
* The constuctor initialize the subrequest with the whole varbind
* list contained in the original request.
*/
}
"SnmpSubNextRequestHandler", "Constructor : " + this);
}
}
// The translation table is easy in this case ...
//
for(int i=0; i < max; i++) {
translation[i]= i;
// we need to allocate a new SnmpVarBind. Otherwise the first
// sub request will modify the list...
//
final SnmpVarBind newVarBind =
}
}
public void run() {
try {
/* NPCTE fix for bugId 4492741, esc 0, 16-August-2001 */
final ThreadContext oldContext =
try {
}
// Always call with V2. So the merge of the responses will
// be easier.
//
} finally {
}
/* end of NPCTE fix for bugId 4492741 */
} catch(SnmpStatusException x) {
errorStatus = x.getStatus() ;
errorIndex= x.getErrorIndex();
"]:an Snmp error occured during the operation", x);
}
}
catch(Exception x) {
"]:a generic error occured during the operation", x);
}
}
}
}
/**
* The method updates the varbind list of the subrequest.
*/
}
final SnmpVarBind newVarBind =
}
}
/**
* The method updates a given var bind list with the result of a
* previsouly invoked operation.
* Prior to calling the method, one must make sure that the operation was
* successful. As such the method getErrorIndex or getErrorStatus should be
* called.
*/
for(int i= 0; i< max ; i++) {
// May be we should control the position ...
//
final int index= translation[i];
final SnmpVarBind elmt=
/* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
// if ((elmt != null) && (elmt.value == null) &&
// (version == snmpVersionTwo))
// elmt.value = SnmpVarBind.endOfMibView;
/* end of NPCTE fix for bugid 4381195 */
continue;
}
/* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
// else if ((val == null) && (version == snmpVersionTwo))
// vb.value = SnmpVarBind.endOfMibView;
continue;
/* end of NPCTE fix for bugid 4381195 */
}
/* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
/* end of NPCTE fix for bugid 4381195 */
// Now we need to take the smallest oid ...
//
if (comp < 0) {
// Take the smallest (lexicographically)
//
}
else {
if(comp == 0) {
// Must compare agent used for reply
// Take the deeper within the reply
"updateResult"," oid overlapping. Oid : " +
"updateResult","Already present varBind : " +
vb);
}
}
if(deeperAgent == agent) {
"updateResult","The current agent is the deeper one. Update the value with the current one");
}
}
/*
Vector v = new Vector();
SnmpMibRequest getReq = createMibRequest(v,
version,
null);
SnmpVarBind realValue = new SnmpVarBind(oid);
getReq.addVarBind(realValue);
try {
deeperAgent.get(getReq);
} catch(SnmpStatusException e) {
e.printStackTrace();
}
if(isDebugOn())
trace("updateResult", "Biggest priority value is : " +
realValue.value);
result[index].value = realValue.value;
*/
}
}
}
}
}