TCP Emit Service (com.ibi.agents.XDTCPEmitAgent)

Syntax:

com.ibi.agents.XDTCPEmitAgent

iIT Service Object:

misc: TCP Emit Agent

Description:

This service emits a document over TCP/IP.

Parameters:

Parameter

Description

Host *

The machine name or IP address of the TCP host.

Port *

The port to which to connect to the host.

Sending Type

Select one of the following options from the drop-down list:

  • NONE. Sending XML.
  • MSB. 4-byte binary length prepended.
  • ASC. 6-byte ASCII length prepended.
  • CLOSE. Send non-XML and close the socket.

Return

Select one of the following options from the drop-down list:

  • status. Status document will be the output document.
  • input. Input document will become the output document.
  • response. Data sent by the target in response to a request from the emitter (for example, GET) will become the output document. If response is selected, then the emitter will wait for a response from the target subject to timeout.

IP Interface Host

Local IP interface host from which the outgoing IP socket originates.

IP Interface Port

Local IP interface port from which the outgoing IP socket originates.

Timeout

Timeout interval for socket. The protocol will test for STOP each cycle of this period.

Set TCP No Delay

If set to true, Nagle's algorithm is disabled on the client socket. This will result in faster line turnaround at the expense of an increased number of packets. (Advanced)

Edges:

The following table lists the available line edges for the TCP Emit Service (com.ibi.agents.XDTCPEmitAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure

Example:

A simple way to test your TCP emitted messages is to configure another running channel with a TCP listener and an appropriate emitter (for example, a File emitter) to consume the messages that are emitted by the service. The following image is an example of configuration settings for a TCP listener:

After deploying and starting the channel with the TCP listener and File emitter, you can test run your process flow containing the TCP Emit service object. You must supply an incoming document that contains the appropriate content. For example, HTML:

<html>
<head> <title>my iWay tcp</title>
</head>
<body>
Testing TCP Emit Service!
</body>
</html>

If the service runs successfully, the TCP listener picks up the sample HTML document that is emitted by the TCP Emit service. The HTML document is then received in the destination folder that is specified for the File emitter.