How can I make use of custom SST transports for invocation of remote service operations?
The container configuration supports transport mappings that are used to map url schemes to the registered SST transport schemes used for invocation.
The #urlScheme setting can specify a full URL name to enable special processing for a specific resource location, or the value can be a scheme prefix (ie. 'http' or https') for general cases.
The #transportScheme is the identifier for an SstTransport configuration that describes the details of the underlying communications protocol.
<transportMappings>
<transportMapping urlScheme="http" transportScheme="httpl" />
<transportMapping urlScheme="http://vasthost:63003" transportScheme="vasthost" />
<transportMapping urlScheme="https" transportScheme="testhttps" />
</transportMappings>
The code below accomplishes the same task:
| myContainer |
myContainer := SstWSContainer containerNamed: 'VastSampleClientContainer'.
myContainer configuration
mapUrlScheme: 'http' toTransportScheme: 'httpl' ;
mapUrlScheme: 'http://vasthost:63003' toTransportScheme: 'vasthost' ;
mapUrlScheme: 'https' toTransportScheme: 'testhttps'
SST transport schemes must be registered in class SstTransport prior to usage. See the class methods #serverTransportConfiguration and registerPluginConfigurations in SstHttpCommunications for an example of how transport configurations are created and registered.
-------------------------------
Last modified date: 04/08/2023