%External.Interface

%External.Interface is an abstract class that defines the user interface for %SYSTEM external and language class interface elements.


This class is not to be used directly. Internal use only. For the public interface, refer to %SYSTEM.external or one of the %SYSTEM language classes (java, dotnet, python).

Internal Note: The interface for GeneralImpl is the same as for LanguageImpl with one notable exception - all methods accept an External Language Server name. Be sure to keep the API consistent between them. ///

Method Inventory

Methods

abstract classmethod addToPath(path As %RawString) [ Language = objectscript ]

Add a path or paths to executables to the current language gateway path. The path argument can be a simple string containing a single path. For Java, this can be a folder or a jar URL.

Multiple paths can be added by passing a dynamic array or an instance of %Library.ListOfDataTypes containing the paths to be added.

This function throws an exception if an error is encountered.

abstract classmethod disconnect() [ Language = objectscript ]
If a connection to the External Language Server exists then disconnect it.
abstract classmethod getExternalLanguage() as %String [ Language = objectscript ]
Return the external language from the External Language Server.
abstract classmethod getExternalLanguageVersion() as %String [ Language = objectscript ]
Return the external language version from the External Language Server.
abstract classmethod getGateway() as %External.Gateway [ Language = objectscript ]
Return a gateway connection to the specificed External Language Server.
abstract classmethod getProperty() as %ObjectHandle [ Language = objectscript ]
Return the value of a static property from the external class.
abstract classmethod invoke() as %RawString [ Language = objectscript ]
Invoke external code. If invoke() is called as an expression then return any value returned by the external code. If no value is returned by the external code then a <COMMAND> exception is thrown. The externalClass is expected to be passed as the name of the external code container. For Java this is the Java class name. For Python this can be the name of a class or module. The externalMethod is the name of the external unit of code (function, method, etc.) to invoke in the externalClass container. The return value is the value returned by the external code. If the external method does not return a value then invoke() does not return a value.
abstract classmethod isServerRunning() as %Boolean [ Language = objectscript ]
Return true (ObjectScript(1)) if the External Language Server is running, false (ObjectScript(0)) otherwise.
abstract classmethod new() as %Net.Remote.Object [ Language = objectscript ]
Return a new instance of %Net.Remote.Object that is bound to an instance of the external class. Pass the externalClass and any additional constructor arguments necessary.
abstract classmethod serverExists() as %Boolean [ Language = objectscript ]
Return true (ObjectScript(1)) if the External Language Server exists, false otherwise.
abstract classmethod setProperty() [ Language = objectscript ]
Set the value of a static property in the external class.
Feedback