StateReference ref = event.getStateReference(); try { event.getMessageDispatcher().returnResponsePdu(event.getMessageProcessingModel(), event.getSecurityModel(), event.getSecurityName(),
e.getMessageDispatcher().returnResponsePdu(e.getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(),
e.getMessageDispatcher().returnResponsePdu(e.getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(),
public synchronized void processPdu(CommandResponderEvent e) { PDU command = e.getPDU(); if (command != null) { if ((command.getType() != PDU.TRAP) && (command.getType() != PDU.V1TRAP) && (command.getType() != PDU.REPORT) && (command.getType() != PDU.RESPONSE)) { out.println(command.toString()); command.setErrorIndex(0); command.setErrorStatus(0); command.setType(PDU.RESPONSE); StatusInformation statusInformation = new StatusInformation(); StateReference ref = e.getStateReference(); try { e.getMessageDispatcher().returnResponsePdu(e. getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(), e.getSecurityLevel(), command, e.getMaxSizeResponsePDU(), ref, statusInformation); } catch (MessageException ex) { err.println("Error while sending response: " + ex.getMessage()); LogFactory.getLogger(SnmpCommand.class).error(ex); } } } }
public synchronized void processPdu(CommandResponderEvent e) { PDU command = e.getPDU(); if (command != null) { System.out.println(command.toString()); if ((command.getType() != PDU.TRAP) && (command.getType() != PDU.V1TRAP) && (command.getType() != PDU.REPORT) && (command.getType() != PDU.RESPONSE)) { command.setErrorIndex(0); command.setErrorStatus(0); command.setType(PDU.RESPONSE); StatusInformation statusInformation = new StatusInformation(); StateReference ref = e.getStateReference(); try { e.getMessageDispatcher().returnResponsePdu(e.getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(), e.getSecurityLevel(), command, e.getMaxSizeResponsePDU(), ref, statusInformation); } catch (MessageException ex) { System.err.println("Error while sending response: "+ex.getMessage()); LogFactory.getLogger(SnmpRequest.class).error(ex); } } } }
StateReference ref = e.getStateReference(); try { e.getMessageDispatcher().returnResponsePdu(e. getMessageProcessingModel(), e.getSecurityModel(),
StatusInformation statusInformation = new StatusInformation(); StateReference ref = requestEvent.getStateReference(); requestEvent.getMessageDispatcher().returnResponsePdu(requestEvent. getMessageProcessingModel(), requestEvent.getSecurityModel(),
StatusInformation statusInformation = new StatusInformation(); StateReference ref = requestEvent.getStateReference(); requestEvent.getMessageDispatcher().returnResponsePdu(requestEvent. getMessageProcessingModel(), requestEvent.getSecurityModel(),
@Override public void processPdu(CommandResponderEvent e) { PDU command = e.getPDU(); if (command == null) return; PDU response = processRequest(command); if (response == null) return; StatusInformation statusInformation = new StatusInformation(); StateReference ref = e.getStateReference(); try { LOG.debug("Replying with: {}", command); e.setProcessed(true); e.getMessageDispatcher().returnResponsePdu(e.getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(), e.getSecurityLevel(), command, e.getMaxSizeResponsePDU(), ref, statusInformation); } catch (MessageException ex) { LOG.error("Error while sending response", ex); } }
StateReference ref = e.getStateReference(); try { e.getMessageDispatcher().returnResponsePdu(e.getMessageProcessingModel(), e.getSecurityModel(), e.getSecurityName(),
protected void sendResponse(CommandResponderEvent requestEvent, PDU response) { MessageDispatcher disp = requestEvent.getMessageDispatcher(); try { if (response.getBERLength() > requestEvent.getMaxSizeResponsePDU()) {
protected void sendResponse(CommandResponderEvent requestEvent, PDU response) { MessageDispatcher disp = requestEvent.getMessageDispatcher(); try { if (response.getBERLength() > requestEvent.getMaxSizeResponsePDU()) {