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

org.yamcs.client.ClearanceSubscription Maven / Gradle / Ivy

There is a newer version: 5.10.8
Show newest version
package org.yamcs.client;

import org.yamcs.api.MethodHandler;
import org.yamcs.client.base.AbstractSubscription;
import org.yamcs.protobuf.ClearanceInfo;

import com.google.protobuf.Empty;

/**
 * Subscription for receiving clearance updates.
 */
public class ClearanceSubscription extends AbstractSubscription {

    private volatile ClearanceInfo latest;

    protected ClearanceSubscription(MethodHandler methodHandler) {
        super(methodHandler, "clearance", ClearanceInfo.class);
        addMessageListener(this::processMessage);
    }

    protected void processMessage(ClearanceInfo clearance) {
        latest = clearance;
    }

    public ClearanceInfo getCurrent() {
        return latest;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy