Home > Class Reference > ENSLIB namespace > EnsLib.TCP.DuplexAdapter
Private  Storage   


class EnsLib.TCP.DuplexAdapter extends Ens.InboundAdapter, Ens.OutboundAdapter


Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 14 20


%CredentialsObj %WarnedLatest %isTCPEventDevice BusinessHost
CallInterval Credentials EventDevice EventPort
IPAddress IPDevice IPPort IsConnected
IsSpawnedJob JobPerConnection KeepaliveInterval LocalInterface
PrincipalDevice QSize RegistryID SSLConfig

%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 ClearEventDevice ClearRuntimeAppData
ClearStaticAppData ClearTCPEventDevice CloseDevice CloseEventDevice
CloseTCPEventDevice CredentialsSet EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch EventDeviceSet GetSettings OnCloseConnection
OnDeviceDisconnected OnDeviceReady OnDeviceTimeout OnInit
OnKeepalive OnOpenConnection OnTask OnTearDown
OpenDevice OpenEventDevice OpenTCPEventDevice OutputData
ResetDevice connectedJob



• parameter InputBufferSize = 8192;
• parameter OpenTimeout = 5;
• parameter OutputBufferSize = 8192;
• parameter SERVICEINPUTCLASS = "Ens.StringContainer";
• parameter SETTINGS = "JobPerConnection:Connection,SSLConfig:Connection:sslConfigSelector,QSize:Connection,LocalInterface:Connection:selector?context={Ens.ContextSearch/TCPLocalInterfaces},IPPort:Basic,IPAddress:Basic";
List of properties can be set as settings in the configuration file format is a comma separated list of property names


• property %isTCPEventDevice as %Boolean [ InitialExpression = 0,Transient ];
• property EventDevice as %String;
The event device name
• property EventPort as %Integer;
The event device port number
• property IPAddress as %String;
IP address to connect to. This property is null if it is in listening mode
• property IPDevice as %String;
The TCP device name
• property IPPort as %Integer;
IP Port
• property IsConnected as %Boolean [ InitialExpression = 0 ];
Boolean to indicate if the TCP device is connected
• property IsSpawnedJob as %Boolean [ InitialExpression = 0 ];
Boolean to indicate if the current job is spawned with TCP device
• property JobPerConnection as %Boolean [ InitialExpression = 1 ];
Spawn a new Job to handle each incoming TCP connection. Allows simultaneous handling of multiple connections.
• property LocalInterface as %String(MAXLEN=250);
In a multi-homed system, specify which network interface the TCP connection should go through. An empty value means to use any interface.
To be able to bind to IPv6 interfaces you may need to enable IPv6 in your Ensemble instance. This is done in the System Management Portal under System Administration > Configuration > Additional Settings > Startup, by editing the IPv6 setting.
• property PrincipalDevice as %String;
Store the principal device of the current process
• property QSize as %Integer(MAXVAL=1000,MINVAL=0) [ InitialExpression = 100 ];
If in Listening mode how many incoming connections should the OS hold open on our behalf until they can be processed.

Set to 0 if only one connection at a time is expected and other connection attempts will be refused by the OS while there is one connection . Set to a large number if many clients will connecting rapidly (1000 is the maximum).

• property SSLConfig as %String(MAXLEN=350);
The name of an existing SSL/TLS system configuration to use (Secure Socket Layer / Transport Layer Security), which can be configured in the System Management Portal under System Administration > Security.
If the SSL configuration requires a password, add a '|' followed by the password after the SSL configuration name, for example: MySSLitem|mypassword
• property TCPReadTimeout as %Integer;
Indicate number of seconds to wait before calling OnDeviceTimeout


• method ClearEventDevice() as %Status
• method ClearTCPEventDevice() as %Status
• method CloseDevice() as %Status
• method CloseEventDevice() as %Status
• method CloseTCPEventDevice() as %Status
• method EventDeviceSet(arg) as %Status
This is a Set accessor method for the EventDevice property.
• method OnCloseConnection() as %Status
• method OnDeviceDisconnected() as %Status
• method OnDeviceReady(pShouldExit As %Boolean) as %Status
• method OnDeviceTimeout(pShouldExit As %Boolean) as %Status
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method OnOpenConnection() as %Status
• method OnTask() as %Status
default InboundAdapter behavior: always call ProcessInput on CallInterval
• method OnTearDown() as %Status
This user callback method is called just before %OnClose()
• method OpenDevice() as %Status
• method OpenEventDevice(pUseTCP As %Boolean = 0) as %Status
• method OpenTCPEventDevice() as %Status
• method OutputData(pData As %String) as %Status
• method ResetDevice() as %Status
• classmethod connectedJob(pBusinessServiceConfigName As %String) as %Status