Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / EnsLib.JavaGateway.OutboundAdapter
Private  Storage   


class EnsLib.JavaGateway.OutboundAdapter extends
Ens.OutboundAdapter, EnsLib.JavaGateway.Common

A generic outbound adapter class intended for use where a Java proxy class will be constructed and Ensemble will communicate with it by sending and retrieving message objects or data streams in a call-and-response fashion. This contrasts with the intended use of the JavaGateway AbstractOperation, which is intended to be subclassed with an adapterless Operation that invokes standard Java APIs directly. This adapter can be used directly without subclassing if the Java proxy class implements the following methods: .Connect(pJGClientConnectSpec,pTimeout,pInbound) .Disconnect(pInbound) .IsConnected(pInbound) .getErrorText() [returns empty string if no error on previous method call] .ReceiveMessage(pTimeout) [inbound only; pMsgIn return needs not be populated if timed out] .SendResponse(pMsgOut) [inbound only, optional-needed if OnProcessInput will return an object] .SendMessage(pMsgOut,pGetReply,pResponseTimeout) [outbound only; pMsgIn return needs not be populated if no responses are anticipated] If a Java proxy cannot be constructed with this interface then you should subclass this adapter and the subclass can optionally override the following methods and call the Java proxy in whatever manner it must. .OnConnectProxy(pTimeout As %Numeric, pInbound As %Boolean) As %Status .OnDisconnectProxy(pInbound As %Boolean) As %Status .OnIsConnectedProxy(pInbound As %Boolean) As %Status .OnReceiveMessage(Output pMsgIn As %RegisteredObject) As %Status [inbound only] .OnSendResponse(pMsgOut As %RegisteredObject) As %Status [inbound only] .OnSendMessage(pMsgOut As %RegisteredObject, Output pMsgIn As %RegisteredObject) As %Status [outbound only]


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 4


%ClientIOAddr %CredentialsObj %IOAddr %JGConnectTimeout
%JGPort %JGProxy %JGSSLConfig %JGServer
%JavaGateway %WarnedLatest %logConnections BusinessHost
ConnectTimeout Connected Credentials ExtraJGClasspaths
GetReply JGClientConnectSpec JGClientEnsClassname JGService
KeepaliveInterval RegistryID ResponseTimeout StayConnected

%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject AssignOneSetting ClearAllAppData ClearRuntimeAppData
ClearStaticAppData Connect ConnectJG ConnectedSet
CredentialsSet Disconnect DisconnectJG EnumerateSettingsClose
EnumerateSettingsExecute EnumerateSettingsFetch EvalInitialExpression GetSettings
OnConnectProxy OnDisconnectProxy OnInit OnIsConnectedProxy
OnKeepalive OnSendMessage OnTearDown SendMessage
TestConnection handleErr initAdapterJG initJG


• property GetReply as %Boolean [ InitialExpression = 1 ];
If true, wait to read a reply message back before returning.
• property JGService as %String(MAXLEN=128) [ Required ];
Config Name of the Java Gateway service controlling the Java Gateway server this Operation will use.
• property ResponseTimeout as %Numeric(MINVAL=-1) [ InitialExpression = 30 ];
Number of seconds to wait for a response to begin arriving back from the remote system after sending a request. Setting the timeout to -1 means wait forever.


• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method OnSendMessage(pMsgOut As %RegisteredObject, Output pMsgIn As %RegisteredObject) as %Status
Override this method to provide customized client send/receive handling
• method SendMessage(pMsgOut As %RegisteredObject, Output pMsgIn As %RegisteredObject = $$$NULLOREF) as %Status
• method handleErr(pSC As %Status) as %Status