Pripojenie na D2000 sa realizuje cez proces Connection to D2000 is realized through D2Connector.exe ktorý je spustený na strane D2000. Pripojenie môže byť definované ako priame (cez objekt connections
) alebo ako reverzné (cez objekt listenableConnection
), pri ktorom sa proces D2Connector pripája na port ktorý otvoril SmartWeb Server (resp. ním použitá knižnica JAPI). SmartWeb nemôže byť nikdy konfigurovaný oboma spôsobmi naraz, ale vždy práve jedným spôsobom, t.j. v konfiguračnom súbore sa bude nachádzať buď definícia objektu connections
alebo listenableConnection
.process which is run on the D2000 side. The connection may be defined as direct (through object connections
) or as reserved (through object listenableConnection
) during which the D2Connector process connects to the port opened by the SmartWeb server (more precisely the JAPI library used by the server). SmartWeb can never be configured by both methods at the same time but always by only one method, meaning that there will be either definition of connections
or listenableConnection
object in the configuration file.
Poznámka |
---|
Note: For a successful connection of the SmartWeb Servera with D2000, it is necessary for the version of the SmartWeb platform to correspond with the version of the D2000 system. For example, with the D2000 version |
Poznámka |
Pozor: Pre úspešné prepojenie SmartWeb Servera s D2000 je nevyhnutné, aby verzia SmartWeb platformy korešpondovala k verzii systému D2000. Napr. k D2000 verzii |
...
|
Direct connection to D2000
Blok kódu | ||
---|---|---|
| ||
{ /* poleobjects'field objektovwith sconfigurations konfiguráciamiof priamychdirect konekciíconnections nato D2000 */ "connections": [ { "host": "localhost", // hostname aleboor IP adresaaddress "port": "3120", "certificatePath" : "C:/cestapath kto X509 certifikátucertificate/d2connector-cert.crt" }, { "host": "localhost", // hostname aleboor IP adresaaddress "port": "3121", "certificatePath" : "C:/cestapath kto X509 certifikátucertificate/d2connector-cert.crt" }, ... ] } |
Object connections v konfiguračnom súbore in the configuration file smartweb.json
obsahuje pole redundantných pripojení na D2000 procesy D2Connector cez atribúty host a port. Dodatočne je možné definovať cestu k X509 certifikátu v súbore s príponou crt pre zabezpečené prepojenie s D2Connectorom contain the field of redundant connections to D2000 processes D2Connector through attributes host and port. Additionally, it is possible to define the path to X509 certificate in the file with the suffix crt for secured connection with D2Connector. SmartWeb (JAPI) automaticky manažuje pripojenia na procesy D2Connector, tak aby bolo vždy práve jedno spojenie aktívne. V prípade výpadku aktívneho spojenia sa pokúsi nadviazať spojenie s ďalším procesom. V tejto situácií sa automatcky uzavrú všetky aktuálne sedenia s používateľmi univerzálneho API rozhrania alebo web aplikácie a používatelia sa musia znova prihlásiť resp. sú automaticky presmerovaný na prihlasovaciu obrazovku.
...
automatically manages connections to processes D2Connector, so in every time one connection is active. In the case of an outage of an active connection, it tries to establish a connection with another process. In such a situation, all current sessions with users of the universal API interface or web application are automatically closed, and users must log in again or else they are automatically redirected to a login display.
Reversed connection to D2000
Blok kódu | ||
---|---|---|
| ||
{ /* object with objektconfiguration sof konfigurácioureversed reverznejconnection konekciebecause kvôliof DMZ (smerom zfrom D2000 -> SmartWeb) */ "listenableConnection": { "bindingInterface": "0.0.0.0", "port": "3120", "certificatePath" : "C:/cestapath kto X509 certifikátucertificate/d2connector-cert.crt", "allowedHosts": ["168.12.35.40"] } } |
Konfigurácia reverzného prepojenia obahuje nasledovné atribúty:Atribút bindingInterface
definuje sieťový interface na ktorom sa otvorí daný port. Nastavením hodnoty A configuration of a reversed connection contains the following attributes. The attribute bindingInterface
defines the network interface on which the given port is opened. By setting values 0.0.0.0
sa port otvorí na všetkých sieťových rozhraniach, hodnota ,
the port opens on every network interface; the value 127.0.0.1 otvorí port iba pre pripojenie z lokálneho počítača. Atribút port definuje číslo portu. Voliteľný atribút certificatePath je cesta ku X509 kľuču v súbore s príponou crt pre zabezpečené prepojenie s D2Connectorom. Ďalší voliteľný atribút allowedHosts definuje zoznam IP adries alebo názvov počítačov z ktorých je povolené sa pripojiť s procesom D2Connectoropens the port only for connections from a local computer. The attribute port defines the number of a port. Optional attribute certificatePath is a path to X509 key to a file with the suffix crt for secured connection with D2Connector. Another optional attribute allowedHosts defines the list of IP addresses or names of computers from which it is allowed to connect with the D2Connector process.