Skip to main content

%Net.Remote.Utility

Class %Net.Remote.Utility Extends %RegisteredObject [ System = 4 ]

This class is for InterSystems internal use. Helper methods for %Net.Remote classes.

Methods

GetAllClassesExecute

ClassMethod GetAllClassesExecute(ByRef qHandle As %Binary, pFilename As %String, pServer As %String, pPort As %String) As %Status

This query returns all classes found inside pFilename (passed to Execute() as the 1st argument). Must also pass the name/IP of the server (2nd argument) and port (3rd argument) of a running Object Gateway Server.

GetAllClassesFetch

ClassMethod GetAllClassesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = GetAllClassesExecute ]

GetAllClassesClose

ClassMethod GetAllClassesClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = GetAllClassesExecute ]

RunCommandViaCPIPE

ClassMethod RunCommandViaCPIPE(pCmd As %String, Output pDevice As %String, Output pOutput As %String, pTimeoutOpen As %Integer = 10, pTimeoutRead As %Integer = 5, ByRef pCmdArgs, ByRef pEnvVars) As %Status

Run a command using a CPIPE device. The first unused CPIPE device is allocated and returned in pDevice. Upon exit the device is open; it is up to the caller to close that device when done with it.
pTimeoutOpen indicates how long to wait for the initial OPEN and pTimeoutRead indicates how long to wait between reading the output chunks.
Note that CPIPE (and PIPE) devices are supported on Unix and Windows, but not on VMS. If this method is invoked on an instance installed on VMS, execution flow will be diverted to method RunCommandViaZF which uses a different technique.

RunCommandViaZF

ClassMethod RunCommandViaZF(pCmd As %String, Output pTempFileName As %String, Output pOutput As %String, pOpenTimeout As %Integer = 5, pDeleteTempFile As %Boolean = 1, Output pRetCode As %String, ByRef pCmdArgs, pAsynchronous As %Boolean = 0) As %Status

Run a command using $ZF(-100) and an external temporary file to store the command output.
If pDeleteTempFile is 0 (false), the temporary file is not deleted; in this case, it is up to the caller to delete it when done with it.

CheckGateway

ClassMethod CheckGateway(pServer As %String, pPort As %String, pVerbose As %Boolean = 0, pPing As %Boolean = 1, pInterface As %String = "") As %Boolean

Check if Gateway is running and optionally if it is responding to PING.
Same as method ##class(%Net.Remote.Service).IsGatewayRunning(pServer, pPort, pVerbose, pPing, pInterface).

IsServerLocal

ClassMethod IsServerLocal(pServer As %String) As %Boolean

Check if the server address or name corresponds to the local machine.

CheckLocalPortFree

ClassMethod CheckLocalPortFree(host As %String = "127.0.0.1", port As %Integer, interface As %String = "") As %Boolean [ Internal ]

This method tries to detect if a local port is in use. It does not check that the: - host is local - port is within the TCP range [0,65535]

IsEnsembleNamespace

ClassMethod IsEnsembleNamespace() As %Boolean

Checks for production-enabled namespace.

GeneratePassphrase

ClassMethod GeneratePassphrase(pName As %String = "", pNoPassphrase As %Boolean = 0) As %String

Generates a Pass phrase for a given Port and records. It returns the Pass phrase to use on the Command Line Uses pNoPassPhrase to clear a previous PassPhrase for this port

RecordPassphrase

ClassMethod RecordPassphrase(pName As %String = "", pPassphraseList As %String) As %Boolean [ Internal ]

This method is deprecated

ClearPassphrase

ClassMethod ClearPassphrase(pName As %String = "") [ Internal ]

Clears recording of the last tPassPhrase

GetPassphrase

ClassMethod GetPassphrase(pName As %String = "", Output pPhrase As %Integer = 0, Output pPhraseHex As %String = "") As %Boolean [ Internal ]

toHex

ClassMethod toHex(pValue As %String = "", pExactLengh As %Integer = 8, pNormalOrder As %Boolean = 1) As %String [ Internal ]

Internal helper method for GeneratePassphrase. For InterSystems use.

getAuthenticationToken

ClassMethod getAuthenticationToken() As %String