com.sun.management.snmp.manager
Class SnmpV3Parameters

java.lang.Object
  extended by com.sun.management.snmp.manager.SnmpParams
      extended by com.sun.management.snmp.manager.SnmpV3Parameters
All Implemented Interfaces:
SnmpDefinitions
Direct Known Subclasses:
SnmpUsmParameters

public abstract class SnmpV3Parameters
extends SnmpParams

This class models the parameters that are needed when making SNMP V3 requests. This class is an abstract one. If you want to send V3 requests you need to set a security model. Classes that inherit from this one are SNMP V3 based associated to a particular security model (e.g. SnmpUsmParameters). When a SnmpV3Parameters is instantiated, the security level default value is noAuthNoPriv .

Since:
Java DMK 5.1

Field Summary
 
Fields inherited from interface com.sun.management.snmp.SnmpDefinitions
authMask, authNoPriv, authPriv, authPrivMask, CtxtConsFlag, noAuthNoPriv, noGroupName, noSuchContext, noSuchView, notInView, pduGetBulkRequestPdu, pduGetNextRequestPdu, pduGetRequestPdu, pduGetResponsePdu, pduInformRequestPdu, pduReportPdu, pduSetRequestPdu, pduV1TrapPdu, pduV2TrapPdu, pduWalkRequest, privMask, reportableFlag, snmpAuthNotSupported, snmpBadSecurityLevel, snmpPrivNotSupported, snmpReqAborted, snmpReqEncodingError, snmpReqHandleTooBig, snmpReqInternalError, snmpReqPacketOverflow, snmpReqRefireAfterVbFix, snmpReqSocketIOError, snmpReqTimeout, snmpReqTooBigImpossible, snmpReqUnknownError, snmpRspAuthorizationError, snmpRspBadValue, snmpRspCommitFailed, snmpRspDecodingError, snmpRspEndOfTable, snmpRspGenErr, snmpRspInconsistentName, snmpRspInconsistentValue, snmpRspNoAccess, snmpRspNoCreation, snmpRspNoError, snmpRspNoSuchName, snmpRspNotWritable, snmpRspReadOnly, snmpRspResourceUnavailable, snmpRspTooBig, snmpRspUndoFailed, snmpRspWrongEncoding, snmpRspWrongLength, snmpRspWrongType, snmpRspWrongValue, snmpUnknownPrincipal, snmpUsmBadEngineId, snmpUsmInvalidTimeliness, snmpUsmSecurityModel, snmpV1AccessControlModel, snmpV1MsgProcessingModel, snmpV1SecurityModel, snmpV2AccessControlModel, snmpV2MsgProcessingModel, snmpV2SecurityModel, snmpV3AccessControlModel, snmpV3MsgProcessingModel, snmpVersionOne, snmpVersionThree, snmpVersionTwo, snmpWrongSnmpVersion, trapAuthenticationFailure, trapColdStart, trapEgpNeighborLoss, trapEnterpriseSpecific, trapLinkDown, trapLinkUp, trapWarmStart
 
Constructor Summary
protected SnmpV3Parameters()
          Constructor.
protected SnmpV3Parameters(byte[] contextEngineId, byte[] contextName, byte msgFlags, int msgMaxSize, int msgSecurityModel)
          Constructor.
 
Method Summary
 boolean allowSnmpSets()
          set requests are enabled in V3.
 byte[] getContextEngineId()
          Gets the context engine Id in which requests will be interpreted.
 byte[] getContextName()
          Gets the context name in which requests will be interpreted.
 int getMsgMaxSize()
          Gets the max response size that will be used when sending requests.
 int getMsgSecurityModel()
          Gets the security model that will be used when sending requests.
 int getSecurityLevel()
          Gets the security level that will be used when sending requests.
 SnmpSecurityParameters getSecurityParameters()
          Gets the security parameters that have been created by the son.
 void setContextEngineId(byte[] contextEngineId)
          Sets the context engine Id in which requests will be interpreted.
 void setContextName(byte[] contextName)
          Sets the context name in which requests will be interpreted.
 void setMsgMaxSize(int msgMaxSize)
          Sets the max allowed size for responses.
protected  void setMsgSecurityModel(int msgSecurityModel)
          Sets the security model implemented by the son.
 void setSecurityLevel(int securityLevel)
          Sets the flags that will be used when sending requests.
protected  void setSecurityParameters(SnmpSecurityParameters securParams)
          Called by son at construction time.
 
Methods inherited from class com.sun.management.snmp.manager.SnmpParams
getProtocolVersion, setProtocolVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpV3Parameters

protected SnmpV3Parameters()
Constructor. Can only be called by son.


SnmpV3Parameters

protected SnmpV3Parameters(byte[] contextEngineId,
                           byte[] contextName,
                           byte msgFlags,
                           int msgMaxSize,
                           int msgSecurityModel)
Constructor. Can only be called by son located in this package.

Method Detail

setSecurityParameters

protected void setSecurityParameters(SnmpSecurityParameters securParams)
Called by son at construction time. Each son use a specific set of security parameters. The son stores this info in the father once created.


allowSnmpSets

public boolean allowSnmpSets()
set requests are enabled in V3.

Specified by:
allowSnmpSets in class SnmpParams
Returns:
true, all the time enabled.

setContextEngineId

public void setContextEngineId(byte[] contextEngineId)
Sets the context engine Id in which requests will be interpreted.

Parameters:
contextEngineId - The context engine Id.

getContextEngineId

public byte[] getContextEngineId()
Gets the context engine Id in which requests will be interpreted.

Returns:
The context engine Id.

setContextName

public void setContextName(byte[] contextName)
Sets the context name in which requests will be interpreted.

Parameters:
contextName - The context name.

getContextName

public byte[] getContextName()
Gets the context name in which requests will be interpreted.

Returns:
The context name.

setSecurityLevel

public void setSecurityLevel(int securityLevel)
Sets the flags that will be used when sending requests. The default value is noAuthNoPriv .

Parameters:
securityLevel - The flags.

getSecurityLevel

public int getSecurityLevel()
Gets the security level that will be used when sending requests. The default value is noAuthNoPriv .

Returns:
The security level.

setMsgMaxSize

public void setMsgMaxSize(int msgMaxSize)
Sets the max allowed size for responses.

Parameters:
msgMaxSize - The max size.

getMsgMaxSize

public int getMsgMaxSize()
Gets the max response size that will be used when sending requests.

Returns:
The max size.

setMsgSecurityModel

protected void setMsgSecurityModel(int msgSecurityModel)
Sets the security model implemented by the son. Is called by the son only.


getMsgSecurityModel

public int getMsgSecurityModel()
Gets the security model that will be used when sending requests.

Returns:
The security model.

getSecurityParameters

public SnmpSecurityParameters getSecurityParameters()
Gets the security parameters that have been created by the son. When manipulating this class you should be aware of the son type.

Returns:
The security parameters.

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.