SecurityManager

public class SecurityManager extends Object

Legacy security code; do not use.

Field Summary

protected boolean inCheck This field is deprecated. Use checkPermission(Permission) instead.

Public Constructor Summary

Public Method Summary

void
checkAccept(String host, int port)
void
checkAccess(Thread t)
void
void
void
checkConnect(String host, int port)
void
checkConnect(String host, int port, Object context)
void
void
void
void
checkExit(int status)
void
void
checkListen(int port)
void
checkMemberAccess(Class<?> clazz, int which)
void
void
checkMulticast(InetAddress maddr, byte ttl)
This method is deprecated. use checkMulticast(java.net.InetAddress) instead.
void
void
void
void
void
void
void
void
void
void
checkRead(String file, Object context)
void
void
void
boolean
void
void
boolean
getInCheck()
This method is deprecated. Use checkPermission(Permission) instead.
Object
ThreadGroup
getThreadGroup()
Returns the current thread's thread group.

Protected Method Summary

int
classDepth(String name)
This method is deprecated. Use checkPermission(Permission) instead.
int
classLoaderDepth()
This method is deprecated. Use checkPermission(Permission) instead.
ClassLoader
currentClassLoader()
This method is deprecated. Use checkPermission(Permission) instead.
Class<?>
currentLoadedClass()
This method is deprecated. Use checkPermission(Permission) instead.
Class[]
boolean
inClass(String name)
This method is deprecated. Use checkPermission(Permission) instead.
boolean
inClassLoader()
This method is deprecated. Use checkPermission(Permission) instead.

Inherited Method Summary

Fields

protected boolean inCheck

This field is deprecated.
Use checkPermission(Permission) instead.

Public Constructors

public SecurityManager ()

Public Methods

public void checkAccept (String host, int port)

Parameters
host
port

public void checkAccess (Thread t)

Parameters
t

public void checkAccess (ThreadGroup g)

Parameters
g

public void checkAwtEventQueueAccess ()

public void checkConnect (String host, int port)

Parameters
host
port

public void checkConnect (String host, int port, Object context)

Parameters
host
port
context

public void checkCreateClassLoader ()

public void checkDelete (String file)

Parameters
file

public void checkExec (String cmd)

Parameters
cmd

public void checkExit (int status)

Parameters
status

Parameters
lib

public void checkListen (int port)

Parameters
port

public void checkMemberAccess (Class<?> clazz, int which)

Parameters
clazz
which

public void checkMulticast (InetAddress maddr)

Parameters
maddr

public void checkMulticast (InetAddress maddr, byte ttl)

This method is deprecated.
use checkMulticast(java.net.InetAddress) instead.

Parameters
maddr
ttl

public void checkPackageAccess (String pkg)

Parameters
pkg

public void checkPackageDefinition (String pkg)

Parameters
pkg

public void checkPermission (Permission perm, Object context)

Parameters
perm
context

public void checkPermission (Permission perm)

Parameters
perm

public void checkPrintJobAccess ()

public void checkPropertiesAccess ()

public void checkPropertyAccess (String key)

Parameters
key

public void checkRead (FileDescriptor fd)

Parameters
fd

public void checkRead (String file)

Parameters
file

public void checkRead (String file, Object context)

Parameters
file
context

public void checkSecurityAccess (String target)

Parameters
target

public void checkSetFactory ()

public void checkSystemClipboardAccess ()

public boolean checkTopLevelWindow (Object window)

Parameters
window

public void checkWrite (FileDescriptor fd)

Parameters
fd

public void checkWrite (String file)

Parameters
file

public boolean getInCheck ()

This method is deprecated.
Use checkPermission(Permission) instead.

public Object getSecurityContext ()

public ThreadGroup getThreadGroup ()

Returns the current thread's thread group.

Protected Methods

protected int classDepth (String name)

This method is deprecated.
Use checkPermission(Permission) instead.

Parameters
name

protected int classLoaderDepth ()

This method is deprecated.
Use checkPermission(Permission) instead.

protected ClassLoader currentClassLoader ()

This method is deprecated.
Use checkPermission(Permission) instead.

protected Class<?> currentLoadedClass ()

This method is deprecated.
Use checkPermission(Permission) instead.

protected Class[] getClassContext ()

protected boolean inClass (String name)

This method is deprecated.
Use checkPermission(Permission) instead.

Parameters
name

protected boolean inClassLoader ()

This method is deprecated.
Use checkPermission(Permission) instead.