Skip to content

Commit f30af8c

Browse files
authored
Remove FetchInfo and FetchResult handler requests (#40)
1 parent 66e87c9 commit f30af8c

10 files changed

Lines changed: 1 addition & 464 deletions

nexus-sdk/src/main/java/io/nexusrpc/OperationInfo.java

Lines changed: 0 additions & 86 deletions
This file was deleted.

nexus-sdk/src/main/java/io/nexusrpc/OperationStillRunningException.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

nexus-sdk/src/main/java/io/nexusrpc/handler/Handler.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package io.nexusrpc.handler;
22

3-
import io.nexusrpc.Experimental;
43
import io.nexusrpc.OperationException;
5-
import io.nexusrpc.OperationInfo;
6-
import io.nexusrpc.OperationStillRunningException;
74

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

21-
/**
22-
* Fetch the result for an asynchronously started operation. See {@link
23-
* OperationHandler#fetchResult} for operation details.
24-
*
25-
* <p>If the result is an output stream, it will be closed later by the caller.
26-
*/
27-
@Experimental
28-
HandlerResultContent fetchOperationResult(
29-
OperationContext context, OperationFetchResultDetails details)
30-
throws OperationStillRunningException, OperationException, HandlerException;
31-
32-
/**
33-
* Fetch information about the asynchronously started operation. See {@link
34-
* OperationHandler#fetchInfo} for details.
35-
*/
36-
@Experimental
37-
OperationInfo fetchOperationInfo(OperationContext context, OperationFetchInfoDetails details)
38-
throws HandlerException;
39-
4018
/**
4119
* Cancel the asynchronously started operation. See {@link OperationHandler#cancel} for details.
4220
*/

nexus-sdk/src/main/java/io/nexusrpc/handler/OperationFetchInfoDetails.java

Lines changed: 0 additions & 71 deletions
This file was deleted.

nexus-sdk/src/main/java/io/nexusrpc/handler/OperationFetchResultDetails.java

Lines changed: 0 additions & 100 deletions
This file was deleted.

nexus-sdk/src/main/java/io/nexusrpc/handler/OperationHandler.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package io.nexusrpc.handler;
22

33
import io.nexusrpc.OperationException;
4-
import io.nexusrpc.OperationInfo;
5-
import io.nexusrpc.OperationStillRunningException;
64
import org.jspecify.annotations.Nullable;
75

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

50-
/**
51-
* Fetch the result for an asynchronously started operation.
52-
*
53-
* @param context Context for the call.
54-
* @param details Details for the call including the operation token. The details also contain a
55-
* timeout which affects how implementers should implement this function. See {@link
56-
* OperationFetchResultDetails#getTimeout()} to see how to react to this value.
57-
* @return The resulting value upon success.
58-
* @throws OperationStillRunningException Operation is still running beyond the given timeout.
59-
* @throws OperationException Operation failed. If thrown, can have failure details and state such
60-
* as saying the operation was cancelled.
61-
* @throws HandlerException Unexpected failures while running the handler. This should be thrown
62-
* with a type of {@link HandlerException.ErrorType#NOT_FOUND} if the operation token is not
63-
* found.
64-
* @throws RuntimeException Any other exception, will be converted to an {@link HandlerException}
65-
* of type {@link HandlerException.ErrorType#INTERNAL}.
66-
*/
67-
@Nullable R fetchResult(OperationContext context, OperationFetchResultDetails details)
68-
throws OperationStillRunningException, OperationException, HandlerException;
69-
70-
/**
71-
* Fetch information about the asynchronously started operation.
72-
*
73-
* @param context Context for the call.
74-
* @param details Details for the call including the operation token.
75-
* @return Information about the operation.
76-
* @throws HandlerException Unexpected failures while running the handler. This should be thrown
77-
* with a type of {@link HandlerException.ErrorType#NOT_FOUND} if the operation token is not
78-
* found.
79-
* @throws RuntimeException Any other exception, will be converted to an {@link HandlerException}
80-
* of type {@link HandlerException.ErrorType#INTERNAL}.
81-
*/
82-
OperationInfo fetchInfo(OperationContext context, OperationFetchInfoDetails details)
83-
throws HandlerException;
84-
8548
/**
8649
* Cancel the asynchronously started operation.
8750
*

0 commit comments

Comments
 (0)