abstract class EnsLib.JavaGateway.Common
extends %RegisteredObject
Common base class for JavaGateway Inbound and Outbound Adapters including the SQL adapters in their use of JDBC.
parameter REQUIREJGSERVICE = 1;
Is the JGService Setting for this Adapter (subclass) required? If so and it's empty, we will return an error from initialization.
parameter SETTINGS = "JGClientConnectSpec,JGClientEnsClassname,JGService,ExtraJGClasspaths,StayConnected";
parameter USEPROCESSLOADER = 1;
Controls whether Service specific classpath jars are loaded per process "1" (the default) or by thread context "0"
Recomended defaulting this to "1" as some thirdparty ODBC JARs show thread and memory leaking when loaded by thread context
property %ClientIOAddr
as %String;
property %IOAddr
as %String [ ReadOnly ];
String naming JavaGateway TCP/IP address:port, and local port if applicable
property %JGConnectTimeout
as %Numeric(MAXVAL=30000,MINVAL=0) [ InitialExpression = 5 ];
Number of seconds to wait on each attempt to connect to the Java Gateway
property %JGProxy
as %RegisteredObject;
The Proxy for the Java connector object
property %JavaGateway
as %Net.Remote.Java.JavaGateway;
The JavaGateway connection object
property %logConnections
as %Boolean [ InitialExpression = 1 ];
Local flag controlling logging of connection and disconnection events
property ConnectTimeout
as %Numeric(MINVAL=0) [ InitialExpression = 15 ];
Number of seconds to wait on each attempt to connect from the Java Gateway to the ultimate Java client
property Connected
as %Boolean [ InitialExpression = 0 ];
Are we currently connected to the Java Gateway and does the Proxy object exist and is it connected to its remote system
property ExtraJGClasspaths
as %String(MAXLEN=1000);
One or more Java Classpaths (separated by '|' character) needed in addition to the ones configured in the Java Gateway Service
in order to execute the Java code for this Config Item
property JGClientConnectSpec
as %String(MAXLEN=500);
Info the JavaGateway Client class can use to connect to the intended target system
property JGClientEnsClassname
as %String(MAXLEN=128);
InterSystems IRIS classname of the Java Gateway proxy class that serves as this Config Item's interface to its associated Java code
property JGService
as %String(MAXLEN=128);
Config Name of the Java Gateway service controlling the Java Gateway server this Operation will use.
property KeepaliveInterval
as %Numeric [ InitialExpression = 1 ];
How frequently should be check whether a StayConnected connection is still up
property StayConnected
as %Numeric(MINVAL=-1) [ InitialExpression = -1 ];
If non-zero, stay connected to the remote system between handling Requests until idle for this number of seconds. A value of -1 means never disconnect.
method Connect(pClientTimeout As %Numeric = 15, pInbound As %Boolean = 0, pJGTimeout As %Numeric = 5)
as %Status
method ConnectedSet(pValue As %Boolean)
as %Status
This is a Set accessor method for the Connected property.
method Disconnect(pInbound As %Boolean = 0)
Disconnect from the Java Gateway Client
method OnKeepalive()
as %Status
method TestConnection(pInbound As %Boolean = 0)
method initAdapterJG()
as %Status
method initJG()
as %Status