Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


SecurityManagerjava.lang

Java 1.0


This class defines the methods necessary to
implement a security policy for the safe
execution of untrusted code. Before performing potentially sensitive
operations, Java calls methods of the
SecurityManager object currently in effect to
determine whether the operations are permitted. These methods throw a
SecurityException if the operation is not
permitted. Typical applications do not need to use or subclass
SecurityManager. It is typically used only by web
browsers, applet viewers, and other programs that need to run
untrusted code in a controlled environment.


Prior to Java 1.2, this class
is abstract, and the default implementation of
each check( ) method throws a
SecurityException unconditionally. The Java
security mechanism has been overhauled as of Java 1.2. As part of the
overhaul, this class is no longer abstract and its
methods have useful default implementations, so there is rarely a
need to subclass it. checkPermission( ) operates
by invoking the checkPermission( ) method of the
system java.security.AccessController object. In
Java 1.2 and later, all other check( ) methods of
SecurityManager are now implemented on top of
checkPermission( ).

public class

SecurityManager {
// Public Constructors
public

SecurityManager ( );
// Public Instance Methods
public void

checkAccept (String

host , int

port );
public void

checkAccess (ThreadGroup

g );
public void

checkAccess (Thread

t );

1.1 public void

checkAwtEventQueueAccess ( );
public void

checkConnect (String

host , int

port );
public void

checkConnect (String

host , int

port , Object

context );
public void

checkCreateClassLoader ( );
public void

checkDelete (String

file );
public void

checkExec (String

cmd );
public void

checkExit (int

status );
public void

checkLink (String

lib );
public void

checkListen (int

port );

1.1 public void

checkMemberAccess (Class<?>

clazz , int

which );

1.1 public void

checkMulticast (java.net.InetAddress

maddr );
public void

checkPackageAccess (String

pkg );
public void

checkPackageDefinition (String

pkg );

1.2 public void

checkPermission (java.security.Permission

perm );

1.2 public void

checkPermission (java.security.Permission

perm , Object

context );

1.1 public void

checkPrintJobAccess ( );
public void

checkPropertiesAccess ( );
public void

checkPropertyAccess (String

key );
public void

checkRead (String

file );
public void

checkRead (java.io.FileDescriptor

fd );
public void

checkRead (String

file , Object

context );

1.1 public void

checkSecurityAccess (String

target );
public void

checkSetFactory ( );

1.1 public void

checkSystemClipboardAccess ( );
public boolean

checkTopLevelWindow (Object

window );
public void

checkWrite (java.io.FileDescriptor

fd );
public void

checkWrite (String

file );
public Object

getSecurityContext ( ); default:AccessControlContext

1.1 public ThreadGroup

getThreadGroup ( );
// Protected Instance Methods
protected Class[ ]

getClassContext ( ); native
// Deprecated Public Methods

1.1# public void

checkMulticast (java.net.InetAddress

maddr , byte

ttl );

# public boolean

getInCheck ( ); default:false
// Deprecated Protected Methods

# protected int

classDepth (String

name ); native

# protected int

classLoaderDepth ( );

# protected ClassLoader

currentClassLoader ( );

1.1# protected Class<?>

currentLoadedClass ( );

# protected boolean

inClass (String

name );

# protected boolean

inClassLoader ( );
// Deprecated Protected Fields

# protected boolean

inCheck ;
}


Passed To


System.setSecurityManager( )

Returned By


System.getSecurityManager( )


    / 1191