10.07.2015 Views

Using TCP Adapters with Ensemble - InterSystems Documentation

Using TCP Adapters with Ensemble - InterSystems Documentation

Using TCP Adapters with Ensemble - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6<strong>Using</strong> the <strong>TCP</strong> Text Line Inbound AdapterEnsLib.<strong>TCP</strong>.TextLineInboundAdapter is the adapter class to use for incoming <strong>TCP</strong> connections over which a <strong>TCP</strong> client and<strong>TCP</strong> listener exchange data as text strings that end <strong>with</strong> a line terminator character. The default terminator is the newlinecharacter (ASCII 10).This chapter explains how to use the EnsLib.<strong>TCP</strong>.TextLineInboundAdapter. It discusses the following topics:• Background Information• <strong>Using</strong> the Adapter• Creating a New Business Service Class• Sample Business Service Class Code• Adapter Settings• Adding a <strong>TCP</strong> Status ServiceAn important example of a business service that uses the EnsLib.<strong>TCP</strong>.TextLineInboundAdapter is the built-in business serviceclass EnsLib.<strong>TCP</strong>.StatusService. This class provides a command-line interface that allows a console user or command-linescript to retrieve basic status information from a running <strong>Ensemble</strong> production. For more information, see “<strong>TCP</strong> StatusService” at the end of this chapter.6.1 Background InformationYou can simply set up the EnsLib.<strong>TCP</strong>.TextLineInboundAdapter as instructed in the next section, “<strong>Using</strong> the Adapter.”However, some developers want more details about how the adapter communicates <strong>with</strong> its configured business service.This section provides those details.If you look at the EnsLib.<strong>TCP</strong>.TextLineInboundAdapter class code, you see that it contains a call to an <strong>Ensemble</strong> frameworkmethod called ProcessInput(). However, the code for the business service class provides a method called OnProcessInput().This section explains the relationship between the two methods. If you want to view <strong>Ensemble</strong> class code, try the following:• In Studio, from the Tools menu choose Class Browser. The Class Browser dialog displays. In the window at left, navigatethe hierarchy to find the class of interest. In the window at right, display details about class members and theclass hierarchy by clicking the tabs along the lower edge of the display: All, Properties, Methods, Parameters, and soon.• In Studio, from the Help menu choose On-line <strong>Documentation</strong>. The documentation home page displays. Scroll downand choose Class Reference Information. The Caché Class Reference home page displays. At top left, for Classes inchoose an <strong>Ensemble</strong>-enabled namespace. Navigate the hierarchy of package names to find the class of interest.<strong>Using</strong> <strong>TCP</strong> <strong>Adapters</strong> <strong>with</strong> <strong>Ensemble</strong> 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!