Renaming gRPC-java "newtransport" package to just "transport".

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78596663
This commit is contained in:
nathanmittler 2014-10-27 11:33:19 -07:00 committed by Eric Anderson
parent 3c986bbcdb
commit 29cbef1f9b
84 changed files with 247 additions and 248 deletions

View File

@ -3,7 +3,7 @@ package com.google.net.stubby;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.transport.ClientTransportFactory;
import java.util.concurrent.ExecutorService;

View File

@ -2,7 +2,7 @@ package com.google.net.stubby;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.Service;
import com.google.net.stubby.newtransport.ServerListener;
import com.google.net.stubby.transport.ServerListener;
import java.util.concurrent.ExecutorService;

View File

@ -5,15 +5,15 @@ import static com.google.common.util.concurrent.Service.State.STARTING;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AbstractService;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.newtransport.ClientStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.ClientTransport;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.transport.ClientStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.ClientTransport;
import com.google.net.stubby.transport.ClientTransportFactory;
import java.io.IOException;
import java.io.InputStream;

View File

@ -3,23 +3,23 @@ package com.google.net.stubby;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.util.concurrent.AbstractService;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.newtransport.ServerListener;
import com.google.net.stubby.newtransport.ServerStream;
import com.google.net.stubby.newtransport.ServerStreamListener;
import com.google.net.stubby.newtransport.ServerTransportListener;
import com.google.net.stubby.transport.ServerListener;
import com.google.net.stubby.transport.ServerStream;
import com.google.net.stubby.transport.ServerStreamListener;
import com.google.net.stubby.transport.ServerTransportListener;
import java.io.InputStream;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.concurrent.Executor;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import javax.annotation.Nullable;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
/**
* Abstract base class for {@link Buffer} implementations.

View File

@ -1,8 +1,8 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.net.stubby.newtransport.StreamState.CLOSED;
import static com.google.net.stubby.newtransport.StreamState.OPEN;
import static com.google.net.stubby.newtransport.StreamState.READ_ONLY;
import static com.google.net.stubby.transport.StreamState.CLOSED;
import static com.google.net.stubby.transport.StreamState.OPEN;
import static com.google.net.stubby.transport.StreamState.READ_ONLY;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AbstractService;

View File

@ -1,8 +1,8 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.net.stubby.newtransport.StreamState.CLOSED;
import static com.google.net.stubby.newtransport.StreamState.OPEN;
import static com.google.net.stubby.newtransport.StreamState.WRITE_ONLY;
import static com.google.net.stubby.transport.StreamState.CLOSED;
import static com.google.net.stubby.transport.StreamState.OPEN;
import static com.google.net.stubby.transport.StreamState.WRITE_ONLY;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.base.Preconditions;
import com.google.common.io.Closeables;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import java.io.Closeable;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.common.base.Charsets.UTF_8;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
/**
* Extension of {@link Stream} to support client-side termination semantics.

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.net.stubby.Metadata;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.util.concurrent.Service;
import com.google.net.stubby.Metadata;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
/** Pre-configured factory for creating {@link ClientTransport} instances. */
public interface ClientTransportFactory {

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import java.io.IOException;
import java.io.OutputStream;

View File

@ -1,10 +1,10 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.io.ByteStreams;
import com.google.net.stubby.DeferredInputStream;
import com.google.net.stubby.newtransport.Framer.Sink;
import com.google.net.stubby.transport.Framer.Sink;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import java.io.Closeable;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.base.Preconditions;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.Status;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.net.stubby.GrpcFramingUtil.FRAME_LENGTH;
import static com.google.net.stubby.GrpcFramingUtil.FRAME_TYPE_LENGTH;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.Status;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.base.Preconditions;
import com.google.common.io.ByteStreams;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.GrpcFramingUtil;
import com.google.net.stubby.Status;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.base.Preconditions;
import com.google.common.io.ByteStreams;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.util.concurrent.Service;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.Status;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.net.stubby.Metadata;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import com.google.common.util.concurrent.ListenableFuture;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
/**
* The state of a single {@link Stream} within a transport.

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import javax.annotation.Nullable;

View File

@ -18,9 +18,9 @@ import com.google.common.util.concurrent.AbstractService;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.Service;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.newtransport.ServerStream;
import com.google.net.stubby.newtransport.ServerStreamListener;
import com.google.net.stubby.newtransport.ServerTransportListener;
import com.google.net.stubby.transport.ServerStream;
import com.google.net.stubby.transport.ServerStreamListener;
import com.google.net.stubby.transport.ServerTransportListener;
import org.junit.After;
import org.junit.Before;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
@ -11,7 +11,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.OngoingStubbing;
/**
* Tests for {@link AbstractBuffer}.
*/

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.common.base.Charsets.UTF_8;
import static org.junit.Assert.assertEquals;

View File

@ -1,7 +1,7 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.net.stubby.newtransport.Buffers.wrap;
import static com.google.net.stubby.transport.Buffers.wrap;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.common.base.Charsets.UTF_8;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.common.base.Charsets.UTF_8;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

View File

@ -1,7 +1,7 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static com.google.net.stubby.newtransport.TransportFrameUtil.PAYLOAD_FRAME;
import static com.google.net.stubby.newtransport.TransportFrameUtil.STATUS_FRAME;
import static com.google.net.stubby.transport.TransportFrameUtil.PAYLOAD_FRAME;
import static com.google.net.stubby.transport.TransportFrameUtil.STATUS_FRAME;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -13,7 +13,7 @@ import com.google.common.io.ByteStreams;
import com.google.common.primitives.Bytes;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.newtransport.MessageDeframer2.Sink;
import com.google.net.stubby.transport.MessageDeframer2.Sink;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport;
package com.google.net.stubby.transport;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

View File

@ -4,9 +4,9 @@ import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.net.stubby.Channel;
import com.google.net.stubby.ChannelImpl;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.newtransport.netty.NettyClientTransportFactory;
import com.google.net.stubby.newtransport.okhttp.OkHttpClientTransportFactory;
import com.google.net.stubby.transport.ClientTransportFactory;
import com.google.net.stubby.transport.netty.NettyClientTransportFactory;
import com.google.net.stubby.transport.okhttp.OkHttpClientTransportFactory;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;

View File

@ -176,7 +176,7 @@ public class TestServiceClient {
String serverHost = getServerHost(argMap);
int serverPort = getPort(argMap);
com.google.net.stubby.newtransport.AbstractStream.GRPC_V2_PROTOCOL =
com.google.net.stubby.transport.AbstractStream.GRPC_V2_PROTOCOL =
getGrpcVersion(argMap) == 2;
switch (stubType) {
case BLOCKING:

View File

@ -5,8 +5,8 @@ import com.google.common.collect.Maps;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.net.stubby.ServerImpl;
import com.google.net.stubby.ServerInterceptors;
import com.google.net.stubby.newtransport.netty.NettyServerBuilder;
import com.google.net.stubby.testing.TestUtils;
import com.google.net.stubby.transport.netty.NettyServerBuilder;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.util.SelfSignedCertificate;
@ -95,7 +95,7 @@ public class TestServiceServer {
Transport transport = getTransport(argMap);
int port = getPort(RPC_PORT_ARG, argMap);
com.google.net.stubby.newtransport.AbstractStream.GRPC_V2_PROTOCOL =
com.google.net.stubby.transport.AbstractStream.GRPC_V2_PROTOCOL =
getGrpcVersion(argMap) == 2;
final TestServiceServer server = new TestServiceServer(transport, port);

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

View File

@ -1,9 +1,9 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.net.stubby.newtransport.AbstractBuffer;
import com.google.net.stubby.newtransport.Buffer;
import com.google.net.stubby.transport.AbstractBuffer;
import com.google.net.stubby.transport.Buffer;
import io.netty.buffer.ByteBuf;

View File

@ -1,9 +1,9 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.util.concurrent.Service;
import com.google.net.stubby.AbstractChannelBuilder;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.newtransport.netty.NettyClientTransportFactory.NegotiationType;
import com.google.net.stubby.transport.ClientTransportFactory;
import com.google.net.stubby.transport.netty.NettyClientTransportFactory.NegotiationType;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;

View File

@ -1,6 +1,6 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.netty.NettyClientStream.PENDING_STREAM_ID;
import static com.google.net.stubby.transport.netty.NettyClientStream.PENDING_STREAM_ID;
import com.google.common.base.Preconditions;
import com.google.net.stubby.Metadata;

View File

@ -1,21 +1,21 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.StreamState.CLOSED;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.newtransport.netty.Utils.GRPC_STATUS_HEADER;
import static com.google.net.stubby.transport.StreamState.CLOSED;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.transport.netty.Utils.GRPC_STATUS_HEADER;
import static io.netty.util.CharsetUtil.UTF_8;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.AbstractClientStream;
import com.google.net.stubby.newtransport.Buffers;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.GrpcDeframer;
import com.google.net.stubby.newtransport.HttpUtil;
import com.google.net.stubby.newtransport.MessageDeframer2;
import com.google.net.stubby.transport.AbstractClientStream;
import com.google.net.stubby.transport.Buffers;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.GrpcDeframer;
import com.google.net.stubby.transport.HttpUtil;
import com.google.net.stubby.transport.MessageDeframer2;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static io.netty.channel.ChannelOption.SO_KEEPALIVE;
@ -8,11 +8,11 @@ import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.MethodDescriptor;
import com.google.net.stubby.newtransport.AbstractClientTransport;
import com.google.net.stubby.newtransport.ClientStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.ClientTransport;
import com.google.net.stubby.newtransport.netty.NettyClientTransportFactory.NegotiationType;
import com.google.net.stubby.transport.AbstractClientTransport;
import com.google.net.stubby.transport.ClientStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.ClientTransport;
import com.google.net.stubby.transport.netty.NettyClientTransportFactory.NegotiationType;
import com.google.net.stubby.util.ssl.SslContextFactory;
import io.netty.bootstrap.Bootstrap;

View File

@ -1,12 +1,12 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import java.net.InetSocketAddress;
import com.google.net.stubby.transport.ClientTransportFactory;
import io.netty.channel.EventLoopGroup;
import java.net.InetSocketAddress;
/**
* Factory that manufactures instances of {@link NettyClientTransport}.
*/

View File

@ -1,13 +1,13 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.TransportFrameUtil.COMPRESSION_HEADER_LENGTH;
import static com.google.net.stubby.newtransport.TransportFrameUtil.isFlateCompressed;
import static com.google.net.stubby.transport.TransportFrameUtil.COMPRESSION_HEADER_LENGTH;
import static com.google.net.stubby.transport.TransportFrameUtil.isFlateCompressed;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.io.Closeables;
import com.google.net.stubby.newtransport.Buffer;
import com.google.net.stubby.newtransport.Decompressor;
import com.google.net.stubby.transport.Buffer;
import com.google.net.stubby.transport.Decompressor;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;

View File

@ -1,11 +1,11 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static io.netty.channel.ChannelOption.SO_BACKLOG;
import static io.netty.channel.ChannelOption.SO_KEEPALIVE;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AbstractService;
import com.google.net.stubby.newtransport.ServerListener;
import com.google.net.stubby.transport.ServerListener;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;

View File

@ -1,10 +1,10 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import com.google.net.stubby.AbstractServerBuilder;
import com.google.net.stubby.HandlerRegistry;
import com.google.net.stubby.newtransport.ServerListener;
import com.google.net.stubby.transport.ServerListener;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;

View File

@ -1,17 +1,17 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.newtransport.netty.Utils.HTTP_METHOD;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.transport.netty.Utils.HTTP_METHOD;
import static io.netty.buffer.Unpooled.EMPTY_BUFFER;
import static io.netty.handler.codec.http2.Http2CodecUtil.toByteBuf;
import static io.netty.handler.codec.http2.Http2Error.NO_ERROR;
import com.google.common.base.Preconditions;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.ServerStreamListener;
import com.google.net.stubby.newtransport.ServerTransportListener;
import com.google.net.stubby.newtransport.TransportFrameUtil;
import com.google.net.stubby.transport.ServerStreamListener;
import com.google.net.stubby.transport.ServerTransportListener;
import com.google.net.stubby.transport.TransportFrameUtil;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFuture;

View File

@ -1,12 +1,12 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.newtransport.AbstractServerStream;
import com.google.net.stubby.newtransport.GrpcDeframer;
import com.google.net.stubby.newtransport.MessageDeframer2;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.AbstractServerStream;
import com.google.net.stubby.transport.GrpcDeframer;
import com.google.net.stubby.transport.MessageDeframer2;
import com.google.net.stubby.transport.StreamState;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;

View File

@ -1,9 +1,9 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AbstractService;
import com.google.net.stubby.newtransport.ServerListener;
import com.google.net.stubby.newtransport.ServerTransportListener;
import com.google.net.stubby.transport.ServerListener;
import com.google.net.stubby.transport.ServerTransportListener;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;

View File

@ -1,6 +1,6 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.net.stubby.newtransport.Stream;
import com.google.net.stubby.transport.Stream;
import io.netty.buffer.ByteBuf;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufHolder;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;

View File

@ -1,8 +1,8 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import com.google.common.base.Preconditions;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.newtransport.HttpUtil;
import com.google.net.stubby.transport.HttpUtil;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static io.netty.handler.codec.http2.DefaultHttp2InboundFlowController.DEFAULT_WINDOW_UPDATE_RATIO;
import static io.netty.handler.codec.http2.DefaultHttp2InboundFlowController.WINDOW_UPDATE_OFF;
@ -6,11 +6,11 @@ import static io.netty.handler.codec.http2.DefaultHttp2InboundFlowController.WIN
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;
import javax.annotation.Nullable;
import io.netty.channel.Channel;
import io.netty.handler.codec.http2.DefaultHttp2InboundFlowController;
import javax.annotation.Nullable;
/**
* An object that manages inbound flow control for a single stream by disabling sending of HTTP/2
* {@code WINDOW_UPDATE} frames until the previously delivered message completes.

View File

@ -1,18 +1,18 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.common.base.Charsets.UTF_8;
import static org.junit.Assert.assertEquals;
import com.google.net.stubby.newtransport.Buffer;
import com.google.net.stubby.newtransport.BufferTestBase;
import com.google.net.stubby.transport.Buffer;
import com.google.net.stubby.transport.BufferTestBase;
import io.netty.buffer.Unpooled;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import io.netty.buffer.Unpooled;
/**
* Tests for {@link NettyBuffer}.
*/

View File

@ -1,11 +1,11 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.newtransport.netty.Utils.HTTPS;
import static com.google.net.stubby.newtransport.netty.Utils.HTTP_METHOD;
import static com.google.net.stubby.newtransport.netty.Utils.STATUS_OK;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.transport.netty.Utils.HTTPS;
import static com.google.net.stubby.transport.netty.Utils.HTTP_METHOD;
import static com.google.net.stubby.transport.netty.Utils.STATUS_OK;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
@ -18,7 +18,7 @@ import static org.mockito.Mockito.when;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.StreamState;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

View File

@ -1,10 +1,10 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.netty.NettyTestUtil.messageFrame;
import static com.google.net.stubby.newtransport.netty.NettyTestUtil.statusFrame;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.newtransport.netty.Utils.STATUS_OK;
import static com.google.net.stubby.transport.netty.NettyTestUtil.messageFrame;
import static com.google.net.stubby.transport.netty.NettyTestUtil.statusFrame;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.transport.netty.Utils.STATUS_OK;
import static io.netty.util.CharsetUtil.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
@ -15,9 +15,14 @@ import static org.mockito.Mockito.verify;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.AbstractStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.AbstractStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.StreamState;
import io.netty.buffer.Unpooled;
import io.netty.handler.codec.AsciiString;
import io.netty.handler.codec.http2.DefaultHttp2Headers;
import io.netty.handler.codec.http2.Http2Headers;
import org.junit.After;
import org.junit.Assume;
@ -29,11 +34,6 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import io.netty.buffer.Unpooled;
import io.netty.handler.codec.AsciiString;
import io.netty.handler.codec.http2.DefaultHttp2Headers;
import io.netty.handler.codec.http2.Http2Headers;
/**
* Tests for {@link NettyClientStream}.
*/

View File

@ -1,25 +1,25 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.net.stubby.newtransport.Buffers.readAsStringUtf8;
import static com.google.net.stubby.newtransport.TransportFrameUtil.COMPRESSION_HEADER_LENGTH;
import static com.google.net.stubby.newtransport.TransportFrameUtil.FLATE_FLAG;
import static com.google.net.stubby.newtransport.TransportFrameUtil.NO_COMPRESS_FLAG;
import static com.google.net.stubby.transport.Buffers.readAsStringUtf8;
import static com.google.net.stubby.transport.TransportFrameUtil.COMPRESSION_HEADER_LENGTH;
import static com.google.net.stubby.transport.TransportFrameUtil.FLATE_FLAG;
import static com.google.net.stubby.transport.TransportFrameUtil.NO_COMPRESS_FLAG;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import com.google.net.stubby.newtransport.Buffer;
import com.google.net.stubby.newtransport.Buffers;
import com.google.net.stubby.newtransport.CompositeBuffer;
import com.google.net.stubby.transport.Buffer;
import com.google.net.stubby.transport.Buffers;
import com.google.net.stubby.transport.CompositeBuffer;
import io.netty.buffer.Unpooled;
import io.netty.buffer.UnpooledByteBufAllocator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import io.netty.buffer.Unpooled;
import io.netty.buffer.UnpooledByteBufAllocator;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
@ -6,14 +6,6 @@ import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.buffer.UnpooledByteBufAllocator;
@ -29,6 +21,14 @@ import io.netty.handler.codec.http2.Http2FrameWriter;
import io.netty.handler.codec.http2.Http2Headers;
import io.netty.handler.codec.http2.Http2Settings;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
/**
* Base class for Netty handler unit tests.
*/

View File

@ -1,9 +1,9 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.newtransport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.newtransport.netty.Utils.HTTP_METHOD;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static com.google.net.stubby.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static com.google.net.stubby.transport.netty.Utils.HTTP_METHOD;
import static io.netty.handler.codec.http2.Http2CodecUtil.toByteBuf;
import static io.netty.handler.codec.http2.Http2Exception.protocolError;
import static org.junit.Assert.assertArrayEquals;
@ -20,19 +20,11 @@ import com.google.common.io.ByteStreams;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;
import com.google.net.stubby.Status.Code;
import com.google.net.stubby.newtransport.Framer;
import com.google.net.stubby.newtransport.MessageFramer;
import com.google.net.stubby.newtransport.ServerStream;
import com.google.net.stubby.newtransport.ServerStreamListener;
import com.google.net.stubby.newtransport.ServerTransportListener;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import com.google.net.stubby.transport.Framer;
import com.google.net.stubby.transport.MessageFramer;
import com.google.net.stubby.transport.ServerStream;
import com.google.net.stubby.transport.ServerStreamListener;
import com.google.net.stubby.transport.ServerTransportListener;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
@ -54,6 +46,14 @@ import io.netty.handler.codec.http2.Http2Headers;
import io.netty.handler.codec.http2.Http2OutboundFlowController;
import io.netty.handler.codec.http2.Http2Settings;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.ByteBuffer;

View File

@ -1,7 +1,7 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.netty.NettyTestUtil.messageFrame;
import static com.google.net.stubby.newtransport.netty.NettyTestUtil.statusFrame;
import static com.google.net.stubby.transport.netty.NettyTestUtil.messageFrame;
import static com.google.net.stubby.transport.netty.NettyTestUtil.statusFrame;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.same;
@ -12,8 +12,8 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.ServerStreamListener;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.ServerStreamListener;
import com.google.net.stubby.transport.StreamState;
import io.netty.buffer.EmptyByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;

View File

@ -1,6 +1,6 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.newtransport.netty.NettyTestUtil.messageFrame;
import static com.google.net.stubby.transport.netty.NettyTestUtil.messageFrame;
import static io.netty.handler.codec.http2.DefaultHttp2InboundFlowController.DEFAULT_WINDOW_UPDATE_RATIO;
import static io.netty.handler.codec.http2.DefaultHttp2InboundFlowController.WINDOW_UPDATE_OFF;
import static io.netty.util.CharsetUtil.UTF_8;
@ -15,15 +15,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.newtransport.StreamListener;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import com.google.net.stubby.transport.StreamListener;
import io.netty.buffer.UnpooledByteBufAllocator;
import io.netty.channel.Channel;
@ -35,6 +27,14 @@ import io.netty.channel.ChannelPromise;
import io.netty.channel.EventLoop;
import io.netty.handler.codec.http2.DefaultHttp2InboundFlowController;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.netty;
package com.google.net.stubby.transport.netty;
import static com.google.net.stubby.GrpcFramingUtil.PAYLOAD_FRAME;
import static com.google.net.stubby.GrpcFramingUtil.STATUS_FRAME;
@ -6,7 +6,7 @@ import static io.netty.util.CharsetUtil.UTF_8;
import com.google.common.io.ByteStreams;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.AbstractStream;
import com.google.net.stubby.transport.AbstractStream;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.SerializingExecutor;

View File

@ -1,9 +1,9 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.newtransport.HttpUtil;
import com.google.net.stubby.transport.HttpUtil;
import com.squareup.okhttp.internal.spdy.Header;

View File

@ -1,7 +1,7 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.net.stubby.newtransport.AbstractBuffer;
import com.google.net.stubby.newtransport.Buffer;
import com.google.net.stubby.transport.AbstractBuffer;
import com.google.net.stubby.transport.Buffer;
import java.io.EOFException;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
@ -7,14 +7,14 @@ import com.google.common.util.concurrent.MoreExecutors;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.MethodDescriptor;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.AbstractClientStream;
import com.google.net.stubby.newtransport.AbstractClientTransport;
import com.google.net.stubby.newtransport.Buffers;
import com.google.net.stubby.newtransport.ClientStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.ClientTransport;
import com.google.net.stubby.newtransport.MessageDeframer2;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.AbstractClientStream;
import com.google.net.stubby.transport.AbstractClientTransport;
import com.google.net.stubby.transport.Buffers;
import com.google.net.stubby.transport.ClientStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.ClientTransport;
import com.google.net.stubby.transport.MessageDeframer2;
import com.google.net.stubby.transport.StreamState;
import com.squareup.okhttp.internal.spdy.ErrorCode;
import com.squareup.okhttp.internal.spdy.FrameReader;

View File

@ -1,8 +1,8 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.common.base.Preconditions;
import com.google.net.stubby.newtransport.ClientTransport;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.transport.ClientTransport;
import com.google.net.stubby.transport.ClientTransportFactory;
import java.net.InetSocketAddress;
import java.util.concurrent.ExecutorService;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import com.google.net.stubby.Metadata;

View File

@ -1,4 +1,4 @@
package com.google.net.stubby.newtransport.okhttp;
package com.google.net.stubby.transport.okhttp;
import static com.google.common.base.Charsets.UTF_8;
import static org.junit.Assert.assertEquals;
@ -20,10 +20,10 @@ import com.google.common.util.concurrent.SettableFuture;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.MethodDescriptor;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.AbstractStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.okhttp.OkHttpClientTransport.ClientFrameHandler;
import com.google.net.stubby.newtransport.okhttp.OkHttpClientTransport.OkHttpClientStream;
import com.google.net.stubby.transport.AbstractStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.okhttp.OkHttpClientTransport.ClientFrameHandler;
import com.google.net.stubby.transport.okhttp.OkHttpClientTransport.OkHttpClientStream;
import com.squareup.okhttp.internal.spdy.ErrorCode;
import com.squareup.okhttp.internal.spdy.FrameReader;

View File

@ -8,11 +8,11 @@ import com.google.net.stubby.SerializingExecutor;
import com.google.net.stubby.ServerCall;
import com.google.net.stubby.ServerMethodDefinition;
import com.google.net.stubby.Status;
import com.google.net.stubby.newtransport.ClientStream;
import com.google.net.stubby.newtransport.ClientStreamListener;
import com.google.net.stubby.newtransport.ClientTransport;
import com.google.net.stubby.newtransport.ClientTransportFactory;
import com.google.net.stubby.newtransport.StreamState;
import com.google.net.stubby.transport.ClientStream;
import com.google.net.stubby.transport.ClientStreamListener;
import com.google.net.stubby.transport.ClientTransport;
import com.google.net.stubby.transport.ClientTransportFactory;
import com.google.net.stubby.transport.StreamState;
import java.io.IOException;
import java.io.InputStream;