public interface ContextsListener
Use
Instrumenter.attachContextsListener(com.oracle.truffle.api.instrumentation.ContextsListener, boolean)
to register an implementation of this listener. Use EventBinding.dispose()
to unregister.
The listener gets called when a new context
is created or disposed and
when individual languages are initialized or disposed in that context.
Modifier and Type | Method and Description |
---|---|
void |
onContextClosed(TruffleContext context)
Notifies about close of a polyglot context.
|
void |
onContextCreated(TruffleContext context)
Notifies about creation of a new polyglot context.
|
default void |
onContextResetLimits(TruffleContext context)
Invoked when the resource consumption limits were reset for a particular context.
|
default void |
onLanguageContextCreate(TruffleContext context,
LanguageInfo language)
Notifies before creation of a language-specific context in an existing polyglot context.
|
void |
onLanguageContextCreated(TruffleContext context,
LanguageInfo language)
Notifies about creation of a language-specific context in an existing polyglot context.
|
default void |
onLanguageContextCreateFailed(TruffleContext context,
LanguageInfo language)
Notifies after failed creation of a language-specific context in an existing polyglot
context.
|
void |
onLanguageContextDisposed(TruffleContext context,
LanguageInfo language)
Notifies about disposal of a language-specific context in an existing polyglot context.
|
void |
onLanguageContextFinalized(TruffleContext context,
LanguageInfo language)
Notifies about finalization of a language-specific context in an existing polyglot context.
|
default void |
onLanguageContextInitialize(TruffleContext context,
LanguageInfo language)
Notifies before initialization of a language-specific context in an existing polyglot
context.
|
void |
onLanguageContextInitialized(TruffleContext context,
LanguageInfo language)
Notifies about initialization of a language-specific context in an existing polyglot context.
|
default void |
onLanguageContextInitializeFailed(TruffleContext context,
LanguageInfo language)
Notifies after failed initialization of a language-specific context in an existing polyglot
context.
|
void onContextCreated(TruffleContext context)
default void onLanguageContextCreate(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context is being createdvoid onLanguageContextCreated(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context was createddefault void onLanguageContextCreateFailed(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context creation faileddefault void onLanguageContextInitialize(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context is being initializedvoid onLanguageContextInitialized(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context was initializeddefault void onLanguageContextInitializeFailed(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context initialization failedvoid onLanguageContextFinalized(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context was finalizedvoid onLanguageContextDisposed(TruffleContext context, LanguageInfo language)
context
- the polyglot contextlanguage
- the language for which a language-specific context was disposedvoid onContextClosed(TruffleContext context)
default void onContextResetLimits(TruffleContext context)
Context.resetLimits()
method is called.