1 20 21 package org.snmp4j.mp; 22 23 import java.io.IOException ; 24 import org.snmp4j.*; 25 import org.snmp4j.smi.*; 26 import org.snmp4j.asn1.BERInputStream; 27 import org.snmp4j.MutablePDU; 28 import org.snmp4j.MessageDispatcher; 29 import org.snmp4j.asn1.BEROutputStream; 30 import org.snmp4j.security.SecurityLevel; 32 import org.snmp4j.security.SecurityModel; 33 34 43 public interface MessageProcessingModel { 44 45 int MPv1 = 0; 46 int MPv2c = 1; 47 int MPv2u = 2; 48 int MPv3 = 3; 49 50 57 int getID(); 58 59 97 int prepareOutgoingMessage(Address transportAddress, 98 int maxMsgSize, 99 int messageProcessingModel, 100 int securityModel, 101 byte[] securityName, 102 int securityLevel, 103 107 PDU pdu, 108 boolean expectResponse, 109 PduHandle sendPduHandle, 110 Address destTransportAddress, 111 BEROutputStream outgoingMessage) 112 throws IOException ; 113 114 149 int prepareResponseMessage(int messageProcessingModel, 150 int maxMsgSize, 151 int securityModel, 152 byte[] securityName, 153 int securityLevel, 154 158 PDU pdu, 159 int maxSizeResponseScopedPDU, 160 StateReference stateReference, 161 StatusInformation statusInformation, 162 BEROutputStream outgoingMessage) 163 throws IOException ; 164 165 206 int prepareDataElements(MessageDispatcher messageDispatcher, 207 Address transportAddress, 208 BERInputStream wholeMsg, 209 Integer32 messageProcessingModel, 210 Integer32 securityModel, 211 OctetString securityName, 212 Integer32 securityLevel, 213 217 MutablePDU pdu, 218 PduHandle sendPduHandle, 219 Integer32 maxSizeResponseScopedPDU, 220 StatusInformation statusInformation, 221 MutableStateReference stateReference) 222 throws IOException ; 223 224 233 boolean isProtocolVersionSupported(int snmpProtocolVersion); 234 235 241 void releaseStateReference(PduHandle pduHandle); 242 } 243 244 | Popular Tags |