RpcStreamConnection extends RpcConnection { private void initRpcSocketInputAndOutputStreamIfSocketBasedServer() throws ConnectionException { try { inputStream = new RpcSocketInputStream(socket, stats); outputStream = new RpcSocketOutputStream(socket, stats); } catch (Throwable thr) { Log.error("Unexpected exception: %s", thr.getLocalizedMessage()); Log.exception(thr); throwConnectionException(thr); } } RpcStreamConnection(String serverHost, int serverPort, Properties props,
                               ServerStats stats, P4Charset p4Charset, boolean secure); private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, boolean secure); private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure,
            String rsh); String getServerIpPort(); String getClientIpPort(); void disconnect(final RpcPacketDispatcher dispatcher); RpcPacket getRpcPacket(); RpcPacket getRpcPacket(final RpcPacketFieldRule fieldRule,
            final IFilterCallback filterCallback); int getSystemRecvBufferSize(); int getSystemSendBufferSize(); long putRpcPackets(@Nonnull RpcPacket[] packets); long putRpcPacket(@Nonnull RpcPacket packet); @Override void useConnectionCompression(); static final String TRACE_PREFIX; }
@Test public void initRpcSocketInputAndOutputStreamIfSocketBasedServer() throws NoSuchMethodException { Method initRpcSocketInputAndOutputStreamIfSocketBasedServer = getPrivateMethod(RpcStreamConnection.class, "initRpcSocketInputAndOutputStreamIfSocketBasedServer"); try { initRpcSocketInputAndOutputStreamIfSocketBasedServer.invoke(mockConnection); } catch (IllegalAccessException | InvocationTargetException e) { fail("should not happen"); } }