Skip to main content

%Net.Remote.Service

class %Net.Remote.Service extends %Library.RegisteredObject

This class contains methods to start, monitor and stop an Object Gateway Server for Java or .NET.

Method Inventory

Methods

classmethod CheckJavaVersionSupported(javaVersion As %String = "") as %Status
classmethod CheckMonitor(pName As %String, pPort As %String, Output pJob As %String) as %Status
Check if Gateway is being monitored and return the monitor job number.
classmethod ConnectGateway(pGateway As %Net.Remote.ObjectGateway, ByRef pGatewayConn As %Net.Remote.Gateway, pAdditionalPaths As %String = "", pStartOnDemand As %Boolean = 1, pVerbose As %Boolean = 0) as %Status
Connect or reconnect to a running Object Gateway Server.
When pStartOnDemand is true (which is the default), the Gateway will be started if it is not running.
classmethod GatewayMonitor(Name As %String, Type As %String, TypeExt As %String, Server As %String, Port As %String, Timeout As %String, HeartbeatInterval As %String, HeartbeatFailureTimeout As %String, HeartbeatFailureAction As %String, HeartbeatFailureRetry As %String, pVerbose As %Boolean = 0)
The Gateway Server is monitored with PING requests, according to the time interval specified by HeartbeatInterval. Hourly, a record of type "Info" is logged.
classmethod GetJARDirectory(javaVersion As %String, Output JARDir As %String) as %Status
classmethod GetJavaExecutableCommand(javaHomeDir As %String = "", Output javaExecutable As %String = "", normalizeWithSpaces As %Boolean = 1) as %Status
classmethod GetJavaVersion(javaHomeDir As %String = "", Output version As %String = "") as %Status
Returns the numeric part of the Java version string (e.g. 1.8.0.1) Rules of how the complete version string is formatted can be found here: http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html
classmethod GetRequiredClassPath(javaHomeDir As %String = "", javaMainClassName As %String = $$$javaGatewayClass, Output requiredClassPath As %String = "") as %Status
classmethod IsGatewayRunning(pServer As %String = "127.0.0.1", pPort As %String, pVerbose As %Boolean = 0, Output pSC As %Status, pPing As %Boolean = 1, pInterface As %String = "") as %Boolean
Return true if Gateway is running, based on the status of the TCP port, and responsiveness to PING; or false otherwise.
If parameter pPing is false, then only the status of the TCP connection is checked. The default is true.
Parameter pInterface is the network interface to bind to. The defaul is null, that is, bind to all local interfaces.
If the Gateway is not running, parameter pSC will contain a status code with more details.
classmethod OpenGateway(pName As %String, Output pGateway As %Net.Remote.ObjectGateway) as %Status
Get the Gateway definition object for a given Gateway name.
classmethod PingGateway(pPort As %String, pAddress As %String = "127.0.0.1", pTimeout As %Integer = 5, pReuseSocket As %Boolean = 0, pVerbose As %Boolean = 0) as %Status
"Ping" the Gateway server to check if it is alive. If pReuseSocket is true (the default is false), it will try to reuse the TCP device and in case the TCP connection has become invalid it will reconnect.
Instead of using this method it is recommended to instantiate or use an existing %Net.Remote.Gateway client and %Connect(), call %Ping() and then %Disconnect().
classmethod RunStartCmd(pGateway As %Net.Remote.ObjectGateway, Output pOutput As %String, pVerbose As %Boolean = 0) as %Status
Run command to start the Gateway Server.
classmethod ShutdownGateway(pGateway As %Net.Remote.ObjectGateway, pVerbose As %Boolean = 0) as %Status
Shutdown the Gateway Server.
classmethod StartGateway(pName As %String, pVerbose As %Boolean = 0, Output pOutput As %String) as %Status
Start up the Object Gateway Server whose definition is identified by pName. To supress write of progress messages, pass pVerbose = 0.
classmethod StartGatewayObject(pGateway As %Net.Remote.ObjectGateway, pVerbose As %Boolean = 0, Output pOutput As %String) as %Status
Start up the Object Gateway Server whose definition is an object reference variable pGateway. To supress write of progress messages, pass pVerbose = 0.
classmethod StartMonitor(pName As %String, pVerbose As %Boolean = 0) as %Status
Start a monitor process for the Object Gateway Server whose definition is identified by pName, if the Gateway is configured to be monitored (HeartbeatInterval greater than 0). To supress write of progress messages, pass pVerbose = 0.
classmethod StartMonitorObject(pGateway As %Net.Remote.ObjectGateway, pVerbose As %Boolean = 0)
Monitor the Object Gateway Server whose definition is an object reference variable pGateway. If the Gateway Server has HeartbeatInterval set to a value greater than 0, then job off a background process to monitor the Gateway Server, otherwise just exit.
classmethod StopGateway(pName As %String, pVerbose As %Boolean = 0, pStopMonitor As %Boolean = 1) as %Status
Stop the Object Gateway Server whose definition is identified by pName. To supress write of progress messages, pass pVerbose = 0.
classmethod StopGatewayObject(pGateway As %Net.Remote.ObjectGateway, pVerbose As %Boolean = 0, pStopMonitor As %Boolean = 1) as %Status
Stop the Object Gateway Server whose definition is an object reference variable pGateway. To supress write of progress messages, pass pVerbose = 0.
classmethod StopMonitor(pName As %String, pPort As %String, pVerbose As %Boolean = 0) as %Status
Terminate process currently monitoring a Gateway Server.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab