Package provided.owlMaps.cefUtils.impl
Class CefObjectFactory
java.lang.Object
provided.owlMaps.cefUtils.impl.CefObjectFactory
- All Implemented Interfaces:
ICefObjectFactory
public class CefObjectFactory extends java.lang.Object implements ICefObjectFactory
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS CLASS DIRECTLY! ***
An concrete factory for instantiating new ICefObjects
An concrete factory for instantiating new ICefObjects
- Author:
- swong
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CEF_OBJECT_CALL
The name of the Javascript method to make a method call on CEF accessible object that has a return valuestatic java.lang.String
CEF_OBJECT_CALL_VOID
The name of the Javascript method to make a method call on CEF accessible object that has a void returnstatic java.lang.String
CEF_OBJECT_GET
The name of the Javascript method to make a property gettor call on CEF accessible objectstatic java.lang.String
CEF_OBJECT_SET
The name of the Javascript method to make a property settor call on CEF accessible objectprivate ICefUtils
cefUtils
CEF utilities for internal use.static java.lang.String
MAKE_CEF_OBJECT
The name of the Javascript method to make a CEF accessible objectprivate java.util.Map<java.util.UUID,java.util.function.Consumer<java.util.UUID>>
newObjQueue
A map of IDs to processing functions for objects pending instantiation on the Javascript side. -
Constructor Summary
Constructors Constructor Description CefObjectFactory(ICefUtils cefUtils)
Construct a new factory instance -
Method Summary
Modifier and Type Method Description ICefObject
make(java.lang.String jsClassname, java.lang.Object... params)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate a new ICefObject given a JavaScript classname and constructor parametersprivate ICefObject
make(java.util.function.Supplier<java.util.UUID> getIdFn)
Instantiate a new ICefObject instance given a Supplier of its ID value.ICefObject
make(java.util.UUID id)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate a new ICefObject with a known ID valuevoid
serviceObjectReturn(java.util.UUID requestId, java.util.UUID cefObjId)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Service the the returned CEF object ID associated with the given request ID.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAKE_CEF_OBJECT
public static final java.lang.String MAKE_CEF_OBJECTThe name of the Javascript method to make a CEF accessible object- See Also:
- Constant Field Values
-
CEF_OBJECT_SET
public static final java.lang.String CEF_OBJECT_SETThe name of the Javascript method to make a property settor call on CEF accessible object- See Also:
- Constant Field Values
-
CEF_OBJECT_GET
public static final java.lang.String CEF_OBJECT_GETThe name of the Javascript method to make a property gettor call on CEF accessible object- See Also:
- Constant Field Values
-
CEF_OBJECT_CALL
public static final java.lang.String CEF_OBJECT_CALLThe name of the Javascript method to make a method call on CEF accessible object that has a return value- See Also:
- Constant Field Values
-
CEF_OBJECT_CALL_VOID
public static final java.lang.String CEF_OBJECT_CALL_VOIDThe name of the Javascript method to make a method call on CEF accessible object that has a void return- See Also:
- Constant Field Values
-
newObjQueue
private java.util.Map<java.util.UUID,java.util.function.Consumer<java.util.UUID>> newObjQueueA map of IDs to processing functions for objects pending instantiation on the Javascript side. Entries MUST be removed from the queue once they have been processed! -
cefUtils
CEF utilities for internal use.
-
-
Constructor Details
-
CefObjectFactory
Construct a new factory instance- Parameters:
cefUtils
- The CEF utilties for internal use. Be careful about circular calls between this factory and the utilities!
-
-
Method Details
-
make
Instantiate a new ICefObject instance given a Supplier of its ID value. The use of a Supplier here decouples this process from whether or not the ID value is available synchronously or asynchronously.- Parameters:
getIdFn
- A Supplier of the ID value- Returns:
- A new ICefObject instance
-
make
Description copied from interface:ICefObjectFactory
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate a new ICefObject given a JavaScript classname and constructor parameters- Specified by:
make
in interfaceICefObjectFactory
- Parameters:
jsClassname
- The JavaScript classname for the new object. Use empty string for generic Javascript objectparams
- The constructor parameters for the class- Returns:
- A new ICefObject instance
-
make
Description copied from interface:ICefObjectFactory
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate a new ICefObject with a known ID value- Specified by:
make
in interfaceICefObjectFactory
- Parameters:
id
- The ID for the new ICefObject- Returns:
- A new ICefObject instance
-
serviceObjectReturn
public void serviceObjectReturn(java.util.UUID requestId, java.util.UUID cefObjId)Description copied from interface:ICefObjectFactory
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Service the the returned CEF object ID associated with the given request ID.- Specified by:
serviceObjectReturn
in interfaceICefObjectFactory
- Parameters:
requestId
- The request ID for the object creation processcefObjId
- The ID of the created CEF object.
-