Remove MachineProcees and deprecated method in CommandOutputConsole
parent
9c19136bbf
commit
ddb6e0ad8b
|
|
@ -1,38 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012-2017 Codenvy, S.A.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Codenvy, S.A. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.che.api.core.model.machine;
|
||||
|
||||
import org.eclipse.che.api.core.model.workspace.config.Command;
|
||||
|
||||
/**
|
||||
* Describe process running in a machine
|
||||
*
|
||||
* @author andrew00x
|
||||
*/
|
||||
public interface MachineProcess extends Command {
|
||||
/**
|
||||
* Returns pid of the process.
|
||||
* To be able to control from the clients pid should be valid even if process isn't started yet.
|
||||
*
|
||||
* @return pid of the process
|
||||
*/
|
||||
int getPid();
|
||||
|
||||
/**
|
||||
* Checks is process is running or not.
|
||||
*
|
||||
* @return {@code true} if process running and {@code false} otherwise
|
||||
*/
|
||||
boolean isAlive();
|
||||
|
||||
/** Returns websocket chanel for execution logs of command */
|
||||
String getOutputChannel();
|
||||
}
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.che.ide.console;
|
||||
|
||||
import org.eclipse.che.api.machine.shared.dto.MachineProcessDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.ProcessSubscribeResponseDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessDiedEventDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessStartedEventDto;
|
||||
|
|
@ -43,12 +42,6 @@ public interface CommandOutputConsole extends OutputConsole {
|
|||
@Deprecated
|
||||
void listenToOutput(String wsChannel);
|
||||
|
||||
/**
|
||||
* Attaches to the process launched by the command.
|
||||
*/
|
||||
@Deprecated
|
||||
void attachToProcess(MachineProcessDto process);
|
||||
|
||||
/**
|
||||
* Get an output console related operations that should be performed when
|
||||
* an standard error message received
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import com.google.inject.Inject;
|
|||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
|
||||
import org.eclipse.che.api.machine.shared.dto.MachineProcessDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.ProcessSubscribeResponseDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessDiedEventDto;
|
||||
import org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessStartedEventDto;
|
||||
|
|
@ -140,10 +139,6 @@ public class CommandOutputConsolePresenter implements CommandOutputConsole, Outp
|
|||
public void listenToOutput(String wsChannel) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachToProcess(MachineProcessDto process) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Consumer<ProcessStdErrEventDto> getStdErrConsumer() {
|
||||
return event -> {
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012-2017 Codenvy, S.A.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Codenvy, S.A. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.che.api.machine.shared.dto;
|
||||
|
||||
import org.eclipse.che.api.core.rest.shared.dto.Hyperlinks;
|
||||
import org.eclipse.che.api.core.rest.shared.dto.Link;
|
||||
import org.eclipse.che.api.core.model.workspace.config.Command;
|
||||
import org.eclipse.che.api.core.model.machine.MachineProcess;
|
||||
import org.eclipse.che.dto.shared.DTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Describes process created from {@link Command} in machine
|
||||
*
|
||||
* @author andrew00x
|
||||
*/
|
||||
@DTO
|
||||
public interface MachineProcessDto extends MachineProcess, Hyperlinks {
|
||||
void setPid(int pid);
|
||||
|
||||
MachineProcessDto withPid(int pid);
|
||||
|
||||
void setCommandLine(String commandLine);
|
||||
|
||||
MachineProcessDto withCommandLine(String commandLine);
|
||||
|
||||
void setAlive(boolean isAlive);
|
||||
|
||||
MachineProcessDto withAlive(boolean isAlive);
|
||||
|
||||
void setName(String commandName);
|
||||
|
||||
MachineProcessDto withName(String commandName);
|
||||
|
||||
void setType(String type);
|
||||
|
||||
MachineProcessDto withType(String type);
|
||||
|
||||
void setOutputChannel(String outputChannel);
|
||||
|
||||
MachineProcessDto withOutputChannel(String outputChannel);
|
||||
|
||||
@Override
|
||||
MachineProcessDto withLinks(List<Link> links);
|
||||
|
||||
void setAttributes(Map<String, String> attributes);
|
||||
|
||||
MachineProcessDto withAttributes(Map<String, String> attributes);
|
||||
}
|
||||
Loading…
Reference in New Issue