
org.yamcs.protobuf.AbstractStreamArchiveApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
package org.yamcs.protobuf;
import com.google.protobuf.Descriptors.MethodDescriptor;
import com.google.protobuf.Descriptors.ServiceDescriptor;
import com.google.protobuf.Message;
import org.yamcs.api.Api;
import org.yamcs.api.HttpBody;
import org.yamcs.api.Observer;
import org.yamcs.protobuf.Archive.ExportParameterValuesRequest;
import org.yamcs.protobuf.Archive.GetParameterSamplesRequest;
import org.yamcs.protobuf.Archive.ListParameterGroupsRequest;
import org.yamcs.protobuf.Archive.ListParameterHistoryRequest;
import org.yamcs.protobuf.Archive.ListParameterHistoryResponse;
import org.yamcs.protobuf.Archive.ParameterGroupInfo;
import org.yamcs.protobuf.Archive.StreamParameterValuesRequest;
import org.yamcs.protobuf.Pvalue.ParameterData;
import org.yamcs.protobuf.Pvalue.TimeSeries;
@javax.annotation.processing.Generated(value = "org.yamcs.maven.ServiceGenerator", date = "2025-02-13T11:12:59.910761507Z")
@SuppressWarnings("unchecked")
public abstract class AbstractStreamArchiveApi implements Api {
/**
*
* List parameter groups
*
*/
public abstract void listParameterGroups(T ctx, ListParameterGroupsRequest request, Observer observer);
/**
*
* List parameter history
*
*/
public abstract void listParameterHistory(T ctx, ListParameterHistoryRequest request, Observer observer);
/**
*
* Streams back parameter values
*
*/
public abstract void streamParameterValues(T ctx, StreamParameterValuesRequest request, Observer observer);
/**
*
* Get parameter samples
*
*/
public abstract void getParameterSamples(T ctx, GetParameterSamplesRequest request, Observer observer);
/**
*
* Export parameter values in CSV format
*
*/
public abstract void exportParameterValues(T ctx, ExportParameterValuesRequest request, Observer observer);
@Override
public final ServiceDescriptor getDescriptorForType() {
return Archive.getDescriptor().getServices().get(0);
}
@Override
public final Message getRequestPrototype(MethodDescriptor method) {
if (method.getService() != getDescriptorForType()) {
throw new IllegalArgumentException("Method not contained by this service.");
}
switch (method.getIndex()) {
case 0:
return ListParameterGroupsRequest.getDefaultInstance();
case 1:
return ListParameterHistoryRequest.getDefaultInstance();
case 2:
return StreamParameterValuesRequest.getDefaultInstance();
case 3:
return GetParameterSamplesRequest.getDefaultInstance();
case 4:
return ExportParameterValuesRequest.getDefaultInstance();
default:
throw new IllegalStateException();
}
}
@Override
public final Message getResponsePrototype(MethodDescriptor method) {
if (method.getService() != getDescriptorForType()) {
throw new IllegalArgumentException("Method not contained by this service.");
}
switch (method.getIndex()) {
case 0:
return ParameterGroupInfo.getDefaultInstance();
case 1:
return ListParameterHistoryResponse.getDefaultInstance();
case 2:
return ParameterData.getDefaultInstance();
case 3:
return TimeSeries.getDefaultInstance();
case 4:
return HttpBody.getDefaultInstance();
default:
throw new IllegalStateException();
}
}
@Override
public final void callMethod(MethodDescriptor method, T ctx, Message request, Observer future) {
if (method.getService() != getDescriptorForType()) {
throw new IllegalArgumentException("Method not contained by this service.");
}
switch (method.getIndex()) {
case 0:
listParameterGroups(ctx, (ListParameterGroupsRequest) request, (Observer)(Object) future);
return;
case 1:
listParameterHistory(ctx, (ListParameterHistoryRequest) request, (Observer)(Object) future);
return;
case 2:
streamParameterValues(ctx, (StreamParameterValuesRequest) request, (Observer)(Object) future);
return;
case 3:
getParameterSamples(ctx, (GetParameterSamplesRequest) request, (Observer)(Object) future);
return;
case 4:
exportParameterValues(ctx, (ExportParameterValuesRequest) request, (Observer)(Object) future);
return;
default:
throw new IllegalStateException();
}
}
@Override
public final Observer callMethod(MethodDescriptor method, T ctx, Observer future) {
if (method.getService() != getDescriptorForType()) {
throw new IllegalArgumentException("Method not contained by this service.");
}
switch (method.getIndex()) {
default:
throw new IllegalStateException();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy