FileDocCategorySizeDatePackage
SnmpMsgProcessingModel.javaAPI DocJava SE 5 API5740Fri Aug 26 14:55:06 BST 2005com.sun.jmx.snmp.internal

SnmpMsgProcessingModel

public interface SnmpMsgProcessingModel implements SnmpModel
The message processing model interface. Any message processing model must implement this interface in order to be integrated in the engine framework. The model is called by the dispatcher when a call is received or when a call is sent.

This API is a Sun Microsystems internal API and is subject to change without notice.

since
1.5

Fields Summary
Constructors Summary
Methods Summary
public SnmpDecryptedPdudecode(byte[] pdu)
This method returns a decoded scoped pdu. This method decodes only the contextEngineID, contextName and data. It is needed by the SnmpSecurityModel after decryption.

param
pdu The encoded pdu.
return
The partialy scoped pdu.

public intencode(int version, int msgID, int msgMaxSize, byte msgFlags, int msgSecurityModel, com.sun.jmx.snmp.SnmpSecurityParameters params, byte[] contextEngineID, byte[] contextName, byte[] data, int dataLength, byte[] outputBytes)
This method is called to encode a full scoped pdu that has not been encrypted. contextName, contextEngineID and data are known.
The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).

param
version The SNMP protocol version.
param
msgID The SNMP message ID.
param
msgMaxSize The max message size.
param
msgFlags The message flags.
param
msgSecurityModel The message security model.
param
params The security parameters.
param
contextEngineID The context engine ID.
param
contextName The context name.
param
data The encoded data.
param
dataLength The encoded data length.
param
outputBytes The buffer containing the encoded message.
return
The encoded bytes number.

public intencode(SnmpDecryptedPdu pdu, byte[] outputBytes)
This method returns an encoded scoped pdu. This method encode only the contextEngineID, contextName and data. It is needed by the SnmpSecurityModel for decryption.

param
pdu The pdu to encode.
param
outputBytes The partialy scoped pdu.
return
The encoded bytes number.

public intencodePriv(int version, int msgID, int msgMaxSize, byte msgFlags, int msgSecurityModel, com.sun.jmx.snmp.SnmpSecurityParameters params, byte[] encryptedPdu, byte[] outputBytes)
This method is called to encode a full scoped pdu that as been encrypted. contextName, contextEngineID and data are known.
The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).

param
version The SNMP protocol version.
param
msgID The SNMP message ID.
param
msgMaxSize The max message size.
param
msgFlags The message flags.
param
msgSecurityModel The message security model.
param
params The security parameters.
param
encryptedPdu The encrypted pdu.
param
outputBytes The buffer containing the encoded message.
return
The encoded bytes number.

public SnmpIncomingRequestgetIncomingRequest(com.sun.jmx.snmp.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 SnmpIncomingResponsegetIncomingResponse(com.sun.jmx.snmp.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 com.sun.jmx.snmp.mpm.SnmpMsgTranslatorgetMsgTranslator()
Returns the current translator.

return
The current translator.

public SnmpOutgoingRequestgetOutgoingRequest(com.sun.jmx.snmp.SnmpPduFactory factory)
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 com.sun.jmx.snmp.SnmpPdugetRequestPdu(com.sun.jmx.snmp.SnmpParams p, int type)
This method is called to instantiate a pdu according to the passed pdu type and parameters.

param
p The request parameters.
param
type The pdu type.
return
The pdu.

public voidsetMsgTranslator(com.sun.jmx.snmp.mpm.SnmpMsgTranslator translator)
In order to change the behavior of the translator, set it.

param
translator The translator that will be used.