/* * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.jmx.snmp; // java import // import java.util.Enumeration; import java.net.InetAddress; /** * Defines the user based ACL used by the SNMP protocol adaptor. *
*
This API is a Sun Microsystems internal API and is subject * to change without notice.
* @since 1.5 */ public interface UserAcl { /** * Returns the name of the ACL. * * @return The name of the ACL. */ public String getName(); /** * Checks whether or not the specified user hasREAD
access.
*
* @param user The user name to check.
*
* @return true
if the host has read permission, false
otherwise.
*/
public boolean checkReadPermission(String user);
/**
* Checks whether or not the specified user and context name have READ
access.
*
* @param user The user name to check.
* @param contextName The context name associated with the user.
* @param securityLevel The request security level.
* @return true
if the pair (user, context) has read permission, false
otherwise.
*/
public boolean checkReadPermission(String user, String contextName, int securityLevel);
/**
* Checks whether or not a context name is defined.
*
* @param contextName The context name to check.
*
* @return true
if the context is known, false
otherwise.
*/
public boolean checkContextName(String contextName);
/**
* Checks whether or not the specified user has WRITE
access.
*
* @param user The user to check.
*
* @return true
if the user has write permission, false
otherwise.
*/
public boolean checkWritePermission(String user);
/**
* Checks whether or not the specified user and context name have WRITE
access.
*
* @param user The user name to check.
* @param contextName The context name associated with the user.
* @param securityLevel The request security level.
* @return true
if the pair (user, context) has write permission, false
otherwise.
*/
public boolean checkWritePermission(String user, String contextName, int securityLevel);
}