change grpc-web java package name to 'io.grpcweb'

This commit is contained in:
Vasu Nori 2020-10-02 17:50:13 -07:00 committed by Stanley Cheung
parent 30747b3796
commit 4a4923f928
22 changed files with 63 additions and 33 deletions

View File

@ -31,7 +31,7 @@
<version>4.13</version>
</dependency>
<dependency>
<groupId>com.google.grpcweb</groupId>
<groupId>io.grpcweb</groupId>
<artifactId>grpcweb-java</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>

View File

@ -1,10 +1,10 @@
package grpcweb.examples.greeter;
import com.google.grpcweb.GrpcPortNumRelay;
import com.google.grpcweb.JettyWebserverForGrpcwebTraffic;
import io.grpc.BindableService;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpcweb.GrpcPortNumRelay;
import io.grpcweb.JettyWebserverForGrpcwebTraffic;
/**
* This class starts the service on a port (property: grpc-port)

View File

@ -26,7 +26,7 @@
<version>3.11.4</version>
</dependency>
<dependency>
<groupId>com.google.grpcweb</groupId>
<groupId>io.grpcweb</groupId>
<artifactId>grpcweb-java</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>

View File

@ -1,11 +1,11 @@
package grpcweb.examples;
import com.google.grpcweb.GrpcPortNumRelay;
import com.google.grpcweb.JettyWebserverForGrpcwebTraffic;
import io.grpc.BindableService;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpc.ServerInterceptors;
import io.grpcweb.GrpcPortNumRelay;
import io.grpcweb.JettyWebserverForGrpcwebTraffic;
import java.util.concurrent.Executors;
/**

View File

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.grpcweb</groupId>
<groupId>io.grpcweb</groupId>
<artifactId>grpcweb-java</artifactId>
<version>0.1-SNAPSHOT</version>
<name>grpcweb-java</name>

View File

@ -1,8 +0,0 @@
package com.google.grpcweb;
public class GrpcPortNumRelay {
public static void setGrpcPortNum(int i) {
// TODO This class & method names are wrong - involves more than just setting the portnum
GrpcWebGuiceModule.init(i);
}
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import java.io.IOException;
import javax.servlet.Filter;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import java.lang.invoke.MethodHandles;
import java.util.Enumeration;

View File

@ -0,0 +1,23 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.grpcweb;
public class GrpcPortNumRelay {
public static void setGrpcPortNum(int i) {
// TODO This class & method names are wrong - involves more than just setting the portnum
GrpcWebGuiceModule.init(i);
}
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.inject.Singleton;
import io.grpc.Channel;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import io.grpc.CallOptions;
import io.grpc.Channel;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

View File

@ -1,4 +1,19 @@
package com.google.grpcweb;
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.grpcweb;
import java.lang.invoke.MethodHandles;
import java.util.EnumSet;

View File

@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.grpcweb.MessageHandler.ContentType;
import io.grpcweb.MessageHandler.ContentType;
import java.io.IOException;
import java.io.InputStream;
import java.lang.invoke.MethodHandles;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
/**
* Creates frames from the input bytes.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.common.annotations.VisibleForTesting;
import java.lang.reflect.InvocationTargetException;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import io.grpc.Metadata;
import java.util.Arrays;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.inject.Inject;
import io.grpc.Channel;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.grpcweb;
package io.grpcweb;
import com.google.grpcweb.MessageHandler.ContentType;
import io.grpc.Metadata;
import io.grpc.Status;
import io.grpcweb.MessageHandler.ContentType;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Map;

View File

@ -1,11 +1,11 @@
package com.google.grpcweb;
package io.grpcweb;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import com.google.grpcweb.MessageHandler.ContentType;
import io.grpcweb.MessageHandler.ContentType;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package com.google.grpcweb;
package io.grpcweb;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;