1
/*******************************************************************************
2
* Copyright (c) 2008, 2009 Wind River Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Wind River Systems - initial API and implementation
10
* Nokia - create and use backend service.
11
*******************************************************************************/
12
package org.eclipse.cdt.dsf.mi.service;
14
import java.io.InputStream;
15
import java.io.OutputStream;
17
import org.eclipse.cdt.dsf.concurrent.Immutable;
18
import org.eclipse.cdt.dsf.service.IDsfService;
21
* Service for controlling the back end process.
24
public interface IMIBackend extends IDsfService {
26
public enum State { NOT_INITIALIZED, STARTED, TERMINATED };
29
* Event indicating that the back end process has started or terminated.
32
public static class BackendStateChangedEvent {
33
final private String fSessionId;
34
final private String fBackendId;
35
final private State fState;
37
public BackendStateChangedEvent(String sessionId, String backendId, State state) {
38
fSessionId = sessionId;
39
fBackendId = backendId;
43
public String getSessionId() {
47
public String getBackendId() {
51
public State getState() {
57
* Returns the identifier of this backend service. It can be used
58
* to distinguish between multiple instances of this service in a
61
public String getId();
64
* Requests that the backend be immediately terminated.
66
public void destroy();
69
* Returns the current state of the backend.
72
public State getState();
75
* Returns the exit code of the backend. Returns <code>-1</code> if
76
* the backend exit code is not available.
79
public int getExitCode();
82
* Returns the backend command stream.
84
public InputStream getMIInputStream();
87
* Returns the backend result and event stream.
90
public OutputStream getMIOutputStream();