Skip to main content

EnsLib.HTTP.InboundAdapter

class EnsLib.HTTP.InboundAdapter extends EnsLib.TCP.InboundAdapter

HTTP Listener for custom port listening, XML listening, and/or raw HTML handling

Property Inventory

Method Inventory

Parameters

parameter Mode = SW;
Override the Device Mode that will be used to open the TCP socket
parameter SERVICEINPUTCLASS = %Stream.Object;
parameter SERVICEOUTPUTCLASS = %Stream.Object;
parameter SETTINGS = Charset::selector?context={Ens.ContextSearch/CharacterSets},ForceCharset;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties

property %ToLowerHeaderVars as %Boolean [ InitialExpression = 1 ];
Set this to 0 to prevent normalizing of HTTP header variable names to lowercase
Property methods: %ToLowerHeaderVarsDisplayToLogical(), %ToLowerHeaderVarsGet(), %ToLowerHeaderVarsIsValid(), %ToLowerHeaderVarsLogicalToDisplay(), %ToLowerHeaderVarsNormalize(), %ToLowerHeaderVarsSet()
property Charset as %String [ InitialExpression = "Auto" ];
Text Charset to use to decode incoming data. In addition to standard Character Encoding identifiers, allowed values are Auto,AutoXML,Binary,and RawBytes.

Auto means use the encoding declared in the incoming HTTP header Content-Type field.

AutoXML means use the encoding declared in the XML header of the incoming XML body content, if any.

RawBytes or Binary mean to read the raw bytes of the body without any Character Encoding transformation. This is the default action.

Property methods: CharsetDisplayToLogical(), CharsetGet(), CharsetIsValid(), CharsetLogicalToDisplay(), CharsetLogicalToOdbc(), CharsetNormalize(), CharsetSet()
property ForceCharset as %Boolean [ InitialExpression = 0 ];
If True, use the Charset setting rather than any charset that may be declared in the incoming HTTP header Content-Type field
Property methods: ForceCharsetDisplayToLogical(), ForceCharsetGet(), ForceCharsetIsValid(), ForceCharsetLogicalToDisplay(), ForceCharsetNormalize(), ForceCharsetSet()
property ParseBodyFormVars as %Boolean;
Set this property from onInit() in your Service class to make the adapter parse form variables from the form body in case of a form POST
Property methods: ParseBodyFormVarsDisplayToLogical(), ParseBodyFormVarsGet(), ParseBodyFormVarsIsValid(), ParseBodyFormVarsLogicalToDisplay(), ParseBodyFormVarsNormalize(), ParseBodyFormVarsSet()
property Port as Ens.DataType.TCPAgentPort [ InitialExpression = "9980" , Required ];
Local TCP port to listen on for HTTP requests
Property methods: PortDisplayToLogical(), PortGet(), PortIsValid(), PortLogicalToDisplay(), PortLogicalToOdbc(), PortNormalize(), PortSet()
property StayConnected as %Numeric (MINVAL = -1) [ InitialExpression = 0 ];
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()

Methods

method OnConnected() as %Status
method OnTask() as %Status
Inherited description: default InboundAdapter behavior: always call ProcessInput on CallInterval

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab