/** * Common initializations. */ private void init(InetAddressAcl acl, int p, InetAddress a) { root= new SnmpMibTree(); // The default Agent is initialized with a SnmpErrorHandlerAgent agent. root.setDefaultAgent(new SnmpErrorHandlerAgent()); // For the trap time, use the time the agent started ... // startUpTime= java.lang.System.currentTimeMillis(); maxActiveClientCount = 10; // Create the default message factory pduFactory = new SnmpPduFactoryBER() ; port = p ; ipacl = acl ; address = a ; if ((ipacl == null) && (useAcl == true)) throw new IllegalArgumentException("ACL object cannot be null") ; threadService = new ThreadService(threadNumber); }
/** * Common initializations. */ private void init(Object acl, int p, InetAddress a) { root= new SnmpMibTree(); // The default Agent is initialized with a SnmpErrorHandlerAgent agent. root.setDefaultAgent(new SnmpErrorHandlerAgent()); // For the trap time, use the time the agent started ... // startUpTime= java.lang.System.currentTimeMillis(); maxActiveClientCount = 10; // Create the default message factory pduFactory = new SnmpPduFactoryBER() ; port = p ; ipacl = acl ; address = a ; if ((ipacl == null) && (useAcl == true)) throw new IllegalArgumentException("ACL object cannot be null") ; threadService = new ThreadService(threadNumber); }
/** * Sets the message factory of this SNMP protocol adaptor. * * @param factory The factory object (null means the default factory). */ @Override public void setPduFactory(SnmpPduFactory factory) { if (factory == null) pduFactory = new SnmpPduFactoryBER() ; else pduFactory = factory ; }
/** * Sets the message factory of this SNMP protocol adaptor. * * @param factory The factory object (null means the default factory). */ public void setPduFactory(SnmpPduFactory factory) { if (factory == null) pduFactory = new SnmpPduFactoryBER() ; else pduFactory = factory ; }