object TrapExit
Provides an approximation to isolated execution within a single JVM. System.exit calls are trapped to prevent the JVM from terminating. This is useful for executing user code that may call System.exit, but actually exiting is undesirable.
Exit is simulated by disposing all top-level windows and interrupting user-started threads. Threads are not stopped and shutdown hooks are not called. It is therefore inappropriate to use this with code that requires shutdown hooks, creates threads that do not terminate, or if concurrent AWT applications are run. This category of code should only be called by forking a new JVM.
- Alphabetic
- By Inheritance
- TrapExit
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Deprecated Value Members
-
def
apply(execute: ⇒ Unit, log: Logger): Int
Run
execute
in a managed context, usinglog
for debugging messages.Run
execute
in a managed context, usinglog
for debugging messages.installManager
must be called before calling this method.- Annotations
- @deprecated
- Deprecated
(Since version 1.6.0) TrapExit feature is removed; just call the function instead
-
def
installManager(): Nothing
Installs the SecurityManager that implements the isolation and returns the previously installed SecurityManager, which may be null.
Installs the SecurityManager that implements the isolation and returns the previously installed SecurityManager, which may be null. This method must be called before using
apply
.- Annotations
- @deprecated
- Deprecated
(Since version 1.6.0) TrapExit feature is removed; just call the function instead
-
def
uninstallManager(previous: Any): Unit
Uninstalls the isolation SecurityManager and restores the old security manager.
Uninstalls the isolation SecurityManager and restores the old security manager.
- Annotations
- @deprecated
- Deprecated
(Since version 1.6.0) TrapExit feature is removed; just call the function instead