Introduction
The Connector is the central component of the SPI that handles the data flow and internally enables DMZ capability. The Connector class implements the Application Access Interface /PLMB/IF_SPI_APPL_ACCESS, meaning it has the same interface as a Service Provider. This has the benefit that using the Connector feels like directly using a Service Provider.
Usage of Connector
A Service Provider must never be instantiated directly by anyone except the SPI. The only valid way of accessing a Service Provider is using the Connector.
Usage of Connector in FSI Environment
When using the FPM SPI Integration (FSI) the Connector is instantiated and accessed by the Application Model internally and doesn't need to be created by the application directly.
Functionality
Via the Application Access Interface methods of the Connector a Service Provider implementation can be called, e.g. to retrieve data or to execute an action.
In addition to this main functionality the Connector offers three more public methods:
- INVALIDATE_INSTANCE: removes/deletes this Connector instance from the SPI buffer, along with associated instances like the Collector or Metadata Provider instances
- WITHOUT_COMMIT: if this method is called the application indicates that COMMIT WORK and ROLLBACK WORK after a SAVE are in the responsibility of the application and are not to be handled by the Connector/SPI
- CREATE_INSTANCE: Creates a Connector, which internally instantiates the according SP
Instantiation
A Connector is instantiated via static method CREATE_INSTANCE of class /PLMB/CL_SPI_CONNECTOR. By doing so the SPI internally creates a Service Provider instance and returns a Connector instance along with a Collector and Metadata Provider interface to the caller.
Method CREATE_INSTANCE offers the following parameters:
Parameter |
Data Type |
Description |
---|---|---|
IV_ABBID |
/PLMB/SPI_ABBID |
Application Building Block ID (ABBID) (mandatory) |
IS_OPTIONS |
/PLMB/S_SPI_CONNECTOR_OPTIONS |
Connector Options |
IO_MASTER_COLLECTOR |
/PLMB/IF_SPI_COLLECTOR |
Master Collector |
EO_CONNECTOR |
/PLMB/IF_SPI_APPL_ACCESS |
Connector Instance |
EO_COLLECTOR |
/PLMB/IF_SPI_COLLECTOR_OUTPUT |
|
EO_METADATA |
/PLMB/IF_SPI_METADATA_OUTPUT |
The Connector import parameters influence its runtime behavior:
Data Processing Control
Via parameter IS_OPTIONS-CONTROL the following entities can be controlled:
- MESSAGES: Indicates whether supplied messages can be ignored by SPI, are relevant for further processing or should even be forwarded to the master Collector.
- PROPERTIES: Indicates whether supplied properties can be ignored by SPI or are relevant for further processing.
- NODE_INVALIDATION: Indicates whether supplied node invalidation information can be ignored by SPI, are relevant for further processing or should even be forwarded to the master Collector.
Constants for Connector Control Parameters
Messages: /PLMB/IF_SPI_C=>GS_C_CONN_MSG_CNTRL
Properties: /PLMB/IF_SPI_C=>GS_C_CONN_PRPTY_CNTRL
Invalid Nodes: /PLMB/IF_SPI_C=>GS_C_CONN_NODE_INVALID_CNTRL
Master Collector
When filling parameter IO_MASTER_COLLECTOR messages and node invalidation information that belong to the newly created Connector can be forwarded at runtime to the given master Collector. Therefore also the control indicator needs to be set accordingly.
This makes sense whenever a Service Provider (SP), instantiates a Connector to access a second SP and wants to allow its own consumer to access the Collector data of this second SP.
The master SP still has the possibility to filter the Collector data that is forwarded from the second SP. Therefore the master SP can use the initialization method of the second SP's Collector.
Always Forward Node Invalidation Info
It is advisable to always forward the node invalidation information if an SP to SP call takes place, since this ensures that the consumer (e.g. the FPM SPI Integration (FSI)) is aware of any changes that make a new retrieve necessary.
Transient Connector
Via parameter IS_OPTIONS-TRANSIENT you can define that the instantiated Connector has a transient character.
This is basically a contract between SPI and its consumer that no save-relevant operation will be executed when using this Connector instance.