Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [EnsLib] >  [TCP] >  [OutboundAdapter]
Private  Storage   

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

A generic, protocol-agnostic TCP adapter. Handles making connections. Traffic content is up to the associated Business Operation class.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 8 7


Summary

Properties
%CredentialsObj %WarnedLatest %lastRetryReconnect %logConnections
BusinessHost ConnectTimeout Connected Credentials
Device GetReply IOAddr IPAddress
KeepaliveInterval LocalInterface OldIO Port
ReadTimeout ReconnectRetry RegistryID ResponseTimeout
SSLConfig Socket StayConnected Terminators

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AssignOneSetting ClearAllAppData ClearRuntimeAppData ClearStaticAppData
Connect ConnectedSet CredentialsSet Disconnect
EnumerateSettingsClose EnumerateSettingsExecute EnumerateSettingsFetch FlushWrite
GetAddress GetSettings IsReadError IsWriteError
OnInit OnKeepalive OnTearDown TestConnection

Subclasses
Ens.Enterprise.MsgBank.ClientTCPAdapter EnsLib.EDI.X12.Adapter.TCPOutboundAdapter EnsLib.SOAP.CST.OutboundAdapter
EnsLib.TCP.CountedOutboundAdapter EnsLib.TCP.FramedOutboundAdapter EnsLib.TCP.TextLineOutboundAdapter

Parameters

• parameter QSize = 0;
How many incoming connections should the OS hold open on our behalf until we get around to dealing with them? For outbound we don't need any QSize. Either we are outbound, or we are in '!' inbound mode, in which case only 1 client at a time (per BO pool job) is allowed.
• parameter SETTINGS = "RegistryID:Basic:selector?context={Ens.ServiceRegistry.External.ContextSearch/Services?Protocols_1=OTHER},IPAddress:Basic,Port:Basic,StayConnected:Connection,ConnectTimeout:Connection,ReconnectRetry:Connection,GetReply:Connection,ResponseTimeout:Connection";
List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties

• property %lastRetryReconnect as %Integer [ InitialExpression = 0 ];
• property ConnectTimeout as %Numeric(MINVAL=0) [ InitialExpression = 5 ];
Number of seconds to wait on each connection attempt
• property GetReply as %Boolean [ InitialExpression = 1 ];
If true, wait to read a reply message back from the socket before returning.
• property IPAddress as %String(MAXLEN=1000) [ Required ];
IP Address to make a TCP connection to; may be prepended with @AgentName:.

If IPAddress starts with '!', the Adapter will wait for a connection from a remote system. If no IP address follows the '!', any remote system may connect; otherwise any listed IP addresses/ports will be allowed to connect.

After the '!' you may enter a comma-separated list of remote IP addresses to accept connections from, with IP addresses in dotted decimal form for IPV4 and colon-hex form for IPV6, with optional :port for IPV4 and |port for IPV6, e.g. 192.168.1.22, 192.168.1.22:3298 or fe80::4c60:9595:7fb3:8139, fe80::4c60:9595:7fb3:8139|3298.
If :port or |port is specified, connections from other ports at the associated address will be refused.

• property KeepaliveInterval as %Numeric [ InitialExpression = 1 ];
Override initial value
• property Port as %Integer(MAXVAL=65535,MINVAL=0) [ Required ];
TCP Port to connect to
• property ReconnectRetry as %Integer(MINVAL=0) [ InitialExpression = 5 ];
Number of retries at which to drop the connection and try reconnecting again (zero means never disconnect)
• property ResponseTimeout as %Numeric(MINVAL=-1) [ InitialExpression = 15 ];
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.

Methods

• method Connect(pTimeout As %Numeric) as %Status
• method ConnectedSet(pValue As %Boolean) as %Status
This is a Set accessor method for the Connected property.
• method Disconnect()
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method OnKeepalive(pUnused As %Status) as %Status
This method is called from the Host.OnTask() method. It will be called within KeepaliveInterval of the last return from OnTask() or OnKeepalive().
• method OnTearDown() as %Status
This user callback method is called just before %OnClose()
• method TestConnection()
Fix up the properties reflecting our connection state in case we thought we were connected but we lost the socket.


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