Skip to content

Commit

Permalink
Merge pull request #48 from dilanSachi/isolate-caller
Browse files Browse the repository at this point in the history
Make caller and streaming client isolated in generated files
  • Loading branch information
dilanSachi authored Jun 27, 2024
2 parents 23d009c + 40411fa commit cccc0d1
Show file tree
Hide file tree
Showing 106 changed files with 546 additions and 546 deletions.
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.caching=true
group=io.ballerina
version=0.2.1-SNAPSHOT
version=0.3.0-SNAPSHOT
#dependency versions
ballerinaLangVersion=2201.8.0
ballerinaLangVersion=2201.9.1
checkstylePluginVersion=10.12.1
commonsLang3Version=3.8.1
slf4jVersion=1.7.30
Expand All @@ -16,30 +16,30 @@ researchgateReleaseVersion=2.8.0
testngVersion=7.6.1
jacocoVersion=0.8.10

stdlibGrpcVersion=1.10.0
stdlibGrpcVersion=1.11.1
stdlibIoVersion=1.6.0
stdlibTimeVersion=2.4.0
stdlibUrlVersion=2.4.0

stdlibConstraintVersion=1.4.0
stdlibCryptoVersion=2.5.0
stdlibCryptoVersion=2.7.0
stdlibLogVersion=2.9.0
stdlibOsVersion=1.8.0
stdlibProtobufVersion=1.6.0
stdlibRandomVersion=1.5.0
stdlibTaskVersion=2.5.0

stdlibCacheVersion=3.7.0
stdlibCacheVersion=3.8.0
stdlibFileVersion=1.9.0
stdlibMimeVersion=2.9.0
stdlibUuidVersion=1.7.0
stdlibUuidVersion=1.8.0

stdlibAuthVersion=2.10.0
stdlibJwtVersion=2.10.0
stdlibOAuth2Version=2.10.0
stdlibAuthVersion=2.11.0
stdlibJwtVersion=2.11.0
stdlibOAuth2Version=2.11.0

stdlibHttpVersion=2.10.0
stdlibHttpVersion=2.11.0

# Ballerinax Observer
observeVersion=1.2.0-20230911-133500-b3d8db3
observeInternalVersion=1.2.0-20230911-141700-4c0454a
observeVersion=1.2.3
observeInternalVersion=1.2.2
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ private CallerUtils() {

public static Class getCallerClass(String key, String value, String filename) {
Class caller = new Class(key, true);
caller.addQualifiers(new String[]{"client"});
caller.addQualifiers(new String[]{"isolated", "client"});

caller.addMember(
getObjectFieldNode(
"private",
new String[]{},
new String[]{"final"},
getQualifiedNameReferenceNode("grpc", "Caller"),
"caller"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ public static Class getStreamingClientClass(Method method, String filename) {
String name = method.getMethodName().substring(0, 1).toUpperCase() + method.getMethodName().substring(1) +
STREAMING_CLIENT;
Class streamingClient = new Class(name, true);
streamingClient.addQualifiers(new String[]{"client"});
streamingClient.addQualifiers(new String[]{"isolated", "client"});

streamingClient.addMember(
getObjectFieldNode(
"private",
new String[]{},
new String[]{"final"},
getQualifiedNameReferenceNode("grpc", STREAMING_CLIENT),
"sClient"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -63,8 +63,8 @@ public client class HelloStreamingClient {
}
}

public client class HelloWorldStringCaller {
private grpc:Caller caller;
public isolated client class HelloWorldStringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -63,8 +63,8 @@ public client class HelloStreamingClient {
}
}

public client class HelloWorldIntCaller {
private grpc:Caller caller;
public isolated client class HelloWorldIntCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -63,8 +63,8 @@ public client class HelloStreamingClient {
}
}

public client class HelloWorldFloatCaller {
private grpc:Caller caller;
public isolated client class HelloWorldFloatCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -63,8 +63,8 @@ public client class HelloStreamingClient {
}
}

public client class HelloWorldBooleanCaller {
private grpc:Caller caller;
public isolated client class HelloWorldBooleanCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -63,8 +63,8 @@ public client class HelloStreamingClient {
}
}

public client class HelloWorldByteCaller {
private grpc:Caller caller;
public isolated client class HelloWorldByteCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -68,8 +68,8 @@ public client class HelloStreamingClient {
}
}

public client class ByeStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class ByeStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -112,8 +112,8 @@ public client class ByeStreamingClient {
}
}

public client class HelloWorldByeResponseCaller {
private grpc:Caller caller;
public isolated client class HelloWorldByeResponseCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -144,8 +144,8 @@ public client class HelloWorldByeResponseCaller {
}
}

public client class HelloWorldHelloResponseCaller {
private grpc:Caller caller;
public isolated client class HelloWorldHelloResponseCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public isolated client class helloWorldClient {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -68,8 +68,8 @@ public client class HelloStreamingClient {
}
}

public client class ByeStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class ByeStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down
Loading

0 comments on commit cccc0d1

Please sign in to comment.