tcp egress connector

TCP Egress Connector

Version: 17.07

Supported Since: 17.07

What is a TCP Egress Connector?

A TCP Egress Connector is an abstract egress connector, which can be used to implement custom egress connectors for TCP based protocols with a minimum amount of custom coding.

Writing a custom TCP connector

This section walks you through the steps you need to follow when writing a custom TCP egress connector.

Writing the transport components

To implement a basic custom TCP egress connector, concrete implementations of following classes are mandatory.

  • AbstractTCPClientIOEventDispatcher

  • AbstractTCPSender

AbstractTCPClientIOEventDispatcher

This class is used to notify I/O events pending for a particular TCP session. All methods of this class are executed on a dispatch thread of the underlying implementation. Following methods should be implemented by a concrete implementation of AbstractTCPClientIOEventDispatcher. All the methods receive a TCPSession instance as a parameter.

Method

Description

onConnected

Triggers after the TCP session has just been created

onInputReady

Triggers when the TCP session has an input pending

onOutputReady

Triggers when the TCP session has an output pending

onTimeout

Triggers when the TCP session has timed out

onDisconnected

Triggers when the TCP session has disconnected

AbstractTCPSender

This class holds the information that defines the complete functionality of a transport sender. Only a single method should be implemented in the concrete implementation of AbstractTCPSender.

Method

Description

getNewIOEventDispatcher

Creates a new I/O event dispatcher instance of a concrete implementation of AbstractTCPClientIOEventDispatcher and returns it

Writing the connector

Custom TCP egress connector should be a concrete implementation of AbstractTCPEgressConnector.

In this topic
In this topic
Contact Us