public final class JsiiClient extends Object
| Constructor and Description |
|---|
JsiiClient(JsiiRuntime runtime)
Creates a new jsii-runtime client.
|
| Modifier and Type | Method and Description |
|---|---|
JsiiPromise |
beginAsyncMethod(JsiiObjectRef objRef,
String method,
com.fasterxml.jackson.databind.node.ArrayNode args)
Begins the execution of an async method.
|
com.fasterxml.jackson.databind.JsonNode |
callMethod(JsiiObjectRef objRef,
String method,
com.fasterxml.jackson.databind.node.ArrayNode args)
Calls a method on a remote object.
|
com.fasterxml.jackson.databind.JsonNode |
callStaticMethod(String fqn,
String method,
com.fasterxml.jackson.databind.node.ArrayNode args)
Invokes a static method.
|
void |
completeCallback(Callback callback,
String error,
com.fasterxml.jackson.databind.JsonNode result)
Completes a callback.
|
JsiiObjectRef |
createObject(String fqn,
Collection<Object> initializerArgs,
Collection<JsiiOverride> overrides)
Creates a remote jsii object.
|
JsiiObjectRef |
createObject(String fqn,
List<Object> initializerArgs)
Creates a remote jsii object.
|
void |
deleteObject(JsiiObjectRef objRef)
Deletes a remote object.
|
com.fasterxml.jackson.databind.JsonNode |
endAsyncMethod(JsiiPromise promise)
Ends the execution of an async method.
|
com.fasterxml.jackson.databind.JsonNode |
getModuleNames(String moduleName)
Returns all names for a jsii module.
|
com.fasterxml.jackson.databind.JsonNode |
getPropertyValue(JsiiObjectRef objRef,
String property)
Gets a value for a property from a remote object.
|
com.fasterxml.jackson.databind.JsonNode |
getStaticPropertyValue(String fqn,
String property)
Gets a value of a static property.
|
void |
loadModule(JsiiModule module)
Loads a JavaScript module into the remote sandbox.
|
List<Callback> |
pendingCallbacks()
Dequques all the currently pending callbacks.
|
void |
setPropertyValue(JsiiObjectRef objRef,
String property,
com.fasterxml.jackson.databind.JsonNode value)
Sets a value for a property in a remote object.
|
void |
setStaticPropertyValue(String fqn,
String property,
com.fasterxml.jackson.databind.JsonNode value)
Sets the value of a mutable static property.
|
public JsiiClient(JsiiRuntime runtime)
runtime - The JsiiRuntime.public void loadModule(JsiiModule module)
module - The module to loadpublic JsiiObjectRef createObject(String fqn, List<Object> initializerArgs)
fqn - The fully-qualified-name of the class.initializerArgs - Constructor arguments.public JsiiObjectRef createObject(String fqn, Collection<Object> initializerArgs, Collection<JsiiOverride> overrides)
fqn - The fully-qualified-name of the class.initializerArgs - Constructor arguments.overrides - A list of async methods to override. If a method is defined as an override, a callback
will be scheduled when it is called, and the promise it returns will only be fulfilled
when the callback is completed.public void deleteObject(JsiiObjectRef objRef)
objRef - The object reference.public com.fasterxml.jackson.databind.JsonNode getPropertyValue(JsiiObjectRef objRef, String property)
objRef - The remote object reference.property - The property name.public void setPropertyValue(JsiiObjectRef objRef, String property, com.fasterxml.jackson.databind.JsonNode value)
objRef - The remote object reference.property - The name of the property.value - The new property value.public com.fasterxml.jackson.databind.JsonNode getStaticPropertyValue(String fqn, String property)
fqn - The FQN of the classproperty - The name of the static propertypublic void setStaticPropertyValue(String fqn, String property, com.fasterxml.jackson.databind.JsonNode value)
fqn - The FQN of the classproperty - The property namevalue - The new valuepublic com.fasterxml.jackson.databind.JsonNode callStaticMethod(String fqn, String method, com.fasterxml.jackson.databind.node.ArrayNode args)
fqn - The FQN of the class.method - The method name.args - The method arguments.public com.fasterxml.jackson.databind.JsonNode callMethod(JsiiObjectRef objRef, String method, com.fasterxml.jackson.databind.node.ArrayNode args)
objRef - The remote object reference.method - The name of the method.args - Method arguments.public JsiiPromise beginAsyncMethod(JsiiObjectRef objRef, String method, com.fasterxml.jackson.databind.node.ArrayNode args)
objRef - The object reference.method - The name of the async method.args - Arguments for the method.JsiiPromise which represents this method.public com.fasterxml.jackson.databind.JsonNode endAsyncMethod(JsiiPromise promise)
promise - The promise returned by beginAsyncMethod.public List<Callback> pendingCallbacks()
public void completeCallback(Callback callback, String error, com.fasterxml.jackson.databind.JsonNode result)
callback - The callback to complete.error - Error information (or null).result - Result (or null).public com.fasterxml.jackson.databind.JsonNode getModuleNames(String moduleName)
moduleName - The name of the module.Copyright © 2019. All rights reserved.