private void createSnmpRequestHandler(SnmpAdaptorServer server, int id, DatagramSocket s, DatagramPacket p, SnmpMibTree tree, Vector<SnmpMibAgent> m, InetAddressAcl a, SnmpPduFactory factory, SnmpUserDataFactory dataFactory, MBeanServer f, ObjectName n) { final SnmpRequestHandler handler = new SnmpRequestHandler(this, id, s, p, tree, m, a, factory, dataFactory, f, n); threadService.submitTask(handler); }
/** * Full constructor */ public SnmpRequestHandler(SnmpAdaptorServer server, int id, DatagramSocket s, DatagramPacket p, SnmpMibTree tree, Vector<SnmpMibAgent> m, InetAddressAcl a, SnmpPduFactory factory, SnmpUserDataFactory dataFactory, MBeanServer f, ObjectName n) { super(server, id, f, n); // Need a reference on SnmpAdaptorServer for getNext & getBulk, // in case of oid equality (mib overlapping). // adaptor = server; socket = s; packet = p; root= tree; mibs = new Vector<>(m); subs= new Hashtable<>(mibs.size()); ipacl = a; pduFactory = factory ; userDataFactory = dataFactory ; //thread.start(); }
/** * Full constructor */ public SnmpRequestHandler(SnmpAdaptorServer server, int id, DatagramSocket s, DatagramPacket p, SnmpMibTree tree, Vector m, Object a, SnmpPduFactory factory, SnmpUserDataFactory dataFactory, MBeanServer f, ObjectName n) { super(server, id, f, n); // Need a reference on SnmpAdaptorServer for getNext & getBulk, // in case of oid equality (mib overlapping). // adaptor = server; socket = s; packet = p; root= tree; mibs = (Vector) m.clone(); subs= new Hashtable<SnmpMibAgent, SnmpSubRequestHandler>(mibs.size()); ipacl = a; pduFactory = factory ; userDataFactory = dataFactory ; //thread.start(); }
/** * 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 ; }
void createSnmpRequestHandler(SnmpAdaptorServer server, int id, DatagramSocket s, DatagramPacket p, SnmpMibTree tree, Vector m, Object a, SnmpPduFactory factory, SnmpUserDataFactory dataFactory, MBeanServer f, ObjectName n) { final SnmpRequestHandler handler = new SnmpRequestHandler(this, id, s, p, tree, m, a, factory, dataFactory, f, n); threadService.submitTask(handler); }
/** * Returns the message factory of this SNMP protocol adaptor. * * @return The factory object. */ @Override public SnmpPduFactory getPduFactory() { return pduFactory ; }
/** * Returns the message factory of this SNMP protocol adaptor. * * @return The factory object. */ public SnmpPduFactory getPduFactory();
/** * Sets the message factory of this SNMP protocol adaptor. * * @param factory The factory object (null means the default factory). */ public void setPduFactory(SnmpPduFactory factory);
/** * This method is called when a call is received from the network. * @param model The model ID. * @param factory The pdu factory to use to encode and decode pdu. * @return The object that will handle every steps of the receiving (mainly unmarshalling and security). */ public SnmpIncomingRequest getIncomingRequest(int model, SnmpPduFactory factory) throws SnmpUnknownMsgProcModelException;
/** * This method is called when a call is to be sent to the network. The sub system routes the call to the dedicated model according to the model ID. * @param model The model ID. * @param factory The pdu factory to use to encode and decode pdu. * @return The object that will handle every steps of the sending (mainly marshalling and security). */ public SnmpOutgoingRequest getOutgoingRequest(int model, SnmpPduFactory factory) throws SnmpUnknownMsgProcModelException ;
/** * This method is called when a call is received from the network. The sub system routes the call to the dedicated model according to the model ID. * @param model The model ID. * @param factory The pdu factory to use to decode pdu. * @return The object that will handle every steps of the receiving (mainly marshalling and security). */ public SnmpIncomingResponse getIncomingResponse(int model, SnmpPduFactory factory) throws SnmpUnknownMsgProcModelException;
/** * This method is called when a call is to be sent to the network. * @param factory The pdu factory to use to encode and decode pdu. * @return The object that will handle every steps of the sending (mainly marshalling and security). */ public SnmpOutgoingRequest getOutgoingRequest(SnmpPduFactory factory);
/** * This method is called when a call is received from the network. * @param factory The pdu factory to use to encode and decode pdu. * @return The object that will handle every steps of the receiving (mainly unmarshalling and security). */ public SnmpIncomingRequest getIncomingRequest(SnmpPduFactory factory);
/** * This method is called when a response is received from the network. * @param factory The pdu factory to use to encode and decode pdu. * @return The object that will handle every steps of the receiving (mainly unmarshalling and security). */ public SnmpIncomingResponse getIncomingResponse(SnmpPduFactory factory);