1 20 21 package org.snmp4j; 22 23 import org.snmp4j.smi.Address; 24 import org.snmp4j.mp.*; 25 import java.util.Collection ; 26 import org.snmp4j.asn1.BERInputStream; 27 import org.snmp4j.transport.TransportListener; 28 import java.nio.ByteBuffer ; 29 30 43 public interface MessageDispatcher extends TransportListener { 44 45 53 int getNextRequestID(); 54 55 63 void addMessageProcessingModel(MessageProcessingModel model); 64 65 71 void removeMessageProcessingModel(MessageProcessingModel model); 72 73 84 MessageProcessingModel getMessageProcessingModel(int messageProcessingModel); 85 86 92 void addTransportMapping(TransportMapping transport); 93 94 103 TransportMapping removeTransportMapping(TransportMapping transport); 104 105 110 Collection getTransportMappings(); 111 112 122 TransportMapping getTransport(Address destAddress); 123 124 133 void addCommandResponder(CommandResponder listener); 134 135 141 void removeCommandResponder(CommandResponder listener); 142 143 169 PduHandle sendPdu(TransportMapping transportMapping, 170 Address transportAddress, 171 int messageProcessingModel, int securityModel, byte[] securityName, 174 int securityLevel, 175 179 PDU pdu, 180 boolean expectResponse) throws MessageException; 181 182 218 PduHandle sendPdu(TransportMapping transportMapping, 219 Address transportAddress, 220 int messageProcessingModel, int securityModel, byte[] securityName, 223 int securityLevel, 224 228 PDU pdu, 229 boolean expectResponse, 230 PduHandleCallback callback) throws MessageException; 231 232 259 PduHandle sendPdu(Address transportAddress, 260 int messageProcessingModel, int securityModel, byte[] securityName, 263 int securityLevel, 264 268 PDU pdu, 269 boolean expectResponse) throws MessageException; 270 271 284 int returnResponsePdu(int messageProcessingModel, 285 int securityModel, 286 byte[] securityName, 287 int securityLevel, 288 292 PDU pdu, 293 int maxSizeResponseScopedPDU, 294 StateReference stateReference, 295 StatusInformation statusInformation) 296 throws MessageException; 297 298 317 void processMessage(TransportMapping sourceTransport, 318 Address incomingAddress, 319 BERInputStream wholeMessage); 320 321 335 void processMessage(TransportMapping sourceTransport, 336 Address incomingAddress, 337 ByteBuffer wholeMessage); 338 339 340 349 void releaseStateReference(int messageProcessingModel, 350 PduHandle pduHandle); 351 } 352 353 | Popular Tags |