Interface ContextsListener
public interface ContextsListener
Listener to be notified about changes of contexts in guest language application.
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.
- Since:
- 0.30
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Method Details
-
onContextCreated
Notifies about creation of a new polyglot context.- Since:
- 0.30
-
onLanguageContextCreate
Notifies before creation of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context is being created- Since:
- 21.1
-
onLanguageContextCreated
Notifies about creation of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context was created- Since:
- 0.30
-
onLanguageContextCreateFailed
Notifies after failed creation of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context creation failed- Since:
- 21.1
-
onLanguageContextInitialize
Notifies before initialization of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context is being initialized- Since:
- 21.1
-
onLanguageContextInitialized
Notifies about initialization of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context was initialized- Since:
- 0.30
-
onLanguageContextInitializeFailed
Notifies after failed initialization of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context initialization failed- Since:
- 21.1
-
onLanguageContextFinalized
Notifies about finalization of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context was finalized- Since:
- 0.30
-
onLanguageContextDisposed
Notifies about disposal of a language-specific context in an existing polyglot context.- Parameters:
context
- the polyglot contextlanguage
- the language for which a language-specific context was disposed- Since:
- 0.30
-
onContextClosed
Notifies about close of a polyglot context.- Since:
- 0.30
-
onContextResetLimits
Invoked when the resource consumption limits were reset for a particular context. For example this is method each time theContext.resetLimits()
method is called.- Since:
- 20.3
-