class net.Destination - codbex/codbex-kronos GitHub Wiki

$.net.Destination Class

Returns the network destination with the given name. A network destination contains metadata, for example, host name and port number. A network destination can also contain custom properties.

Reference

SAP Help

https://help.sap.com/doc/3de842783af24336b6305a3c0223a369/2.0.03/en-US/$.net.Destination.html

Module

https://github.com/codbex/codbex-kronos/tree/main/modules/api/api-xsjs/src/main/resources/META-INF/dirigible/kronos/net

Sample Usage

let net = $.net;
let response_prev = require('http/v4/response');

/*
Read service.xshttpdest inside the Demo package that contains:
host=http://localhost;
port=8080;
*/
let dest = new net.Destination("Demo", "service");
// Check if the file has been read properly
response_prev.println("Host: " +dest.host+ " Port: " +dest.port);

Coverage

  • new Destination(package, objectName)

Throws an error if no valid network destination is found with the given name

Parameters Type Description Status
package String The package where the destination is located.
objectName String The name of the destination file.
Members Type Description Status
host String Property used to retrieve the host defined in a network destination.
port String Property used to retrieve the port defined in a network destination.

Unit Tests ⚠️

https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-xsjs/src/test/resources/META-INF/dirigible/test/kronos/net

Integration Tests ❌

Wiki icons legend

✅ - Feature implemented and working as supposed.
⚠️ - Feature partially implemented and needs to be finished.
❌ - Feature not implemented yet.

⚠️ **GitHub.com Fallback** ⚠️