APIdia Launch Partner
Top Description Fields Constructors Methods
sun.awt.X11

public final Class XErrorHandlerUtil

extends Object
Class Inheritance
Imports
sun.awt.SunToolkit, sun.util.logging.PlatformLogger

This class contains code of the global toolkit error handler, exposes static methods which allow to set and unset synthetic error handlers.

Field Summary

Modifier and TypeField and Description
private static XErrorHandler
current_error_handler

Current error handler or null if no error handler is set.

private static long
display

The connection to X11 window server.

private static boolean
initPassed

The flag indicating that init was called already.

private static final PlatformLogger
private static boolean
noisyAwtHandler

Value of sun.awt.noisyerrorhandler system property.

pack-priv static volatile XErrorEvent
saved_error

XErrorEvent being handled.

private static long
saved_error_handler

Error handler at the moment of XErrorHandlerUtil initialization.

Constructor Summary

AccessConstructor and Description
private
XErrorHandlerUtil()

Guarantees that no instance of this class can be created.

Method Summary

Modifier and TypeMethod and Description
private static int
globalErrorHandler(long display, long event_ptr)

Called from the native code when an error occurs.

private static void
init(long
the connection to X11 server which should be stored
display
)

Sets the toolkit global error handler, stores the connection to X11 server, which will be used during an error handling process.

public static void
RESTORE_XERROR_HANDLER()

Unsets a current synthetic error handler.

public static int
SAVED_XERROR_HANDLER(long display, XErrorEvent error)

Should be called under LOCK.

public static void
WITH_XERROR_HANDLER(XErrorHandler
the synthetic error handler to set
handler
)

Sets a synthetic error handler.

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

current_error_handlerback to summary
private static XErrorHandler current_error_handler

Current error handler or null if no error handler is set.

displayback to summary
private static long display

The connection to X11 window server.

initPassedback to summary
private static boolean initPassed

The flag indicating that init was called already.

logback to summary
private static final PlatformLogger log
noisyAwtHandlerback to summary
private static boolean noisyAwtHandler

Value of sun.awt.noisyerrorhandler system property.

saved_errorback to summary
pack-priv static volatile XErrorEvent saved_error

XErrorEvent being handled.

saved_error_handlerback to summary
private static long saved_error_handler

Error handler at the moment of XErrorHandlerUtil initialization.

Constructor Detail

XErrorHandlerUtilback to summary
private XErrorHandlerUtil()

Guarantees that no instance of this class can be created.

Method Detail

globalErrorHandlerback to summary
private static int globalErrorHandler(long display, long event_ptr)

Called from the native code when an error occurs.

initback to summary
private static void init(long display)

Sets the toolkit global error handler, stores the connection to X11 server, which will be used during an error handling process. This method is called once from awt_init_Display function defined in awt_GraphicsEnv.c file immediately after the connection to X11 window server is opened.

Parameters
display:long

the connection to X11 server which should be stored

RESTORE_XERROR_HANDLERback to summary
public static void RESTORE_XERROR_HANDLER()

Unsets a current synthetic error handler. Must be called with the acquired AWT lock.

SAVED_XERROR_HANDLERback to summary
public static int SAVED_XERROR_HANDLER(long display, XErrorEvent error)

Should be called under LOCK.

WITH_XERROR_HANDLERback to summary
public static void WITH_XERROR_HANDLER(XErrorHandler handler)

Sets a synthetic error handler. Must be called with the acquired AWT lock.

Parameters
handler:XErrorHandler

the synthetic error handler to set

XSyncback to summary
private static void XSync()