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.
|
void |
onLanguageContextCreated(TruffleContext context,
LanguageInfo language)
Notifies about 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.
|
void |
onLanguageContextInitialized(TruffleContext context,
LanguageInfo language)
Notifies about initialization of a language-specific context in an existing polyglot context.
|
void onContextCreated(TruffleContext context)
void onLanguageContextCreated(TruffleContext context, LanguageInfo language)
context - the polyglot contextlanguage - the language for which a language-specific context was createdvoid onLanguageContextInitialized(TruffleContext context, LanguageInfo language)
context - the polyglot contextlanguage - the language for which a language-specific context was initializedvoid 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)