Skip to content

Commit cae8b47

Browse files
committed
Use 4.0.1 version of the swim backend
Update Copyright
1 parent 3d27412 commit cae8b47

22 files changed

+217
-22
lines changed

build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ext.swimVersion = project.property('swim.version')
2727
// Build with `gradle -Pno-modules` to force compatibility with legacy JVMs.
2828
def javaVersion = System.getProperty('java.version').split('\\.')
2929
ext.jvmVersion = (javaVersion[0] as Integer) > 1 ? javaVersion[0] as Integer : javaVersion[1] as Integer
30-
ext.useModules = jvmVersion >= 9 && !hasProperty('no-modules')
30+
ext.useModules = !hasProperty('no-modules')
3131
ext.moduleArgs = ['--add-modules', 'swim.meta']
3232

3333
repositories {
@@ -43,8 +43,8 @@ dependencies {
4343
afterEvaluate {
4444
configurations {
4545
apiElements {
46-
sourceCompatibility = JavaVersion.VERSION_1_9
47-
targetCompatibility = JavaVersion.VERSION_1_9
46+
sourceCompatibility = JavaVersion.VERSION_11
47+
targetCompatibility = JavaVersion.VERSION_11
4848
}
4949
}
5050

@@ -60,9 +60,9 @@ afterEvaluate {
6060
options.encoding = 'UTF-8'
6161
classpath = files()
6262
source = sourceSets.main.allJava
63-
sourceCompatibility = JavaVersion.VERSION_1_9
64-
targetCompatibility = JavaVersion.VERSION_1_9
65-
destinationDir = compileJava.destinationDir
63+
sourceCompatibility = JavaVersion.VERSION_11
64+
targetCompatibility = JavaVersion.VERSION_11
65+
destinationDirectory = compileJava.destinationDirectory
6666
include '*module-info*'
6767
}
6868
classes.dependsOn compileModuleInfoJava
@@ -76,8 +76,8 @@ afterEvaluate {
7676
compileJava {
7777
options.compilerArgs += compilerArgs
7878
options.encoding = 'UTF-8'
79-
sourceCompatibility = JavaVersion.VERSION_1_9
80-
targetCompatibility = JavaVersion.VERSION_1_9
79+
sourceCompatibility = JavaVersion.VERSION_11
80+
targetCompatibility = JavaVersion.VERSION_11
8181
exclude '*module-info*'
8282
}
8383

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
application.version=0.1.0
2-
swim.version=3.11.0
1+
application.version=1.0.0
2+
swim.version=4.0.1

src/main/java/module-info.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
open module swim.cellular {
216
requires transitive swim.api;
317
requires transitive swim.server;

src/main/java/swim/cellular/CellularAuthenticator.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular;
216

317
import swim.api.auth.AbstractAuthenticator;

src/main/java/swim/cellular/CellularPlane.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular;
216

317
import swim.api.auth.Authenticator;

src/main/java/swim/cellular/CellularPolicy.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular;
216

317
import swim.api.auth.Identity;

src/main/java/swim/cellular/CellularResources.java

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular;
216

317
import java.io.IOException;
@@ -23,7 +37,7 @@ public static Value loadJsonResource(String jsonResource) {
2337
try {
2438
jsonInput = CellularPlane.class.getClassLoader().getResourceAsStream(jsonResource);
2539
if (jsonInput != null) {
26-
jsonValue = Utf8.read(Json.structureParser().valueParser(), jsonInput);
40+
jsonValue = Utf8.read(jsonInput, Json.structureParser().valueParser());
2741
}
2842
} catch (IOException cause) {
2943
throw new ParserException(cause);
@@ -44,7 +58,7 @@ public static Value loadReconResource(String reconResource) {
4458
try {
4559
reconInput = CellularPlane.class.getClassLoader().getResourceAsStream(reconResource);
4660
if (reconInput != null) {
47-
reconValue = Utf8.read(Recon.structureParser().blockParser(), reconInput);
61+
reconValue = Utf8.read(reconInput, Recon.structureParser().blockParser());
4862
}
4963
} catch (IOException cause) {
5064
throw new ParserException(cause);

src/main/java/swim/cellular/CellularUiRouter.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular;
216

317
import swim.kernel.KernelProxy;

src/main/java/swim/cellular/agent/ENodeBAgent.java

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;
@@ -7,7 +21,6 @@
721
import swim.api.lane.ValueLane;
822
import swim.codec.Output;
923
import swim.http.HttpChunked;
10-
import swim.http.HttpEntity;
1124
import swim.http.HttpRequest;
1225
import swim.http.HttpResponse;
1326
import swim.http.HttpStatus;
@@ -69,10 +82,10 @@ HttpResponse<?> onRequestSummary(HttpRequest<Value> request) {
6982
final Value payload = this.status.get().concat(this.kpis.get());
7083
// Construct the response entity by incrementally serializing and encoding
7184
// the response payload as JSON.
72-
final HttpEntity<?> entity = HttpChunked.from(Json.write(payload, Output.full()),
85+
final HttpChunked<?> entity = HttpChunked.create(Json.write(Output.full(), payload),
7386
MediaType.applicationJson());
7487
// Return the HTTP response.
75-
return HttpResponse.from(HttpStatus.OK).content(entity);
88+
return HttpResponse.create(HttpStatus.OK).content(entity);
7689
}
7790

7891
/**

src/main/java/swim/cellular/agent/ENodeBConnectorAgent.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;

src/main/java/swim/cellular/agent/ENodeBSimAgent.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;

src/main/java/swim/cellular/agent/RanAgent.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import java.util.Iterator;

src/main/java/swim/cellular/agent/RegionAgent.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;

src/main/java/swim/cellular/agent/SectorAgent.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;

src/main/java/swim/cellular/agent/SiteAgent.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2015-2022 Swim.inc
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package swim.cellular.agent;
216

317
import swim.api.SwimLane;
@@ -70,7 +84,7 @@ void seed() {
7084
final int sectorAzimuth = baseAngle + 2 * sectorSweep * i;
7185

7286
for (int j = 0; j < carrierCount; j += 1) {
73-
final Uri nodeUri = Uri.from(sitePath.appended("sector", String.valueOf(sectorId)));
87+
final Uri nodeUri = Uri.create(sitePath.appended("sector", String.valueOf(sectorId)));
7488
final Value key = Uri.form().mold(nodeUri).toValue();
7589
final Uri laneUri = Uri.parse("status");
7690
final String band = Character.toString('A' + (char) Math.round(26 * Math.random()));

src/main/resources/ui/swim-cellular.js

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-core.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-maps.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-mesh.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-ui.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-ux.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/ui/swim-vis.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)