Skip to main content


class EnsLib.Telnet.OutboundAdapter extends Ens.OutboundAdapter

Property Inventory

Method Inventory


parameter SETTINGS = TelnetServer:Basic,TelnetPort:Basic,Credentials:Basic:credentialsSelector,SSLConfig:Connection:sslConfigSelector,LoginPrompt,PasswordPrompt,LoginConfirmation,LoginFailNotice,StayConnected,ConnectTimeout,ResponseTimeout,ResponseIdleTimeout;
These properties can be configured or set by the associated Business Operation


property ConnectTimeout as %Numeric (MINVAL = 0) [ InitialExpression = 5 ];
Number of seconds to wait on each connection attempt
Property methods: ConnectTimeoutDisplayToLogical(), ConnectTimeoutGet(), ConnectTimeoutIsValid(), ConnectTimeoutLogicalToDisplay(), ConnectTimeoutNormalize(), ConnectTimeoutSet()
property LoginConfirmation as %String [ InitialExpression = "Last login: " ];
Text to wait for to verify successful login
Property methods: LoginConfirmationDisplayToLogical(), LoginConfirmationGet(), LoginConfirmationIsValid(), LoginConfirmationLogicalToDisplay(), LoginConfirmationLogicalToOdbc(), LoginConfirmationNormalize(), LoginConfirmationSet()
property LoginFailNotice as %String [ InitialExpression = "Login incorrect" ];
Text to wait for to detect failed login
Property methods: LoginFailNoticeDisplayToLogical(), LoginFailNoticeGet(), LoginFailNoticeIsValid(), LoginFailNoticeLogicalToDisplay(), LoginFailNoticeLogicalToOdbc(), LoginFailNoticeNormalize(), LoginFailNoticeSet()
property LoginMacro as %String;
Optional macro to evaluate to log in after detecting the Login (Username) Prompt string The following variables are defined in the context of the macro: %Username=..%CredentialsObj.Username, %Password=..%CredentialsObj.Password, %Adapter=Adapter object. Text enclosed in &Raw() will be sent out without escaping or translation
Property methods: LoginMacroDisplayToLogical(), LoginMacroGet(), LoginMacroIsValid(), LoginMacroLogicalToDisplay(), LoginMacroLogicalToOdbc(), LoginMacroNormalize(), LoginMacroSet()
property LoginPasswordMacro as %String;
Optional macro to evaluate to log in after detecting the Password Prompt string The following variables are defined in the context of the macro: %Username=..%CredentialsObj.Username, %Password=..%CredentialsObj.Password, %Adapter=Adapter object. Text enclosed in &Raw() will be sent out without escaping or translation
Property methods: LoginPasswordMacroDisplayToLogical(), LoginPasswordMacroGet(), LoginPasswordMacroIsValid(), LoginPasswordMacroLogicalToDisplay(), LoginPasswordMacroLogicalToOdbc(), LoginPasswordMacroNormalize(), LoginPasswordMacroSet()
property LoginPrompt as %String [ InitialExpression = "login:" ];
Prompt to wait for before submitting Username to the remote host
Property methods: LoginPromptDisplayToLogical(), LoginPromptGet(), LoginPromptIsValid(), LoginPromptLogicalToDisplay(), LoginPromptLogicalToOdbc(), LoginPromptNormalize(), LoginPromptSet()
property PasswordPrompt as %String [ InitialExpression = "Password:" ];
Prompt to wait for before submitting Password to the remote host
Property methods: PasswordPromptDisplayToLogical(), PasswordPromptGet(), PasswordPromptIsValid(), PasswordPromptLogicalToDisplay(), PasswordPromptLogicalToOdbc(), PasswordPromptNormalize(), PasswordPromptSet()
property ResponseIdleTimeout as %Numeric (MINVAL = 0) [ InitialExpression = 5 ];
Number of seconds of idle time to tolerate while waiting for a complete response
Property methods: ResponseIdleTimeoutDisplayToLogical(), ResponseIdleTimeoutGet(), ResponseIdleTimeoutIsValid(), ResponseIdleTimeoutLogicalToDisplay(), ResponseIdleTimeoutNormalize(), ResponseIdleTimeoutSet()
property ResponseTimeout as %Numeric (MINVAL = -1) [ InitialExpression = 5 ];
Number of seconds to wait for a complete response. Setting the timeout to -1 means wait forever.
Property methods: ResponseTimeoutDisplayToLogical(), ResponseTimeoutGet(), ResponseTimeoutIsValid(), ResponseTimeoutLogicalToDisplay(), ResponseTimeoutNormalize(), ResponseTimeoutSet()
property SSLConfig as %String;
The name of an existing SSL/TLS system configuration set to use (Secure Socket Layer / Transport Layer Security, configured via the system portal's Security Management page).

If your SSL Configuration requires you to supply a password for the local private key file, specify it in the Private key password property of the SSL/TLS Configuration.

Property methods: SSLConfigDisplayToLogical(), SSLConfigGet(), SSLConfigIsValid(), SSLConfigLogicalToDisplay(), SSLConfigLogicalToOdbc(), SSLConfigNormalize(), SSLConfigSet()
property SignonScreen as %String;
Holds a record of the signon screen received from the remote host after sending username & password.
Property methods: SignonScreenDisplayToLogical(), SignonScreenGet(), SignonScreenIsValid(), SignonScreenLogicalToDisplay(), SignonScreenLogicalToOdbc(), SignonScreenNormalize(), SignonScreenSet()
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.
Property methods: StayConnectedDisplayToLogical(), StayConnectedGet(), StayConnectedIsValid(), StayConnectedLogicalToDisplay(), StayConnectedNormalize(), StayConnectedSet()
property Telnet as %Net.TelnetStream;
Telnet Session object
Property methods: TelnetGet(), TelnetGetSwizzled(), TelnetIsValid(), TelnetNewObject(), TelnetSet()
property TelnetPort as %Integer [ InitialExpression = 23 ];
Server port to connect to
Property methods: TelnetPortDisplayToLogical(), TelnetPortGet(), TelnetPortIsValid(), TelnetPortLogicalToDisplay(), TelnetPortNormalize(), TelnetPortSet()
property TelnetServer as %String (MAXLEN = 1500) [ Required ];
Server to connect to
Property methods: TelnetServerDisplayToLogical(), TelnetServerGet(), TelnetServerIsValid(), TelnetServerLogicalToDisplay(), TelnetServerLogicalToOdbc(), TelnetServerNormalize(), TelnetServerSet()


method Connect(pTimeout As %Numeric) as %Status
Prepare for Telnet transfer by logging in, setting the directory and transfer mode
method Disconnect() as %Status
Disconnect from the datasource
method OnDisconnect(pSocket As %IO.Socket, pIntentional As %Boolean, pSCReason As %Status)
Notify of Disconnect from the datasource
method OnInit() as %Status
Inherited description: This user callback method is called just after %OnNew()
method OnKeepalive(pUnused As %Status) as %Status
Inherited description: 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
Inherited description: This user callback method is called just before %OnClose()
method SendMessageString(pRequestString As %String, Output pResponseString As %String, ByRef pTimeout As %Numeric = ..ResponseTimeout, pIdleTimeout As %Numeric = ..ResponseIdleTimeout, pInsensitive As %Boolean, Output pWhich As %Integer, pTarget...) as %Status
Send the given pRequestString, and return in pResponseString any data received back up until pTimeout seconds have elapsed, or until pIdleTimeout seconds elapse with no further data received, or up until any of the optional pTarget strings is encountered.

If pTarget strings are provided the pWhich output argument will contain an integer indicating which of them was matched. A value of 0 in pWhich indicates that none was matched and therefore the timeout expired or an error occurred.

Setting pInsensitive=1 means the pTarget strings will match data received in a case-insensitive way.

To make this method return without waiting for any reply data, call it with pTimeout=0.

classmethod asHex(pStr) as %String
classmethod fromHex(pLine)
classmethod quote(pStr) as %String
method writeLoginMacro(pMacro As %String, pFlush As %Boolean, Output pSC As %Status) as %String

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab