atexit in the C library), you must ensure that you always keep a
live reference to the callback object.A callback should generally never throw an exception, since it doesn't necessarily have an encompassing Java environment to catch it. Any exceptions thrown will be passed to the default callback exception handler.
| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| public static final List | FORBIDDEN_NAMES
These method names may not be used for a callback method. |
| public static final String | METHOD_NAME
You must use this method name if your callback interface has multiple public methods. |
| FORBIDDEN_NAMES | back to summary |
|---|---|
| public static final List<String> FORBIDDEN_NAMES These method names may not be used for a callback method. | |
| METHOD_NAME | back to summary |
|---|---|
| public static final String METHOD_NAME You must use this method name if your callback interface has multiple
public methods. Typically a callback will have only one such
method, in which case any method name may be used, with the exception
of those in | |
| Modifier and Type | Method and Description |
|---|---|
| public void | uncaughtException(Callback c, Throwable e)
Method invoked when the given callback throws an uncaught exception. |
| uncaughtException | back to summary |
|---|---|
| public void uncaughtException(Callback c, Throwable e) Method invoked when the given callback throws an uncaught exception. Any exception thrown by this method will be ignored. | |