mirror of https://github.com/grpc/grpc-web.git
				
				
				
			change grpc-web java package name to 'io.grpcweb'
This commit is contained in:
		
							parent
							
								
									30747b3796
								
							
						
					
					
						commit
						4a4923f928
					
				| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.google.grpcweb;
 | 
			
		||||
package io.grpcweb;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import javax.servlet.Filter;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.google.grpcweb;
 | 
			
		||||
package io.grpcweb;
 | 
			
		||||
 | 
			
		||||
import java.lang.invoke.MethodHandles;
 | 
			
		||||
import java.util.Enumeration;
 | 
			
		||||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.google.grpcweb;
 | 
			
		||||
package io.grpcweb;
 | 
			
		||||
 | 
			
		||||
import com.google.inject.Singleton;
 | 
			
		||||
import io.grpc.Channel;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.google.grpcweb;
 | 
			
		||||
package io.grpcweb;
 | 
			
		||||
 | 
			
		||||
import io.grpc.CallOptions;
 | 
			
		||||
import io.grpc.Channel;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
package com.google.grpcweb;
 | 
			
		||||
package io.grpcweb;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertNotNull;
 | 
			
		||||
		Loading…
	
		Reference in New Issue