com.sun.management.snmp.mpm
Interface SnmpMsgTranslator

All Known Implementing Classes:
SnmpMsgTranslatorCs2Ctxt, SnmpMsgTranslatorV1V2, SnmpMsgTranslatorV3

public interface SnmpMsgTranslator

The translator interface is implemented by classes dealing with a specific SNMP protocol version. SnmpMsgTranslator are used in conjunction with SnmpMsgProcessingModel implementations (e.g. SnmpMsgProcessingModelV3).

Since:
Java DMK 5.1

Method Summary
 byte[] getAccessContext(SnmpMsg msg)
          Returns the message access context name.
 byte[] getContextEngineId(SnmpMsg msg)
          Returns the message context Engine Id.
 byte[] getContextName(SnmpMsg msg)
          Returns the message context name.
 byte[] getEncryptedPdu(SnmpMsg msg)
          Returns the message encrypted pdu or null if no encryption.
 byte[] getFlatSecurityParameters(SnmpMsg msg)
          Returns an encoded representation of security parameters contained in the passed msg.
 byte getMsgFlags(SnmpMsg msg)
          Returns the message flags.
 int getMsgId(SnmpMsg msg)
          Returns the request or message Id contained in the passed message.
 int getMsgMaxSize(SnmpMsg msg)
          Returns the response max message size.
 int getMsgSecurityModel(SnmpMsg msg)
          Returns the message security model.
 byte[] getRawContextName(SnmpMsg msg)
          Returns the raw message context name.
 int getSecurityLevel(SnmpMsg msg)
          Returns the message security level.
 SnmpSecurityParameters getSecurityParameters(SnmpMsg msg)
          Returns the message security parameters.
 void setContextEngineId(SnmpMsg req, byte[] contextEngineId)
          Set the context engine Id of the passed message.
 void setContextName(SnmpMsg req, byte[] contextName)
          Set the context name of the passed message.
 

Method Detail

getMsgId

int getMsgId(SnmpMsg msg)
Returns the request or message Id contained in the passed message. The message is a generic one that is narrowed in the object implementing this interface.


getMsgMaxSize

int getMsgMaxSize(SnmpMsg msg)
Returns the response max message size. The message is a generic one that is narrowed in the object implementing this interface.


getMsgFlags

byte getMsgFlags(SnmpMsg msg)
Returns the message flags. The message is a generic one that is narrowed in the object implementing this interface.


getMsgSecurityModel

int getMsgSecurityModel(SnmpMsg msg)
Returns the message security model. The message is a generic one that is narrowed in the object implementing this interface.


getSecurityLevel

int getSecurityLevel(SnmpMsg msg)
Returns the message security level. The message is a generic one that is narrowed in the object implementing this interface.


getFlatSecurityParameters

byte[] getFlatSecurityParameters(SnmpMsg msg)
Returns an encoded representation of security parameters contained in the passed msg. The message is a generic one that is narrowed in the object implementing this interface.


getSecurityParameters

SnmpSecurityParameters getSecurityParameters(SnmpMsg msg)
Returns the message security parameters. The message is a generic one that is narrowed in the object implementing this interface.


getContextEngineId

byte[] getContextEngineId(SnmpMsg msg)
Returns the message context Engine Id. The message is a generic one that is narrowed in the object implementing this interface.


getContextName

byte[] getContextName(SnmpMsg msg)
Returns the message context name. The message is a generic one that is narrowed in the object implementing this interface.


getRawContextName

byte[] getRawContextName(SnmpMsg msg)
Returns the raw message context name. Raw mean as it is received from the network, without translation. It can be useful when some data are piggy backed in the context name.The message is a generic one that is narrowed in the object implementing this interface.


getAccessContext

byte[] getAccessContext(SnmpMsg msg)
Returns the message access context name. This access context name is used when dealing with access rights (e.g. community for V1/V2 or context name for V3).The message is a generic one that is narrowed in the object implementing this interface.


getEncryptedPdu

byte[] getEncryptedPdu(SnmpMsg msg)
Returns the message encrypted pdu or null if no encryption. The message is a generic one that is narrowed in the object implementing this interface.


setContextName

void setContextName(SnmpMsg req,
                    byte[] contextName)
Set the context name of the passed message.


setContextEngineId

void setContextEngineId(SnmpMsg req,
                        byte[] contextEngineId)
Set the context engine Id of the passed message.


Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.