All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.global.api.services.DeviceService Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.services;

import com.global.api.ServicesContainer;
import com.global.api.entities.exceptions.ApiException;
import com.global.api.terminals.ConnectionConfig;
import com.global.api.terminals.abstractions.IDeviceInterface;

public class DeviceService {
    public static IDeviceInterface create(ConnectionConfig config) throws ApiException {
        return create(config, "default");
    }
    public static IDeviceInterface create(ConnectionConfig config, String configName) throws ApiException {
        ServicesContainer.configureService(config, configName);
        if (config.getGatewayConfig() != null) {
            ServicesContainer.configureService(config.getGatewayConfig(), "_upa_passthrough");
        }
        return ServicesContainer.getInstance().getDeviceInterface(configName);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy