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

org.appconn.mgmt.AppServerServiceClient Maven / Gradle / Ivy

Go to download

Java library for easy and fast implementation of distributed applications, including, optimized serialization, high availability administration and server resources management.

There is a newer version: 1.2
Show newest version
package org.appconn.mgmt;

import org.appconn.channel.*;

import java.net.SocketAddress;

/**
 * Class generated by appconn Coders.
 * Coders version: 1.1
 */
public class AppServerServiceClient implements AppServerService {

    private final SocketAddress remote;

    public AppServerServiceClient(SocketAddress remote) {
        this.remote = remote;
    }

    @Override
    public byte getState() {
        try (AbstractClient client = AbstractClient.newSingletonReturnTcpClient(remote, 4000)) {
            FutureReturn ret = AbstractClient.futureReturn(ReadBuffer::get, 32000000000L);
            Writer.putCall(client.getWriteBuffer(), 8430, client.add(ret), ret, Writer.VOID);
            return ret.getReturn();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public void setState(byte arg0) {
        try (AbstractClient client = AbstractClient.newSingletonReturnTcpClient(remote, 4000)) {
            FutureReturn ret = AbstractClient.futureReturn(TypeReader.VOID_READER, 32000000000L);
            Writer.putCall(client.getWriteBuffer(), 8431, client.add(ret), ret, w -> w.put(arg0));
            ret.getReturn();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy