Skip to main content


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

Property Inventory

Method Inventory


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;
Inherited description: 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 methods: %isTCPEventDeviceDisplayToLogical(), %isTCPEventDeviceGet(), %isTCPEventDeviceIsValid(), %isTCPEventDeviceLogicalToDisplay(), %isTCPEventDeviceNormalize(), %isTCPEventDeviceSet()
property EventDevice as %String;
The event device name
Property methods: EventDeviceDisplayToLogical(), EventDeviceGet(), EventDeviceIsValid(), EventDeviceLogicalToDisplay(), EventDeviceLogicalToOdbc(), EventDeviceNormalize()
property EventPort as %Integer;
The event device port number
Property methods: EventPortDisplayToLogical(), EventPortGet(), EventPortIsValid(), EventPortLogicalToDisplay(), EventPortNormalize(), EventPortSet()
property IPAddress as %String;
IP address to connect to. This property is null if it is in listening mode
Property methods: IPAddressDisplayToLogical(), IPAddressGet(), IPAddressIsValid(), IPAddressLogicalToDisplay(), IPAddressLogicalToOdbc(), IPAddressNormalize(), IPAddressSet()
property IPDevice as %String;
The TCP device name
Property methods: IPDeviceDisplayToLogical(), IPDeviceGet(), IPDeviceIsValid(), IPDeviceLogicalToDisplay(), IPDeviceLogicalToOdbc(), IPDeviceNormalize(), IPDeviceSet()
property IPPort as %Integer;
IP Port
Property methods: IPPortDisplayToLogical(), IPPortGet(), IPPortIsValid(), IPPortLogicalToDisplay(), IPPortNormalize(), IPPortSet()
property IsConnected as %Boolean [ InitialExpression = 0 ];
Boolean to indicate if the TCP device is connected
Property methods: IsConnectedDisplayToLogical(), IsConnectedGet(), IsConnectedIsValid(), IsConnectedLogicalToDisplay(), IsConnectedNormalize(), IsConnectedSet()
property IsSpawnedJob as %Boolean [ InitialExpression = 0 ];
Boolean to indicate if the current job is spawned with TCP device
Property methods: IsSpawnedJobDisplayToLogical(), IsSpawnedJobGet(), IsSpawnedJobIsValid(), IsSpawnedJobLogicalToDisplay(), IsSpawnedJobNormalize(), IsSpawnedJobSet()
property JobPerConnection as %Boolean [ InitialExpression = 1 ];
Spawn a new Job to handle each incoming TCP connection. Allows simultaneous handling of multiple connections.
Property methods: JobPerConnectionDisplayToLogical(), JobPerConnectionGet(), JobPerConnectionIsValid(), JobPerConnectionLogicalToDisplay(), JobPerConnectionNormalize(), JobPerConnectionSet()
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 methods: LocalInterfaceDisplayToLogical(), LocalInterfaceGet(), LocalInterfaceIsValid(), LocalInterfaceLogicalToDisplay(), LocalInterfaceLogicalToOdbc(), LocalInterfaceNormalize(), LocalInterfaceSet()
property PrincipalDevice as %String;
Store the principal device of the current process
Property methods: PrincipalDeviceDisplayToLogical(), PrincipalDeviceGet(), PrincipalDeviceIsValid(), PrincipalDeviceLogicalToDisplay(), PrincipalDeviceLogicalToOdbc(), PrincipalDeviceNormalize(), PrincipalDeviceSet()
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 methods: QSizeDisplayToLogical(), QSizeGet(), QSizeIsValid(), QSizeLogicalToDisplay(), QSizeNormalize(), QSizeSet()
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 methods: SSLConfigDisplayToLogical(), SSLConfigGet(), SSLConfigIsValid(), SSLConfigLogicalToDisplay(), SSLConfigLogicalToOdbc(), SSLConfigNormalize(), SSLConfigSet()
property TCPReadTimeout as %Integer;
Indicate number of seconds to wait before calling OnDeviceTimeout
Property methods: TCPReadTimeoutDisplayToLogical(), TCPReadTimeoutGet(), TCPReadTimeoutIsValid(), TCPReadTimeoutLogicalToDisplay(), TCPReadTimeoutNormalize(), TCPReadTimeoutSet()


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
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
Inherited description: This user callback method is called just after %OnNew()
method OnOpenConnection() as %Status
method OnTask() as %Status
Inherited description: default InboundAdapter behavior: always call ProcessInput on CallInterval
method OnTearDown() as %Status
Inherited description: 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

Inherited Members

Inherited Properties

Inherited Methods


FeedbackOpens in a new tab