/*
 * Copyright 2016-present Facebook, Inc.
 *
 * 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 com.facebook.buck.worker;

import java.io.Closeable;
import java.io.IOException;

public interface WorkerProcessProtocol {

  interface CommandSender extends Closeable {
    void handshake(int messageId) throws IOException;

    void send(int messageId, WorkerProcessCommand command) throws IOException;

    int receiveCommandResponse(int messageID) throws IOException;

    /** Instructs the CommandReceiver to shut itself down. */
    @Override
    void close() throws IOException;
  }

  interface CommandReceiver extends Closeable {
    void handshake(int messageId) throws IOException;

    WorkerProcessCommand receiveCommand(int messageId) throws IOException;

    void sendResponse(int messageId, String type, int exitCode) throws IOException;

    /** @return true if the other end has indicated that close() should be called. */
    boolean shouldClose() throws IOException;

    /** Should be called when the CommandSender has requested the receiver closes. */
    @Override
    void close() throws IOException;
  }
}

@@ -1099,546 +1099,7 @@
 %0A  %7D
-%0A%0A  interface CommandReceiver extends Closeable %7B%0A    void handshake(int messageId) throws IOException;%0A%0A    WorkerProcessCommand receiveCommand(int messageId) throws IOException;%0A%0A    void sendResponse(int messageId, String type, int exitCode) throws IOException;%0A%0A    /** @return true if the other end has indicated that close() should be called. */%0A    boolean shouldClose() throws IOException;%0A%0A    /** Should be called when the CommandSender has requested the receiver closes. */%0A    @Override%0A    void close() throws IOException;%0A  %7D
 %0A%7D%0A

Remove WorkerProcessProtocol.CommandReceiver