本文整理了Java中java.lang.SecurityManager.checkAccess()
方法的一些代码示例,展示了SecurityManager.checkAccess()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SecurityManager.checkAccess()
方法的具体详情如下:
包路径:java.lang.SecurityManager
类名称:SecurityManager
方法名:checkAccess
暂无
代码示例来源:origin: wildfly/wildfly
public void checkAccess(final Thread t) {
if (doCheck()) {
super.checkAccess(t);
}
}
代码示例来源:origin: wildfly/wildfly
public void checkAccess(final ThreadGroup g) {
if (doCheck()) {
super.checkAccess(g);
}
}
代码示例来源:origin: frohoff/ysoserial
@Override
public void checkAccess(Thread t) {
getSecurityManager().checkAccess(t);
}
代码示例来源:origin: frohoff/ysoserial
@Override
public void checkAccess(ThreadGroup g) {
getSecurityManager().checkAccess(g);
}
代码示例来源:origin: robovm/robovm
/**
* If there is a security manager, makes sure caller has
* permission to shut down threads in general (see shutdownPerm).
* If this passes, additionally makes sure the caller is allowed
* to interrupt each worker thread. This might not be true even if
* first check passed, if the SecurityManager treats some threads
* specially.
*/
private void checkShutdownAccess() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(shutdownPerm);
final ReentrantLock mainLock = this.mainLock;
mainLock.lock();
try {
for (Worker w : workers)
security.checkAccess(w.thread);
} finally {
mainLock.unlock();
}
}
}
代码示例来源:origin: neo4j/neo4j
@Override
public void checkAccess( Thread t )
{
if ( managerExists() )
{
securityManager.checkAccess( t );
}
else
{
super.checkAccess( t );
}
}
代码示例来源:origin: neo4j/neo4j
@Override
public void checkAccess( ThreadGroup g )
{
if ( managerExists() )
{
securityManager.checkAccess( g );
}
else
{
super.checkAccess( g );
}
}
代码示例来源:origin: com.github.stefanbirkner/system-rules
@Override
public void checkAccess(ThreadGroup g) {
if (originalSecurityManager != null)
originalSecurityManager.checkAccess(g);
}
代码示例来源:origin: org.eclipse/org.eclipse.ant.core
public void checkAccess(Thread t) {
if (fSecurityManager != null) {
fSecurityManager.checkAccess(t);
}
}
代码示例来源:origin: pentaho/big-data-plugin
@Override
public void checkAccess( Thread t ) {
if ( decorated != null ) {
decorated.checkAccess( t );
}
}
代码示例来源:origin: com.github.stefanbirkner/system-rules
@Override
public void checkAccess(Thread t) {
if (originalSecurityManager != null)
originalSecurityManager.checkAccess(t);
}
代码示例来源:origin: stefanbirkner/system-rules
@Override
public void checkAccess(Thread t) {
if (originalSecurityManager != null)
originalSecurityManager.checkAccess(t);
}
代码示例来源:origin: stackoverflow.com
public final void checkAccess() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkAccess(this);
}
}
代码示例来源:origin: rythmengine/rythmengine
@Override
public void checkAccess(ThreadGroup g) {
checkRythm();
if (null != csm) csm.checkAccess(g);
if (null != osm) osm.checkAccess(g);
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron
public void checkAccess(final ThreadGroup g) {
if (doCheck()) {
super.checkAccess(g);
}
}
代码示例来源:origin: org.wildfly.security/wildfly-security-manager
public void checkAccess(final ThreadGroup g) {
if (doCheck()) {
super.checkAccess(g);
}
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public void checkAccess(ThreadGroup g)
{
// need to override since the default implementation only checks the permission if the current thread's
// in the root-thread-group
if (isSecuredThread())
throw new AccessControlException("access denied: " + MODIFY_THREADGROUP_PERMISSION, MODIFY_THREADGROUP_PERMISSION);
super.checkAccess(g);
}
代码示例来源:origin: jsevellec/cassandra-unit
public void checkAccess(Thread t)
{
// need to override since the default implementation only checks the permission if the current thread's
// in the root-thread-group
if (isSecuredThread())
throw new AccessControlException("access denied: " + MODIFY_THREAD_PERMISSION, MODIFY_THREAD_PERMISSION);
super.checkAccess(t);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public void checkAccess(Thread t)
{
// need to override since the default implementation only checks the permission if the current thread's
// in the root-thread-group
if (isSecuredThread())
throw new AccessControlException("access denied: " + MODIFY_THREAD_PERMISSION, MODIFY_THREAD_PERMISSION);
super.checkAccess(t);
}
代码示例来源:origin: jsevellec/cassandra-unit
public void checkAccess(ThreadGroup g)
{
// need to override since the default implementation only checks the permission if the current thread's
// in the root-thread-group
if (isSecuredThread())
throw new AccessControlException("access denied: " + MODIFY_THREADGROUP_PERMISSION, MODIFY_THREADGROUP_PERMISSION);
super.checkAccess(g);
}
内容来源于网络,如有侵权,请联系作者删除!