Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Java SDK for working with [Nexus RPC](https://github.com/nexus-rpc/api).
Nexus is a synchronous RPC protocol. Arbitrary length operations are modelled on top of a set of pre-defined synchronous RPCs.

A Nexus caller calls a handler. The handler may respond inline or return a reference for a future, asynchronous
operation. The caller can cancel an asynchronous operation, check for its outcome, or fetch its current state. The
caller can also specify a callback URL, which the handler uses to asynchronously deliver the result of an operation when it is ready.
operation. The caller can cancel an asynchronous operation using the returned token. The caller can also specify a
callback URL, which the handler uses to asynchronously deliver the result of an operation when it is ready.

## Supported Java runtimes
* Java 1.8+
Expand Down
86 changes: 0 additions & 86 deletions nexus-sdk/src/main/java/io/nexusrpc/OperationInfo.java

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions nexus-sdk/src/main/java/io/nexusrpc/handler/Handler.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package io.nexusrpc.handler;

import io.nexusrpc.Experimental;
import io.nexusrpc.OperationException;
import io.nexusrpc.OperationInfo;
import io.nexusrpc.OperationStillRunningException;

/** Top-level handler for service calls. */
public interface Handler {
Expand All @@ -18,25 +15,6 @@ OperationStartResult<HandlerResultContent> startOperation(
OperationContext context, OperationStartDetails details, HandlerInputContent input)
throws OperationException, HandlerException;

/**
* Fetch the result for an asynchronously started operation. See {@link
* OperationHandler#fetchResult} for operation details.
*
* <p>If the result is an output stream, it will be closed later by the caller.
*/
@Experimental
HandlerResultContent fetchOperationResult(
OperationContext context, OperationFetchResultDetails details)
throws OperationStillRunningException, OperationException, HandlerException;

/**
* Fetch information about the asynchronously started operation. See {@link
* OperationHandler#fetchInfo} for details.
*/
@Experimental
OperationInfo fetchOperationInfo(OperationContext context, OperationFetchInfoDetails details)
throws HandlerException;

/**
* Cancel the asynchronously started operation. See {@link OperationHandler#cancel} for details.
*/
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package io.nexusrpc.handler;

import io.nexusrpc.OperationException;
import io.nexusrpc.OperationInfo;
import io.nexusrpc.OperationStillRunningException;
import org.jspecify.annotations.Nullable;

/**
Expand Down Expand Up @@ -47,41 +45,6 @@ OperationStartResult<R> start(
OperationContext context, OperationStartDetails details, @Nullable T param)
throws OperationException, HandlerException;

/**
* Fetch the result for an asynchronously started operation.
*
* @param context Context for the call.
* @param details Details for the call including the operation token. The details also contain a
* timeout which affects how implementers should implement this function. See {@link
* OperationFetchResultDetails#getTimeout()} to see how to react to this value.
* @return The resulting value upon success.
* @throws OperationStillRunningException Operation is still running beyond the given timeout.
* @throws OperationException Operation failed. If thrown, can have failure details and state such
* as saying the operation was cancelled.
* @throws HandlerException Unexpected failures while running the handler. This should be thrown
* with a type of {@link HandlerException.ErrorType#NOT_FOUND} if the operation token is not
* found.
* @throws RuntimeException Any other exception, will be converted to an {@link HandlerException}
* of type {@link HandlerException.ErrorType#INTERNAL}.
*/
@Nullable R fetchResult(OperationContext context, OperationFetchResultDetails details)
throws OperationStillRunningException, OperationException, HandlerException;

/**
* Fetch information about the asynchronously started operation.
*
* @param context Context for the call.
* @param details Details for the call including the operation token.
* @return Information about the operation.
* @throws HandlerException Unexpected failures while running the handler. This should be thrown
* with a type of {@link HandlerException.ErrorType#NOT_FOUND} if the operation token is not
* found.
* @throws RuntimeException Any other exception, will be converted to an {@link HandlerException}
* of type {@link HandlerException.ErrorType#INTERNAL}.
*/
OperationInfo fetchInfo(OperationContext context, OperationFetchInfoDetails details)
throws HandlerException;

/**
* Cancel the asynchronously started operation.
*
Expand Down
Loading
Loading