Xj3D 2.0 VRML/X3D Code API

org.xj3d.ui.construct.ogl
Class ShutdownManager

java.lang.Object
  extended by org.xj3d.ui.construct.ogl.ShutdownManager
All Implemented Interfaces:
java.lang.Runnable, BrowserCoreListener

public class ShutdownManager
extends java.lang.Object
implements java.lang.Runnable, BrowserCoreListener

A function module that performs a controlled and complete shutdown of the browser constructs internals when either the browser or the application are exiting.

Version:
$Revision: 1.1 $
Author:
Rex Melton

Field Summary
protected  OGLConstruct construct
          The construct instance
protected  java.lang.Thread shutdownThread
          Thread used to handle the system shutdown hook
 
Constructor Summary
ShutdownManager(OGLConstruct construct)
          Constructor
 
Method Summary
 void browserDisposed()
          The browser core has been disposed, all resources may be freed.
 void browserInitialized(VRMLScene scene)
          Ignored.
 void browserShutdown()
          Ignored.
 void run()
          The shutdown thread
protected  void shutdown(boolean isShutdownThread)
          Do an orderly shutdown of the browser's resource managers
 void urlLoadFailed(java.lang.String msg)
          Ignored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

construct

protected OGLConstruct construct
The construct instance


shutdownThread

protected java.lang.Thread shutdownThread
Thread used to handle the system shutdown hook

Constructor Detail

ShutdownManager

public ShutdownManager(OGLConstruct construct)
Constructor

Parameters:
construct - The OGLConstruct instance to manage
Method Detail

run

public void run()
The shutdown thread

Specified by:
run in interface java.lang.Runnable

browserShutdown

public void browserShutdown()
Ignored. Notification that the browser core is shutting down the current content.

Specified by:
browserShutdown in interface BrowserCoreListener

browserDisposed

public void browserDisposed()
The browser core has been disposed, all resources may be freed.

Specified by:
browserDisposed in interface BrowserCoreListener

urlLoadFailed

public void urlLoadFailed(java.lang.String msg)
Ignored. The browser core tried to load a URL and failed.

Specified by:
urlLoadFailed in interface BrowserCoreListener
Parameters:
msg - An error message describing the failure

browserInitialized

public void browserInitialized(VRMLScene scene)
Ignored. Notification that a world has been loaded.

Specified by:
browserInitialized in interface BrowserCoreListener
Parameters:
scene - The new scene that has been loaded

shutdown

protected void shutdown(boolean isShutdownThread)
Do an orderly shutdown of the browser's resource managers

Parameters:
isShutdownThread - Is this method being called from the Runtime shutdown hook.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium