Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
6454832d
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6454832d
编写于
11月 01, 2012
作者:
O
ohrstrom
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8002101: break out auxiliary classes that will prevent multi-core compilation of the JDK
Reviewed-by: alanb, sla
上级
d1327a43
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
386 addition
and
290 deletion
+386
-290
src/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java
src/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java
+151
-0
src/share/classes/com/sun/jmx/snmp/agent/LongList.java
src/share/classes/com/sun/jmx/snmp/agent/LongList.java
+235
-0
src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java
src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java
+0
-290
未找到文件。
src/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java
0 → 100644
浏览文件 @
6454832d
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
com.sun.jmx.snmp.agent
;
import
java.io.Serializable
;
import
java.util.Enumeration
;
import
java.util.logging.Level
;
import
java.util.Vector
;
import
javax.management.ObjectName
;
import
javax.management.MBeanServer
;
import
javax.management.MalformedObjectNameException
;
import
javax.management.InstanceAlreadyExistsException
;
import
javax.management.MBeanRegistrationException
;
import
javax.management.NotCompliantMBeanException
;
import
static
com
.
sun
.
jmx
.
defaults
.
JmxProperties
.
SNMP_ADAPTOR_LOGGER
;
import
com.sun.jmx.snmp.SnmpOid
;
import
com.sun.jmx.snmp.SnmpVarBind
;
import
com.sun.jmx.snmp.SnmpDefinitions
;
import
com.sun.jmx.snmp.SnmpStatusException
;
import
com.sun.jmx.snmp.SnmpEngine
;
import
com.sun.jmx.snmp.SnmpUnknownModelException
;
import
com.sun.jmx.snmp.internal.SnmpAccessControlModel
;
import
com.sun.jmx.snmp.internal.SnmpEngineImpl
;
/**
* Oid Checker makes use of ACM to check each OID during the getnext process.
*/
class
AcmChecker
{
SnmpAccessControlModel
model
=
null
;
String
principal
=
null
;
int
securityLevel
=
-
1
;
int
version
=
-
1
;
int
pduType
=
-
1
;
int
securityModel
=
-
1
;
byte
[]
contextName
=
null
;
SnmpEngineImpl
engine
=
null
;
LongList
l
=
null
;
AcmChecker
(
SnmpMibRequest
req
)
{
engine
=
(
SnmpEngineImpl
)
req
.
getEngine
();
//We are in V3 architecture, ACM is in the picture.
if
(
engine
!=
null
)
{
if
(
engine
.
isCheckOidActivated
())
{
try
{
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
"SNMP V3 Access Control to be done"
);
}
model
=
(
SnmpAccessControlModel
)
engine
.
getAccessControlSubSystem
().
getModel
(
SnmpDefinitions
.
snmpVersionThree
);
principal
=
req
.
getPrincipal
();
securityLevel
=
req
.
getSecurityLevel
();
pduType
=
req
.
getPdu
().
type
;
version
=
req
.
getRequestPduVersion
();
securityModel
=
req
.
getSecurityModel
();
contextName
=
req
.
getAccessContextName
();
l
=
new
LongList
();
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
final
StringBuilder
strb
=
new
StringBuilder
()
.
append
(
"Will check oid for : principal : "
)
.
append
(
principal
)
.
append
(
"; securityLevel : "
).
append
(
securityLevel
)
.
append
(
"; pduType : "
).
append
(
pduType
)
.
append
(
"; version : "
).
append
(
version
)
.
append
(
"; securityModel : "
).
append
(
securityModel
)
.
append
(
"; contextName : "
).
append
(
contextName
);
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
strb
.
toString
());
}
}
catch
(
SnmpUnknownModelException
e
)
{
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
"Unknown Model, no ACM check."
);
}
}
}
}
}
void
add
(
int
index
,
long
arc
)
{
if
(
model
!=
null
)
l
.
add
(
index
,
arc
);
}
void
remove
(
int
index
)
{
if
(
model
!=
null
)
l
.
remove
(
index
);
}
void
add
(
final
int
at
,
final
long
[]
src
,
final
int
from
,
final
int
count
)
{
if
(
model
!=
null
)
l
.
add
(
at
,
src
,
from
,
count
);
}
void
remove
(
final
int
from
,
final
int
count
)
{
if
(
model
!=
null
)
l
.
remove
(
from
,
count
);
}
void
checkCurrentOid
()
throws
SnmpStatusException
{
if
(
model
!=
null
)
{
SnmpOid
oid
=
new
SnmpOid
(
l
.
toArray
());
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"checkCurrentOid"
,
"Checking access for : "
+
oid
);
}
model
.
checkAccess
(
version
,
principal
,
securityLevel
,
pduType
,
securityModel
,
contextName
,
oid
);
}
}
}
src/share/classes/com/sun/jmx/snmp/agent/LongList.java
0 → 100644
浏览文件 @
6454832d
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
com.sun.jmx.snmp.agent
;
import
java.io.Serializable
;
import
java.util.Enumeration
;
import
java.util.logging.Level
;
import
java.util.Vector
;
import
javax.management.ObjectName
;
import
javax.management.MBeanServer
;
import
javax.management.MalformedObjectNameException
;
import
javax.management.InstanceAlreadyExistsException
;
import
javax.management.MBeanRegistrationException
;
import
javax.management.NotCompliantMBeanException
;
import
static
com
.
sun
.
jmx
.
defaults
.
JmxProperties
.
SNMP_ADAPTOR_LOGGER
;
import
com.sun.jmx.snmp.SnmpOid
;
import
com.sun.jmx.snmp.SnmpVarBind
;
import
com.sun.jmx.snmp.SnmpDefinitions
;
import
com.sun.jmx.snmp.SnmpStatusException
;
import
com.sun.jmx.snmp.SnmpEngine
;
import
com.sun.jmx.snmp.SnmpUnknownModelException
;
import
com.sun.jmx.snmp.internal.SnmpAccessControlModel
;
import
com.sun.jmx.snmp.internal.SnmpEngineImpl
;
/**
* This list is used in order to construct the OID during the getnext.
* The constructed oid is checked by the checker AcmChecker.
*/
final
class
LongList
{
public
static
int
DEFAULT_CAPACITY
=
10
;
public
static
int
DEFAULT_INCREMENT
=
10
;
private
final
int
DELTA
;
private
int
size
;
/**
* The list content. Any access to this variable must be protected
* by a synchronized block on the LongList object.
* Only read-only action should be performed on this object.
**/
public
long
[]
list
;
LongList
()
{
this
(
DEFAULT_CAPACITY
,
DEFAULT_INCREMENT
);
}
LongList
(
int
initialCapacity
)
{
this
(
initialCapacity
,
DEFAULT_INCREMENT
);
}
LongList
(
int
initialCapacity
,
int
delta
)
{
size
=
0
;
DELTA
=
delta
;
list
=
allocate
(
initialCapacity
);
}
/**
* Same behaviour than size() in {@link java.util.List}.
**/
public
final
int
size
()
{
return
size
;}
/**
* Same behaviour than add(long o) in {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
boolean
add
(
final
long
o
)
{
if
(
size
>=
list
.
length
)
resize
();
list
[
size
++]=
o
;
return
true
;
}
/**
* Same behaviour than add(int index, long o) in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
void
add
(
final
int
index
,
final
long
o
)
{
if
(
index
>
size
)
throw
new
IndexOutOfBoundsException
();
if
(
index
>=
list
.
length
)
resize
();
if
(
index
==
size
)
{
list
[
size
++]=
o
;
return
;
}
java
.
lang
.
System
.
arraycopy
(
list
,
index
,
list
,
index
+
1
,
size
-
index
);
list
[
index
]=
o
;
size
++;
}
/**
* Adds <var>count</var> elements to the list.
* @param at index at which the elements must be inserted. The
* first element will be inserted at this index.
* @param src An array containing the elements we want to insert.
* @param from Index of the first element from <var>src</var> that
* must be inserted.
* @param count number of elements to insert.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
void
add
(
final
int
at
,
final
long
[]
src
,
final
int
from
,
final
int
count
)
{
if
(
count
<=
0
)
return
;
if
(
at
>
size
)
throw
new
IndexOutOfBoundsException
();
ensure
(
size
+
count
);
if
(
at
<
size
)
{
java
.
lang
.
System
.
arraycopy
(
list
,
at
,
list
,
at
+
count
,
size
-
at
);
}
java
.
lang
.
System
.
arraycopy
(
src
,
from
,
list
,
at
,
count
);
size
+=
count
;
}
/**
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
remove
(
final
int
from
,
final
int
count
)
{
if
(
count
<
1
||
from
<
0
)
return
-
1
;
if
(
from
+
count
>
size
)
return
-
1
;
final
long
o
=
list
[
from
];
final
int
oldsize
=
size
;
size
=
size
-
count
;
if
(
from
==
size
)
return
o
;
java
.
lang
.
System
.
arraycopy
(
list
,
from
+
count
,
list
,
from
,
size
-
from
);
return
o
;
}
/**
* Same behaviour than remove(int index) in {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
remove
(
final
int
index
)
{
if
(
index
>=
size
)
return
-
1
;
final
long
o
=
list
[
index
];
list
[
index
]=
0
;
if
(
index
==
--
size
)
return
o
;
java
.
lang
.
System
.
arraycopy
(
list
,
index
+
1
,
list
,
index
,
size
-
index
);
return
o
;
}
/**
* Same behaviour than the toArray(long[] a) method in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
[]
toArray
(
long
[]
a
)
{
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
a
,
0
,
size
);
return
a
;
}
/**
* Same behaviour than the toArray() method in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
[]
toArray
()
{
return
toArray
(
new
long
[
size
]);
}
/**
* Resize the list. Increase its capacity by DELTA elements.
* Any call to this method must be protected by a synchronized
* block on this LongList.
**/
private
final
void
resize
()
{
final
long
[]
newlist
=
allocate
(
list
.
length
+
DELTA
);
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
newlist
,
0
,
size
);
list
=
newlist
;
}
/**
* Resize the list. Insure that the new length will be at
* least equal to <var>length</var>.
* @param length new minimal length requested.
* Any call to this method must be protected by a synchronized
* block on this LongList.
**/
private
final
void
ensure
(
int
length
)
{
if
(
list
.
length
<
length
)
{
final
int
min
=
list
.
length
+
DELTA
;
length
=(
length
<
min
)?
min:
length
;
final
long
[]
newlist
=
allocate
(
length
);
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
newlist
,
0
,
size
);
list
=
newlist
;
}
}
/**
* Allocate a new array of object of specified length.
**/
private
final
long
[]
allocate
(
final
int
length
)
{
return
new
long
[
length
];
}
}
src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java
浏览文件 @
6454832d
...
...
@@ -47,296 +47,6 @@ import com.sun.jmx.snmp.SnmpUnknownModelException;
import
com.sun.jmx.snmp.internal.SnmpAccessControlModel
;
import
com.sun.jmx.snmp.internal.SnmpEngineImpl
;
/**
* This list is used in order to construct the OID during the getnext.
* The constructed oid is checked by the checker AcmChecker.
*/
final
class
LongList
{
public
static
int
DEFAULT_CAPACITY
=
10
;
public
static
int
DEFAULT_INCREMENT
=
10
;
private
final
int
DELTA
;
private
int
size
;
/**
* The list content. Any access to this variable must be protected
* by a synchronized block on the LongList object.
* Only read-only action should be performed on this object.
**/
public
long
[]
list
;
LongList
()
{
this
(
DEFAULT_CAPACITY
,
DEFAULT_INCREMENT
);
}
LongList
(
int
initialCapacity
)
{
this
(
initialCapacity
,
DEFAULT_INCREMENT
);
}
LongList
(
int
initialCapacity
,
int
delta
)
{
size
=
0
;
DELTA
=
delta
;
list
=
allocate
(
initialCapacity
);
}
/**
* Same behaviour than size() in {@link java.util.List}.
**/
public
final
int
size
()
{
return
size
;}
/**
* Same behaviour than add(long o) in {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
boolean
add
(
final
long
o
)
{
if
(
size
>=
list
.
length
)
resize
();
list
[
size
++]=
o
;
return
true
;
}
/**
* Same behaviour than add(int index, long o) in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
void
add
(
final
int
index
,
final
long
o
)
{
if
(
index
>
size
)
throw
new
IndexOutOfBoundsException
();
if
(
index
>=
list
.
length
)
resize
();
if
(
index
==
size
)
{
list
[
size
++]=
o
;
return
;
}
java
.
lang
.
System
.
arraycopy
(
list
,
index
,
list
,
index
+
1
,
size
-
index
);
list
[
index
]=
o
;
size
++;
}
/**
* Adds <var>count</var> elements to the list.
* @param at index at which the elements must be inserted. The
* first element will be inserted at this index.
* @param src An array containing the elements we want to insert.
* @param from Index of the first element from <var>src</var> that
* must be inserted.
* @param count number of elements to insert.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
void
add
(
final
int
at
,
final
long
[]
src
,
final
int
from
,
final
int
count
)
{
if
(
count
<=
0
)
return
;
if
(
at
>
size
)
throw
new
IndexOutOfBoundsException
();
ensure
(
size
+
count
);
if
(
at
<
size
)
{
java
.
lang
.
System
.
arraycopy
(
list
,
at
,
list
,
at
+
count
,
size
-
at
);
}
java
.
lang
.
System
.
arraycopy
(
src
,
from
,
list
,
at
,
count
);
size
+=
count
;
}
/**
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
remove
(
final
int
from
,
final
int
count
)
{
if
(
count
<
1
||
from
<
0
)
return
-
1
;
if
(
from
+
count
>
size
)
return
-
1
;
final
long
o
=
list
[
from
];
final
int
oldsize
=
size
;
size
=
size
-
count
;
if
(
from
==
size
)
return
o
;
java
.
lang
.
System
.
arraycopy
(
list
,
from
+
count
,
list
,
from
,
size
-
from
);
return
o
;
}
/**
* Same behaviour than remove(int index) in {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
remove
(
final
int
index
)
{
if
(
index
>=
size
)
return
-
1
;
final
long
o
=
list
[
index
];
list
[
index
]=
0
;
if
(
index
==
--
size
)
return
o
;
java
.
lang
.
System
.
arraycopy
(
list
,
index
+
1
,
list
,
index
,
size
-
index
);
return
o
;
}
/**
* Same behaviour than the toArray(long[] a) method in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
[]
toArray
(
long
[]
a
)
{
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
a
,
0
,
size
);
return
a
;
}
/**
* Same behaviour than the toArray() method in
* {@link java.util.List}.
* Any access to this method should be protected in a synchronized
* block on the LongList object.
**/
public
final
long
[]
toArray
()
{
return
toArray
(
new
long
[
size
]);
}
/**
* Resize the list. Increase its capacity by DELTA elements.
* Any call to this method must be protected by a synchronized
* block on this LongList.
**/
private
final
void
resize
()
{
final
long
[]
newlist
=
allocate
(
list
.
length
+
DELTA
);
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
newlist
,
0
,
size
);
list
=
newlist
;
}
/**
* Resize the list. Insure that the new length will be at
* least equal to <var>length</var>.
* @param length new minimal length requested.
* Any call to this method must be protected by a synchronized
* block on this LongList.
**/
private
final
void
ensure
(
int
length
)
{
if
(
list
.
length
<
length
)
{
final
int
min
=
list
.
length
+
DELTA
;
length
=(
length
<
min
)?
min:
length
;
final
long
[]
newlist
=
allocate
(
length
);
java
.
lang
.
System
.
arraycopy
(
list
,
0
,
newlist
,
0
,
size
);
list
=
newlist
;
}
}
/**
* Allocate a new array of object of specified length.
**/
private
final
long
[]
allocate
(
final
int
length
)
{
return
new
long
[
length
];
}
}
/**
* Oid Checker makes use of ACM to check each OID during the getnext process.
*/
class
AcmChecker
{
SnmpAccessControlModel
model
=
null
;
String
principal
=
null
;
int
securityLevel
=
-
1
;
int
version
=
-
1
;
int
pduType
=
-
1
;
int
securityModel
=
-
1
;
byte
[]
contextName
=
null
;
SnmpEngineImpl
engine
=
null
;
LongList
l
=
null
;
AcmChecker
(
SnmpMibRequest
req
)
{
engine
=
(
SnmpEngineImpl
)
req
.
getEngine
();
//We are in V3 architecture, ACM is in the picture.
if
(
engine
!=
null
)
{
if
(
engine
.
isCheckOidActivated
())
{
try
{
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
"SNMP V3 Access Control to be done"
);
}
model
=
(
SnmpAccessControlModel
)
engine
.
getAccessControlSubSystem
().
getModel
(
SnmpDefinitions
.
snmpVersionThree
);
principal
=
req
.
getPrincipal
();
securityLevel
=
req
.
getSecurityLevel
();
pduType
=
req
.
getPdu
().
type
;
version
=
req
.
getRequestPduVersion
();
securityModel
=
req
.
getSecurityModel
();
contextName
=
req
.
getAccessContextName
();
l
=
new
LongList
();
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
final
StringBuilder
strb
=
new
StringBuilder
()
.
append
(
"Will check oid for : principal : "
)
.
append
(
principal
)
.
append
(
"; securityLevel : "
).
append
(
securityLevel
)
.
append
(
"; pduType : "
).
append
(
pduType
)
.
append
(
"; version : "
).
append
(
version
)
.
append
(
"; securityModel : "
).
append
(
securityModel
)
.
append
(
"; contextName : "
).
append
(
contextName
);
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
strb
.
toString
());
}
}
catch
(
SnmpUnknownModelException
e
)
{
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"AcmChecker(SnmpMibRequest)"
,
"Unknown Model, no ACM check."
);
}
}
}
}
}
void
add
(
int
index
,
long
arc
)
{
if
(
model
!=
null
)
l
.
add
(
index
,
arc
);
}
void
remove
(
int
index
)
{
if
(
model
!=
null
)
l
.
remove
(
index
);
}
void
add
(
final
int
at
,
final
long
[]
src
,
final
int
from
,
final
int
count
)
{
if
(
model
!=
null
)
l
.
add
(
at
,
src
,
from
,
count
);
}
void
remove
(
final
int
from
,
final
int
count
)
{
if
(
model
!=
null
)
l
.
remove
(
from
,
count
);
}
void
checkCurrentOid
()
throws
SnmpStatusException
{
if
(
model
!=
null
)
{
SnmpOid
oid
=
new
SnmpOid
(
l
.
toArray
());
if
(
SNMP_ADAPTOR_LOGGER
.
isLoggable
(
Level
.
FINEST
))
{
SNMP_ADAPTOR_LOGGER
.
logp
(
Level
.
FINEST
,
SnmpMib
.
class
.
getName
(),
"checkCurrentOid"
,
"Checking access for : "
+
oid
);
}
model
.
checkAccess
(
version
,
principal
,
securityLevel
,
pduType
,
securityModel
,
contextName
,
oid
);
}
}
}
/**
* Abstract class for representing an SNMP MIB.
* <P>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录