%External.Gateway

Abstract Gateway wrapper class for external executables.


This class is not to be used directly. Internal use only.

Property Inventory

Method Inventory

Properties

property languageServerName as %String (MAXLEN = 220);
Property methods: languageServerNameDisplayToLogical(), languageServerNameGet(), languageServerNameIsValid(), languageServerNameLogicalToDisplay(), languageServerNameLogicalToOdbc(), languageServerNameNormalize(), languageServerNameSet()

Methods

method %OnNew(objectGatewayName As %String) as %Status
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method addToPath(path As %String) as %External.Gateway

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 is fluent (returns the instance to support chaining) and it throws an exception if an error is encountered.

method disconnect()
method getExternalLanguage() as %String
method getExternalLanguageVersion() as %String
classmethod getGateway(gatewayName As %DynamicObject) as %External.Gateway
This method is completely replaced by a Context class once someone decides where it goes...
classmethod getJarPath(artifactNameArg As %String) as %String
method getProperty(externalClass As %String, propertyName As %String) as %ObjectHandle
Return the value of a static property from the external class.
classmethod getRGatewayJar() as %String
classmethod getRemoteGateway(host As %RawString, port As %Integer, timeout As %Numeric) as %External.Gateway
Return a gateway connection to a remote External Language Server, identified by host and port #. The External Language Server must be running as it is not automatically started.
classmethod importJavaLibraries() as %Boolean
method invoke(externalClass As %String, externalMethod As %String, args... As %RawString) as %RawString
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 \ 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.
method isServerRunning() as %Boolean
method new(externalClass As %String, args... As %RawString) as %Net.Remote.Object
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.
method setProperty(externalClass As %String, propertyName As %String, value As %RawString)
Set the value of a static property in the external class.

Inherited Members

Inherited Properties

Inherited Methods

Feedback