com.sun.jdmk.snmp.usm
Class SnmpUserSecurityModel

java.lang.Object
  extended bycom.sun.jdmk.internal.snmp.SnmpModelImpl
      extended bycom.sun.jdmk.snmp.usm.SnmpUserSecurityModel
All Implemented Interfaces:
SnmpModel, SnmpSecurityModel, SnmpUsm

Deprecated. Use package com.sun.management.snmp.usm in preference to classes in this package. This class may be removed in a future version of Java DMK.

public class SnmpUserSecurityModel
extends SnmpModelImpl
implements SnmpUsm

FOR INTERNAL USE ONLY. This is the default implementation of the User Security Model defined in RFC 2574, "Usm for Snmp V3".
It handles timeliness, authentication and encryption.
It is compliant with the defined public interface SnmpUsm. It can be replaced by any Usm compliant model. It manages a set of distant engine status (in case of manager use). These engine proxies are storing the distant timeliness related status.

Since:
Java DMK 5.0

Field Summary
 
Fields inherited from interface com.sun.jdmk.snmp.usm.SnmpUsm
ID, MAX_NB_BOOTS, TIME_WINDOW, usmNoAuthProtocol, usmNoPrivProtocol, usmStatsDecryptionErrors, usmStatsNotInTimeWindows, usmStatsUnknownEngineIds, usmStatsUnknownUserNames, usmStatsUnsupportedSecLevels, usmStatsWrongDigests
 
Constructor Summary
SnmpUserSecurityModel(SnmpSubSystem subsys, SnmpUsmLcd snmplcd)
          Deprecated. Constructor.
 
Method Summary
 SnmpSecurityCache createSecurityCache()
          Deprecated. See SnmpSecurityModel interface for doc.
 SnmpUsmSecurityParameters createUsmSecurityParameters()
          Deprecated. Instantiates the SecurityParameters.
 int generateRequestMsg(SnmpSecurityCache cache, int version, int msgId, int msgMaxSize, byte msgFlags, int msgSecurityModel, SnmpSecurityParameters p, byte[] contextEngineId, byte[] contextName, byte[] data, int dataLength, byte[] outputBytes)
          Deprecated. See SnmpSecurityModel interface for doc.
 int generateResponseMsg(SnmpSecurityCache cache, int version, int msgId, int msgMaxSize, byte msgFlags, int msgSecurityModel, SnmpSecurityParameters p, byte[] contextEngineId, byte[] contextName, byte[] data, int dataLength, byte[] outputBytes)
          Deprecated. See SnmpSecurityModel interface for doc.
 Long getDecryptionErrorsCounter()
          Deprecated. Gets the decryptionErrorsCounter.
 SnmpUsmEnginePeer getEnginePeer(SnmpEngineId id)
          Deprecated. Gets the peer associated with the passed engine Id.
 SnmpUsmLcd getLcd()
          Deprecated. Gets the Lcd.
 Long getNotInTimeWindowsCounter()
          Deprecated. Gets the notInTimeWindowsCounter.
 int getTimelinessWindow()
          Deprecated. Get the time window used for timeliness checks.
 Long getUnknownEngineIdsCounter()
          Deprecated. Gets the unknownEngineIdsCounter.
 Long getUnknownUserNamesCounter()
          Deprecated. Gets the unknownUserNamesCounter.
 Long getUnsupportedSecLevelsCounter()
          Deprecated. Gets the unsupportedSecLevelsCounter.
 Long getWrongDigestsCounter()
          Deprecated. Gets the wrongDigestsCounter.
 SnmpSecurityParameters processIncomingRequest(SnmpSecurityCache cache, int version, int msgId, int msgMaxSize, byte msgFlags, int msgSecurityModel, byte[] msgSecurityParameters, byte[] contextEngineId, byte[] contextName, byte[] data, byte[] encryptedPdu, SnmpDecryptedPdu decryptedPdu)
          Deprecated. See SnmpSecurityModel interface for doc.
 SnmpSecurityParameters processIncomingResponse(SnmpSecurityCache cache, int version, int msgId, int msgMaxSize, byte msgFlags, int msgSecurityModel, byte[] msgSecurityParameters, byte[] contextEngineId, byte[] contextName, byte[] data, byte[] encryptedPdu, SnmpDecryptedPdu decryptedPdu)
          Deprecated. See SnmpSecurityModel interface for doc.
 void releaseSecurityCache(SnmpSecurityCache cache)
          Deprecated. See SnmpSecurityModel interface for doc.
 void setLcd(SnmpUsmLcd lcd)
          Deprecated. Sets the specified Lcd.
 void setTimelinessWindow(int t)
          Deprecated. Set the time window used for timeliness checks.
 
Methods inherited from class com.sun.jdmk.internal.snmp.SnmpModelImpl
getName, getSubSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.jdmk.internal.snmp.SnmpModel
getName, getSubSystem
 

Constructor Detail

SnmpUserSecurityModel

public SnmpUserSecurityModel(SnmpSubSystem subsys,
                             SnmpUsmLcd snmplcd)
Deprecated. 
Constructor. Registered in the sub system using the model Id.

Method Detail

getTimelinessWindow

public int getTimelinessWindow()
Deprecated. 
Get the time window used for timeliness checks. If non are set, the SnmpUsm.TIMEWINDOW is the default used.

Specified by:
getTimelinessWindow in interface SnmpUsm
Returns:
The time window in seconds.

setTimelinessWindow

public void setTimelinessWindow(int t)
Deprecated. 
Set the time window used for timeliness checks. If non are set, the SnmpUsm.TIMEWINDOW is the default used.

Specified by:
setTimelinessWindow in interface SnmpUsm
Parameters:
t - The time window in seconds.

getLcd

public SnmpUsmLcd getLcd()
Deprecated. 
Gets the Lcd.

Specified by:
getLcd in interface SnmpUsm
Returns:
The Lcd.

setLcd

public void setLcd(SnmpUsmLcd lcd)
Deprecated. 
Sets the specified Lcd.

Specified by:
setLcd in interface SnmpUsm
Parameters:
lcd - The Lcd.

getUnsupportedSecLevelsCounter

public Long getUnsupportedSecLevelsCounter()
Deprecated. 
Gets the unsupportedSecLevelsCounter.

Specified by:
getUnsupportedSecLevelsCounter in interface SnmpUsm
Returns:
The unsupportedSecLevelsCounter.

getNotInTimeWindowsCounter

public Long getNotInTimeWindowsCounter()
Deprecated. 
Gets the notInTimeWindowsCounter.

Specified by:
getNotInTimeWindowsCounter in interface SnmpUsm
Returns:
The notInTimeWindowsCounter.

getUnknownUserNamesCounter

public Long getUnknownUserNamesCounter()
Deprecated. 
Gets the unknownUserNamesCounter.

Specified by:
getUnknownUserNamesCounter in interface SnmpUsm
Returns:
The unknownUserNamesCounter.

getUnknownEngineIdsCounter

public Long getUnknownEngineIdsCounter()
Deprecated. 
Gets the unknownEngineIdsCounter.

Specified by:
getUnknownEngineIdsCounter in interface SnmpUsm
Returns:
The unknownEngineIdsCounter.

getWrongDigestsCounter

public Long getWrongDigestsCounter()
Deprecated. 
Gets the wrongDigestsCounter.

Specified by:
getWrongDigestsCounter in interface SnmpUsm
Returns:
The wrongDigestsCounter.

getDecryptionErrorsCounter

public Long getDecryptionErrorsCounter()
Deprecated. 
Gets the decryptionErrorsCounter.

Specified by:
getDecryptionErrorsCounter in interface SnmpUsm
Returns:
The decryptionErrorsCounter.

getEnginePeer

public SnmpUsmEnginePeer getEnginePeer(SnmpEngineId id)
Deprecated. 
Gets the peer associated with the passed engine Id.

Specified by:
getEnginePeer in interface SnmpUsm
Parameters:
id - The SNMP engine Id.
Returns:
The peer.

createUsmSecurityParameters

public SnmpUsmSecurityParameters createUsmSecurityParameters()
Deprecated. 
Instantiates the SecurityParameters.

Specified by:
createUsmSecurityParameters in interface SnmpUsm
Returns:
Empty security parameters.

createSecurityCache

public SnmpSecurityCache createSecurityCache()
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
createSecurityCache in interface SnmpSecurityModel

releaseSecurityCache

public void releaseSecurityCache(SnmpSecurityCache cache)
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
releaseSecurityCache in interface SnmpSecurityModel

generateResponseMsg

public int generateResponseMsg(SnmpSecurityCache cache,
                               int version,
                               int msgId,
                               int msgMaxSize,
                               byte msgFlags,
                               int msgSecurityModel,
                               SnmpSecurityParameters p,
                               byte[] contextEngineId,
                               byte[] contextName,
                               byte[] data,
                               int dataLength,
                               byte[] outputBytes)
                        throws SnmpTooBigException,
                               SnmpStatusException,
                               SnmpSecurityException
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
generateResponseMsg in interface SnmpSecurityModel
Throws:
SnmpTooBigException
SnmpStatusException
SnmpSecurityException

generateRequestMsg

public int generateRequestMsg(SnmpSecurityCache cache,
                              int version,
                              int msgId,
                              int msgMaxSize,
                              byte msgFlags,
                              int msgSecurityModel,
                              SnmpSecurityParameters p,
                              byte[] contextEngineId,
                              byte[] contextName,
                              byte[] data,
                              int dataLength,
                              byte[] outputBytes)
                       throws SnmpTooBigException,
                              SnmpStatusException,
                              SnmpSecurityException
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
generateRequestMsg in interface SnmpSecurityModel
Throws:
SnmpTooBigException
SnmpStatusException
SnmpSecurityException

processIncomingRequest

public SnmpSecurityParameters processIncomingRequest(SnmpSecurityCache cache,
                                                     int version,
                                                     int msgId,
                                                     int msgMaxSize,
                                                     byte msgFlags,
                                                     int msgSecurityModel,
                                                     byte[] msgSecurityParameters,
                                                     byte[] contextEngineId,
                                                     byte[] contextName,
                                                     byte[] data,
                                                     byte[] encryptedPdu,
                                                     SnmpDecryptedPdu decryptedPdu)
                                              throws SnmpStatusException,
                                                     SnmpSecurityException
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
processIncomingRequest in interface SnmpSecurityModel
Throws:
SnmpStatusException
SnmpSecurityException

processIncomingResponse

public SnmpSecurityParameters processIncomingResponse(SnmpSecurityCache cache,
                                                      int version,
                                                      int msgId,
                                                      int msgMaxSize,
                                                      byte msgFlags,
                                                      int msgSecurityModel,
                                                      byte[] msgSecurityParameters,
                                                      byte[] contextEngineId,
                                                      byte[] contextName,
                                                      byte[] data,
                                                      byte[] encryptedPdu,
                                                      SnmpDecryptedPdu decryptedPdu)
                                               throws SnmpStatusException,
                                                      SnmpSecurityException
Deprecated. 
See SnmpSecurityModel interface for doc.

Specified by:
processIncomingResponse in interface SnmpSecurityModel
Throws:
SnmpStatusException
SnmpSecurityException

FCS Release
jdmk-5_1-b34.2 2005.11.29_16:24:00_MET

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