Class ClassifierService.ClassifierServiceBase
Base class for server-side implementations of ClassifierService
[BindServiceMethod(typeof(ClassifierService), "BindService")]
public abstract class ClassifierService.ClassifierServiceBase
- Inheritance
-
ClassifierService.ClassifierServiceBase
- Inherited Members
Methods
Classify(IAsyncStreamReader<ClassifyRequest>, IServerStreamWriter<ClassifyResponse>, ServerCallContext)
Classify images in a deployment-based streaming context Multiple affiliates can join the same deployment to share responses Supports bidirectional streaming for real-time classification
public virtual Task Classify(IAsyncStreamReader<ClassifyRequest> requestStream, IServerStreamWriter<ClassifyResponse> responseStream, ServerCallContext context)
Parameters
requestStreamIAsyncStreamReader<ClassifyRequest>Used for reading requests from the client.
responseStreamIServerStreamWriter<ClassifyResponse>Used for sending responses back to the client.
contextServerCallContextThe context of the server-side call handler being invoked.
Returns
- Task
A task indicating completion of the handler.
ClassifySingle(ClassificationInput, ServerCallContext)
Classifies a single image synchronously without deployment context Returns classification results immediately in a single request-response cycle Unlike the streaming Classify method, this operates independently of deployments and does not require session management or deployment coordination
Use this for:
- Low-throughput, low-latency classification scenarios
- Simple one-off image classifications
- Applications where immediate synchronous responses are preferred over streaming
- Testing and debugging individual image classifications
The response will contain either classification results or error information No deployment_id coordination is required or supported
public virtual Task<ClassificationOutput> ClassifySingle(ClassificationInput request, ServerCallContext context)
Parameters
requestClassificationInputThe request received from the client.
contextServerCallContextThe context of the server-side call handler being invoked.
Returns
- Task<ClassificationOutput>
The response to send back to the client (wrapped by a task).
ListDeployments(Empty, ServerCallContext)
Retrieves a list of all active deployment IDs Returns the active deployment_id values that can be used in Classify requests Useful for monitoring and debugging active connections
public virtual Task<ListDeploymentsResponse> ListDeployments(Empty request, ServerCallContext context)
Parameters
requestEmptyThe request received from the client.
contextServerCallContextThe context of the server-side call handler being invoked.
Returns
- Task<ListDeploymentsResponse>
The response to send back to the client (wrapped by a task).