Package wpn.hdri.ss.client

Examples of wpn.hdri.ss.client.Client


    public ClientsManager(ClientFactory factory) {
        this.factory = factory;
    }

    public Client initializeClient(String name) throws ClientInitializationException {
        Client result = factory.createClient(name);
        if (result == null) {
            throw new ClientInitializationException(name, /*TODO create new exception with all exceptions from .wasExceptions() */null);
        }
        clients.put(name, result);
        aliveClientNames.add(name);
View Full Code Here


     * @param name client name
     * @return client
     * @throws IllegalStateException if no client was found
     */
    public Client getClient(String name) {
        Client client = clients.get(name);
        if (client == null) {
            throw new IllegalStateException("Null client is not permitted.");
        }
        return client;
    }
View Full Code Here

        StatusServerConfiguration configuration = new ConfigurationBuilder().addDevice("fake").addAttributeToDevice("fake", "double", "poll", "last", 1, 0).build();

        ClientsManager clientsManager = new ClientsManager(new ClientFactory() {
            @Override
            public Client createClient(String deviceName) {
                Client client = mock(Client.class);
                try {
                    doReturn(true).when(client).checkAttribute("double");
                    doReturn(double.class).when(client).getAttributeClass("double");
                } catch (ClientException e) {
                    throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of wpn.hdri.ss.client.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.