Class SecurityManager
java.lang.Object
java.lang.SecurityManager
- Direct Known Subclasses:
RMISecurityManager
Deprecated, for removal: This API element is subject to removal in a future version.
There is no replacement for this class.
SecurityManager was originally specified to allow an application implement
a security policy. It allowed an application to determine, before performing
a possibly unsafe or security sensitive operation, whether the operation was
being attempted in a security context that allowed the operation.
This feature no longer exists.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Constructs a newSecurityManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAccept(String host, int port) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckConnect(String host, int port) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckConnect(String host, int port, Object context) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckDelete(String file) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckExit(int status) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckListen(int port) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckMulticast(InetAddress maddr) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckMulticast(InetAddress maddr, byte ttl) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckPackageAccess(String pkg) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckPermission(Permission perm) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckPermission(Permission perm, Object context) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckSecurityAccess(String target) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidDeprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidcheckWrite(String file) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.protected Class<?>[]Deprecated, for removal: This API element is subject to removal in a future version.Returns the current execution stack as an array of classes.Deprecated, for removal: This API element is subject to removal in a future version.Returns anAccessControlContextwhere thecheckPermissionmethod always throws anAccessControlExceptionand thegetDomainCombinermethod always returnsnull.Deprecated, for removal: This API element is subject to removal in a future version.Returns the current Thread'sThreadGroup.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
SecurityManager
public SecurityManager()Deprecated, for removal: This API element is subject to removal in a future version.Constructs a newSecurityManager. Setting a security manager withSystem.setSecurityManager(SecurityManager)is not supported.
-
-
Method Details
-
getClassContext
Deprecated, for removal: This API element is subject to removal in a future version.Returns the current execution stack as an array of classes.The length of the array is the number of methods on the execution stack. The element at index
0is the class of the currently executing method, the element at index1is the class of that method's caller, and so on.- API Note:
- The
StackWalkerclass can be used as a replacement for this method. - Returns:
- the execution stack.
-
getSecurityContext
Deprecated, for removal: This API element is subject to removal in a future version.Returns anAccessControlContextwhere thecheckPermissionmethod always throws anAccessControlExceptionand thegetDomainCombinermethod always returnsnull.- API Note:
- This method originally returned a snapshot of the current
calling context, which included the current thread's access
control context and any limited privilege scope. This method has
been changed to always return an innocuous
AccessControlContextthat fails all permission checks. The Security Manager is no longer supported. There is no replacement for the Security Manager or this method. - Returns:
- an
AccessControlContextas specified above - See Also:
-
checkPermission
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
perm- ignored- Throws:
SecurityException- always- Since:
- 1.2
-
checkPermission
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
perm- ignoredcontext- ignored- Throws:
SecurityException- always- Since:
- 1.2
-
checkCreateClassLoader
public void checkCreateClassLoader()Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Throws:
SecurityException- always
-
checkAccess
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
t- ignored- Throws:
SecurityException- always
-
checkAccess
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
g- ignored- Throws:
SecurityException- always
-
checkExit
public void checkExit(int status) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
status- ignored- Throws:
SecurityException- always
-
checkExec
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
cmd- ignored- Throws:
SecurityException- always
-
checkLink
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
lib- ignored- Throws:
SecurityException- always
-
checkRead
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
fd- the system-dependent file descriptor- Throws:
SecurityException- always
-
checkRead
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
file- ignored- Throws:
SecurityException- always
-
checkRead
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
file- ignoredcontext- ignored- Throws:
SecurityException- always
-
checkWrite
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
fd- ignored- Throws:
SecurityException- always
-
checkWrite
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
file- ignored- Throws:
SecurityException- always
-
checkDelete
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
file- ignored- Throws:
SecurityException- always
-
checkConnect
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
host- ignoredport- ignored- Throws:
SecurityException- always
-
checkConnect
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
host- ignoredport- ignoredcontext- ignored- Throws:
SecurityException- always
-
checkListen
public void checkListen(int port) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
port- ignored- Throws:
SecurityException- always
-
checkAccept
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
host- ignoredport- ignored- Throws:
SecurityException- always
-
checkMulticast
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
maddr- ignored- Throws:
SecurityException- always- Since:
- 1.1
-
checkMulticast
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
maddr- ignoredttl- ignored- Throws:
SecurityException- always- Since:
- 1.1
-
checkPropertiesAccess
public void checkPropertiesAccess()Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Throws:
SecurityException- always
-
checkPropertyAccess
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
key- ignored- Throws:
SecurityException- always
-
checkPrintJobAccess
public void checkPrintJobAccess()Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Throws:
SecurityException- always- Since:
- 1.1
-
checkPackageAccess
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
pkg- ignored- Throws:
SecurityException- always
-
checkPackageDefinition
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
pkg- ignored- Throws:
SecurityException- always
-
checkSetFactory
public void checkSetFactory()Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Throws:
SecurityException- always
-
checkSecurityAccess
Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.- Parameters:
target- ignored- Throws:
SecurityException- always- Since:
- 1.1
-
getThreadGroup
Deprecated, for removal: This API element is subject to removal in a future version.Returns the current Thread'sThreadGroup.- Returns:
- the current Thread's
ThreadGroup - Since:
- 1.1
-