Examples of SnmpParameters


Examples of com.sun.management.snmp.manager.SnmpParameters

          //
          final SnmpPeer agent = new SnmpPeer(remoteHost, port);

          // Specify the read and write community to be used
          //
          final SnmpParameters params = new SnmpParameters(
                  community,
                  community);

          // Specify the protocol version
          //
          switch (version) {
            case 1:
              params.setProtocolVersion(SnmpDefinitions.snmpVersionOne);
              break;
            case 2:
              params.setProtocolVersion(SnmpDefinitions.snmpVersionTwo);
              break;
            default:
              break;
          }
View Full Code Here

Examples of com.sun.management.snmp.manager.SnmpParameters

          //
          final SnmpPeer agent = new SnmpPeer(remoteHost, port);

          // Specify the read and write community to be used
          //
          final SnmpParameters params = new SnmpParameters(
                  community,
                  community);

          // Specify the protocol version
          //
          switch (version) {
            case 1:
              params.setProtocolVersion(SnmpDefinitions.snmpVersionOne);
              break;
            case 2:
              params.setProtocolVersion(SnmpDefinitions.snmpVersionTwo);
              break;
          }

          // Associate the parameters with the agent
          //
View Full Code Here

Examples of com.sun.management.snmp.manager.SnmpParameters

        // Create parameters to associate to the entity to communicate
        // with.
        // When creating the parameter object, you can specify the read
        // and write community to be used when querying the agent.

        final SnmpParameters params =
                new SnmpParameters();

        // Set to the allowed the community string
        params.setRdCommunity("NasuTekDS@NasuTekDS");

        // The newly created parameter must be associated to the agent.
        //
        agent.setParams(params);
View Full Code Here

Examples of com.sun.management.snmp.manager.SnmpParameters

            // Create parameters to associate to the entity to communicate
            // with.
            // When creating the parameter object, you can specify the read
            // and write community to be used when querying the agent.
            //
            final SnmpParameters params =
                    new SnmpParameters();
            params.setRdCommunity(community);

            // The newly created parameter must be associated to the agent.
            //
            agent.setParams(params);
View Full Code Here

Examples of org.opennms.protocols.snmp.SnmpParameters

      // Create the SNMP session to the manager
      SnmpPeer peer = new SnmpPeer(this.address, this.port, this.localAddress, this.localPort);
      peer.setRetries(this.retries);
      peer.setTimeout(this.timeout);
           
      SnmpParameters parameters = peer.getParameters();
           
      switch(this.version) {               
         case SnmpAgentService.SNMPV1:
            parameters.setVersion(SnmpSMI.SNMPV1);
            break;
        
         case SnmpAgentService.SNMPV2:
            parameters.setVersion(SnmpSMI.SNMPV2);
            break;
         default:
            parameters.setVersion(SnmpSMI.SNMPV1);
      }
           
      parameters.setReadCommunity(this.readCommunity);
      peer.setParameters(parameters);
           
      this.session = new SnmpSession(peer);
      this.session.setDefaultHandler(this);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.