Package org.snmp4j.event

Examples of org.snmp4j.event.ResponseListener


            target.setVersion(SnmpConstants.version1); //Set the correct SNMP version here
            PDU pdu = new PDU();
            //Depending on the MIB attribute type, appropriate casting can be done here
            pdu.add(new VariableBinding(new OID(strOID), new Integer32(Integer.valueOf(value))));
            pdu.setType(PDU.SET);
            ResponseListener listener = new ResponseListener() {

                public void onResponse(ResponseEvent event) {
                    PDU strResponse;
                    String result;
                    ((Snmp) event.getSource()).cancel(event.getRequest(), this);
View Full Code Here


            target.setVersion(SnmpConstants.version1); //Set the correct SNMP version here
            PDU pdu = new PDU();
            //Depending on the MIB attribute type, appropriate casting can be done here
            pdu.add(new VariableBinding(new OID(strOID), new Integer32(Integer.valueOf(value))));
            pdu.setType(PDU.SET);
            ResponseListener listener = new ResponseListener() {

                public void onResponse(ResponseEvent event) {
                    PDU strResponse;
                    String result;
                    ((Snmp) event.getSource()).cancel(event.getRequest(), this);
View Full Code Here

      target.setTimeout(200);
      target.setVersion(SnmpConstants.version2c);
      PDU pdu = new PDU();
      pdu.add(new VariableBinding(new OID(oid), new Integer32(value)));
      pdu.setType(PDU.SET);
      ResponseListener listener = new ResponseListener() {
        public void onResponse(ResponseEvent event) {
        // Always cancel async request when response has been received
        // otherwise a memory leak is created! Not canceling a request
        // immediately can be useful when sending a request to a broadcast
        // address.
View Full Code Here

TOP

Related Classes of org.snmp4j.event.ResponseListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.