name specifies a symbol which is the name of a proxy definition, defined in Lisp by either define-lisp-proxy or setup-lisp-proxy. The name is parsed by a simple parser as described for com.lispworks.LispCalls.checkLispSymbol (with fboundp =
Once it found the symbol, it makes a proxy the same way that calling make-lisp-proxy with name would, and returns it. The result is an
Object that implements all the interfaces that are defined in the proxy definition, and when the methods of these interfaces are called on the object it calls into Lisp. See define-lisp-proxy for details.
createLispProxy is successful it returns the proxy object. If there is any problem, this will cause a call to
cl:error. If the
cl:error call is not handled, the java-to-lisp-debugger-hook (see init-java-interface) is called with the condition, and then
null is returned from
createLispProxy. If the error is handled and tries to throw out of the context of the Lisp side of
createLispProxy, the throw is blocked and
The method without arguments waits for up to 10000 seconds. The method that takes
long waits for up to seconds seconds. The method that takes
java.util.concurrent.TimeUnit waits for up to the period defined by timeout and unit. See the Java documentation for the possible values of
waitForInitialization returns when LispWorks has finished its initialization or when the wait period has passed. If LispWorks finishes its initialization first,
waitForInitialization returns true. If the wait period has passed,
waitForInitialization returns false.
Until LispWorks finishes its initialization, calls into LispWorks from Java using the other methods in
com.lispworks.LispCalls hang, and raise an exception if hanging for too long. If this is an acceptable behavior, then you do not need
waitForInitialization. If this is not acceptable,
waitForInitialization allows you to check and avoid this situation. Typically your code will do something like:
If the LispWorks dynamic library was created with synchronous initialization (the default), then by the time the loading method (normally
System.load) returns, LispWorks has finished initializing. In this case you need
waitForInitialization only in code that does not know if the loading method has returned (or even called at all).
If the LispWorks dynamic library was created with asynchronous initialization (setup-deliver-dynamic-library-for-java was called with true for asynchronous), the loading method returns immediately, and LispWorks initializes asynchronously. In this situation you can be sure that LispWorks finished initializing only after a call to
waitForInitialization has returned true.
LispWorks User Guide and Reference Manual - 20 Sep 2017