Skip to content

Commit 008a48c

Browse files
author
ehennum
committed
simple call() methods without endpoint state, work unit, or session #1173
1 parent c8c60cd commit 008a48c

File tree

8 files changed

+36
-0
lines changed

8 files changed

+36
-0
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/ExecEndpoint.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ static ExecEndpoint on(DatabaseClient client, JSONWriteHandle apiDecl) {
3838
return new ExecEndpointImpl(client, apiDecl);
3939
}
4040

41+
/**
42+
* Makes one call to an endpoint that doesn't take an endpoint state, session, or work unit.
43+
*/
44+
void call();
4145
/**
4246
* Makes one call to the endpoint for the instance.
4347
* @param endpointState the current mutable state of the endpoint (which must be null if not accepted by the endpoint)

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/InputEndpoint.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ static InputEndpoint on(DatabaseClient client, JSONWriteHandle apiDecl) {
3636
return new InputEndpointImpl(client, apiDecl);
3737
}
3838

39+
/**
40+
* Makes one call to an endpoint that doesn't take an endpoint state, session, or work unit.
41+
* @param input the request data sent to the endpoint
42+
*/
43+
void call(InputStream[] input);
3944
/**
4045
* Makes one call to the endpoint for the instance
4146
* @param endpointState the current mutable state of the endpoint (which must be null if not accepted by the endpoint)

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/InputOutputEndpoint.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ static InputOutputEndpoint on(DatabaseClient client, JSONWriteHandle apiDecl) {
3232
return new InputOutputEndpointImpl(client, apiDecl);
3333
}
3434

35+
/**
36+
* Makes one call to an endpoint that doesn't take an endpoint state, session, or work unit.
37+
* @param input the request data sent to the endpoint
38+
* @return the response data from the endpoint
39+
*/
40+
InputStream[] call(InputStream[] input);
3541
/**
3642
* Makes one call to the endpoint for the instance
3743
* @param endpointState the current mutable state of the endpoint (which must be null if not accepted by the endpoint)

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/OutputEndpoint.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ static OutputEndpoint on(DatabaseClient client, JSONWriteHandle apiDecl) {
3737
return new OutputEndpointImpl(client, apiDecl);
3838
}
3939

40+
/**
41+
* Makes one call to an endpoint that doesn't take an endpoint state, session, or work unit.
42+
* @return the response data from the endpoint
43+
*/
44+
InputStream[] call();
4045
/**
4146
* Makes one call to the endpoint for the instance
4247
* @param endpointState the current mutable state of the endpoint (which must be null if not accepted by the endpoint)

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/impl/ExecEndpointImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ private ExecCallerImpl getCaller() {
4141
return this.caller;
4242
}
4343

44+
@Override
45+
public void call() {
46+
call(null, null, null);
47+
}
4448
@Override
4549
public InputStream call(InputStream endpointState, SessionState session, InputStream workUnit) {
4650
checkAllowedArgs(endpointState, session, workUnit);

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/impl/InputEndpointImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ private int getBatchSize() {
4848
return this.batchSize;
4949
}
5050

51+
@Override
52+
public void call(InputStream[] input) {
53+
call(null, null, null, input);
54+
}
5155
@Override
5256
public InputStream call(InputStream endpointState, SessionState session, InputStream workUnit, InputStream[] input) {
5357
checkAllowedArgs(endpointState, session, workUnit);

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/impl/InputOutputEndpointImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ private int getBatchSize() {
4949
return this.batchSize;
5050
}
5151

52+
@Override
53+
public InputStream[] call(InputStream[] input) {
54+
return call(null, null, null, input);
55+
}
5256
@Override
5357
public InputStream[] call(InputStream endpointState, SessionState session, InputStream workUnit, InputStream[] input) {
5458
checkAllowedArgs(endpointState, session, workUnit);

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/impl/OutputEndpointImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ private OutputCallerImpl getCaller() {
4242
}
4343

4444

45+
@Override
46+
public InputStream[] call() {
47+
return call(null, null, null);
48+
}
4549
@Override
4650
public InputStream[] call(InputStream endpointState, SessionState session, InputStream workUnit) {
4751
checkAllowedArgs(endpointState, session, workUnit);

0 commit comments

Comments
 (0)