public final class JsiiEngine extends Object implements JsiiCallbackHandler
| Modifier and Type | Method and Description |
|---|---|
JsiiObjectRef |
createNewObject(Object uninitializedNativeObject,
Object... args)
Given an uninitialized native object instance, reads the @Jsii annotations to determine
the jsii module and FQN, and creates a JS object.
|
Enum<?> |
findEnumValue(String enumRef)
Given a jsii enum ref in the form "fqn/member" returns the Java enum value for it.
|
JsiiClient |
getClient() |
static JsiiEngine |
getInstance() |
Object |
getObject(JsiiObjectRef objRef)
Gets an object by reference.
|
Object |
getObject(com.fasterxml.jackson.databind.JsonNode objRefNode)
Given an obj ref, returns a Java object that represents it.
|
com.fasterxml.jackson.databind.JsonNode |
handleCallback(Callback callback)
Invokes a local callback and returns the result/error.
|
void |
loadModule(Class<? extends JsiiModule> moduleClass)
Loads a JavaScript module into the remote jsii-server.
|
Object |
nativeFromObjRef(JsiiObjectRef objRef)
Returns the native java object for a given jsii object reference.
|
JsiiObjectRef |
nativeToObjRef(Object nativeObject)
Returns the jsii object reference given a native object.
|
void |
processAllPendingCallbacks()
Dequeues and processes pending jsii callbacks until there are no more callbacks to process.
|
void |
registerObject(JsiiObjectRef objRef,
Object obj)
Registers an object into the object cache.
|
public static JsiiEngine getInstance()
public JsiiClient getClient()
public void loadModule(Class<? extends JsiiModule> moduleClass)
moduleClass - The jsii module class.public void registerObject(JsiiObjectRef objRef, Object obj)
objRef - The object reference.obj - The object to register.public Object nativeFromObjRef(JsiiObjectRef objRef)
objRef - The object reference.public JsiiObjectRef nativeToObjRef(Object nativeObject)
nativeObject - The native object to obtain the reference forpublic Object getObject(JsiiObjectRef objRef)
objRef - The object referenceJsiiException - If the object is not found.public Object getObject(com.fasterxml.jackson.databind.JsonNode objRefNode)
objRefNode - The objrefpublic Enum<?> findEnumValue(String enumRef)
enumRef - The jsii enum ref.public void processAllPendingCallbacks()
public com.fasterxml.jackson.databind.JsonNode handleCallback(Callback callback)
handleCallback in interface JsiiCallbackHandlercallback - The callback to invoke.JsiiException - if the callback failed.public JsiiObjectRef createNewObject(Object uninitializedNativeObject, Object... args)
uninitializedNativeObject - An uninitialized native objectargs - Initializer argumentsCopyright © 2019. All rights reserved.