Business services use inbound adapters to receive specific types of input data. You can write a custom inbound adapter that is used by an ObjectScript business service, or it can be used by a business service that is also written in a PEX-supported language. For general information related to all production components written in Java or .NET, see About Business Hosts and Adapters.
Java and .NET Classes
An inbound adapter written in Java extends com.intersystems.enslib.pex.InboundAdapter .
An inbound adapter written in .NET extends InterSystems.EnsLib.PEX.InboundAdapter .
Using the Inbound Adapter
Typically, the OnTask() method performs the main function of the inbound adapter. At runtime, the OnTask() method is called at the interval defined in the settings of the business service that is using the adapter. From within OnTask(), call BusinessHost.ProcessInput() to dispatch to the associated business service. This ProcessInput() method takes an arbitrary object as input and receives an arbitrary object as a return value. The input object becomes the input argument of the business service’s OnProcessInput() method, and the return object comes from the output of the business service’s OnProcessInput() method. These arbitrary objects do not need to be persistent within InterSystems IRIS.
In the Management Portal, a business service has a setting, AdapterClassname, that specifies the class of the inbound adapter associated with the business service. When the inbound adapter is written in Java or .NET, the business service’s AdapterClassname setting must be EnsLib.PEX.InboundAdapter. In addition, the remoteClassname setting must be set to the name of the Java or .NET class of the inbound adapter.