Class Reference
%External.Gateway
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [%External] >  [Gateway]
Private  Storage

Abstract Gateway wrapper class for external executables.


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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 20


Summary

Properties
AttemptReconnect Closed ClosedProxies CurrentDevice
CurrentDeviceStack DisableOutputRedirect ExternalLanguage ExternalLanguageVersion
GatewayDevice IsUsingSharedMemory Namespace OutputRedirectHandler
ProtocolVersion ProxyObjectHolder SHMConnectString SequenceNumber
connectClassPaths connectParameters languageServerName xdbcConnection

Methods
%AddToCurrentClassPath %AddToSaveSet %Benchmark %BenchmarkOneJob
%CallUtilityMethod %ClassForName %ClassForNameSynch %ClassIsLatestVersion
%ClassName %ClearGatewayDevice %Connect %ConstructClone
%CreateReverseGateway %DeregisterSuperServer %Disconnect %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DumpProxyMaps %ExpressImport
%Extends %FindServerByHostPort %FlushClosedIRISObjects %GetAllClasses
%GetContextGateway %GetParameter %GetTimestamp %Import
%IsA %IsModified %IsUsingSharedMemory %LoadCOSClass
%LostConnectionCleanup %New %NormalizeObject %ObjectModified
%OnNew %OriginalNamespace %PackageName %Ping
%PopGatewayDevice %PushGatewayDevice %RecastClass %Reconnect
%RedirectOutput %RegUpdate %RegisterSuperServer %ReleaseObjects
%RemoteService %RemoveFromSaveSet %RetainObject %SerializeObject
%ServiceRequest %SetModified %SetOutputRedirectHandler %SetStatus
%Shutdown %SubscriptSortOrder %TerminateAllSuperServers %TerminateSuperServer
%ValidateObject %WriteOutput ExternalLanguageGet ExternalLanguageVersionGet
Help addToPath convertClassPaths disconnect
getExternalLanguage getExternalLanguageVersion getGateway getJarPath
getProductVersion getProperty getPythonSDKVersions getRGatewayJar
getRemoteGateway importJavaLibraries importPythonLibraries invoke
isAlive isServerRunning new sendOneShutdown
setProperty

Subclasses

Properties

• property languageServerName as %String(MAXLEN=220);

Methods

• method %OnNew(objectGatewayName As %String) as %Status
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, useProcessLoader As %Boolean = 0) 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, useSharedMemoryIfPossible) 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 getPythonSDKVersions() as %String
• classmethod getRGatewayJar() as %String
• classmethod getRemoteGateway(host As %RawString, port As %Integer, timeout As %Numeric, useSharedMemoryIfPossible) 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
• classmethod importPythonLibraries()
• 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.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.