Runtime components : Service components : Host Access Manager : Interface API and Configuration
  
Interface API and Configuration
Host Access Manager leverages a common interface and configuration to access different types of host system. When a backend host system changes, the application API is not required to change.
Connector
The Connector integrates the definitions of the underlying connect service and the connection factory and pool. Connector creates the connection factory.
<service id="hostMQConnector" refService="mqConnService" implClass="com.unicom.dtt.host.connector.mq.HostMQConnector" pool="commPool"/>
HostConnector hostConnector = Service.readObject("hostMQConnector");
HostConnectionFactory connectionFactory = hostConnector.createHostConnectionFactory();
Note the refService="mqConnService" configuration sets the link between the host connector and the legacy UDTT MQ service:
<service id="mqConnService" QMgrName="QMS" channel="CLIENT.CON.1" charSet="1381" hostName="127.0.0.1" implClass="com.ibm.btt.services.mq.MQConnection" port="1818" replyToQ="QS2" sendToQ="QS3" serverOrClient="client" synchronousMode="enabled"/>
Connection Factory
The Connection Factory creates the connections. One connection factory instance refers to only one connection pool instance.
HostConnection cxn = connectionFactory.getConnection();
Connection
Connection represents a connection session with host. The Connection factory creates a new connection or obtains an existing connection from the pool by case. Connection creates the interaction.
HostInteraction ixn = cxn.createInteraction();
Interaction and InteractionSpec
Interaction represents an interactive action after establishing a connection session with the host. InteractionSpec specifies the Interaction property like verb, timeout, and function name.
HostInteractionSpec ixnSpec = new HostInteractionSpec();
ixnSpec.setInteractionVerb(ixnSpec.SYNC_SEND_RECEIVE);
ixnSpec.setExecutionTimeout(6000);
HostData outgoingData=new UDTTHostData();
outgoingData.setData("TX019#54323487523#599.00");
HostData returnData=new UDTTHostData();
ixn.execute(ixnSpec, outgoingData, returnData);
Users can self-define verbs while extending a new connector, but in general, the following build-in verb definitions are supported: SYNC_SEND, SYNC_SEND_RECEIVE, SYNC_RECEIVE.
HostData
HostData represents the data to be transferred between UDTT and the host. It is a java object. In the pre-build MQ and SNA host access manager implementation, it is plain string text.
Go up to
Host Access Manager