diff options
author | Tobias Schwarz | 2013-03-15 12:57:29 +0000 |
---|---|---|
committer | Tobias Schwarz | 2013-03-15 12:57:29 +0000 |
commit | 8068562b829f7f9b2800d7c848964eb063876c79 (patch) | |
tree | f65daf43c18f6e1f20988e8f23cd655e787bed93 /target_explorer/plugins/org.eclipse.tcf.te.runtime.services | |
parent | f6e58ecf6f0ffde4d3a4abf2e262f0e9c8bc18dd (diff) | |
download | org.eclipse.tcf-8068562b829f7f9b2800d7c848964eb063876c79.tar.gz org.eclipse.tcf-8068562b829f7f9b2800d7c848964eb063876c79.tar.xz org.eclipse.tcf-8068562b829f7f9b2800d7c848964eb063876c79.zip |
Target Explorer: simulator service support
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.services')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java | 137 |
1 files changed, 82 insertions, 55 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java index 4023183ff..9bdf8b78f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java @@ -1,55 +1,82 @@ -/******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. 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: - * Wind River Systems - initial API and implementation - *******************************************************************************/ -package org.eclipse.tcf.te.runtime.services.interfaces; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; - -/** - * Simulator service. - * <p> - * Allows to start/stop external simulators. - * <p> - * Simulator instance related UI parts, like configuration panels, are retrieved - * by clients via the {@link IUIService}. - */ -public interface ISimulatorService extends IService { - - /** - * Starts the simulator. - * - * @param context The context. Must not be <code>null</code>. - * @param config The encoded simulator settings or <code>null</code>. - * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>. - * @param monitor The progress monitor or <code>null</code>. - */ - public void start(Object context, String config, ICallback callback, IProgressMonitor monitor); - - /** - * Stops the simulator. - * - * @param context The context. Must not be <code>null</code>. - * @param config The encoded simulator settings or <code>null</code>. - * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>. - * @param monitor The progress monitor or <code>null</code>. - */ - public void stop(Object context, String config, ICallback callback, IProgressMonitor monitor); - - /** - * Checks if the simulator is running. - * <p> - * The result of the check is return as {@link Boolean} object by the callback's {@link ICallback#getResult()} method. - * - * @param context The context. Must not be <code>null</code>. - * @param config The encoded simulator settings or <code>null</code>. - * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>. - */ - public void isRunning(Object context, String config, ICallback callback); -} +/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services.interfaces;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+
+/**
+ * Simulator service.
+ * <p>
+ * Allows to start/stop external simulators.
+ * <p>
+ * Simulator instance related UI parts, like configuration panels, are retrieved
+ * by clients via the {@link IUIService}.
+ */
+public interface ISimulatorService extends IService {
+
+ /**
+ * The constants for the simulator state.
+ */
+ public enum State { Stopped, Starting, Started, Stopping }
+
+ /**
+ * Starts the simulator.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param config The encoded simulator settings or <code>null</code>.
+ * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>.
+ * @param monitor The progress monitor or <code>null</code>.
+ */
+ public void start(Object context, String config, ICallback callback, IProgressMonitor monitor);
+
+ /**
+ * Stops the simulator.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param config The encoded simulator settings or <code>null</code>.
+ * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>.
+ * @param monitor The progress monitor or <code>null</code>.
+ */
+ public void stop(Object context, String config, ICallback callback, IProgressMonitor monitor);
+
+ /**
+ * Checks if the simulator is running.
+ * <p>
+ * The result of the check is return as {@link Boolean} object by the callback's {@link ICallback#getResult()} method.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param config The encoded simulator settings or <code>null</code>.
+ * @param callback The callback to invoke once the operation finishes. Must not be <code>null</code>.
+ */
+ public void isRunning(Object context, String config, ICallback callback);
+
+ /**
+ * Get the state of the simulator for the given context.
+ * @param context The context. Must not be <code>null</code>.
+ * @param config The encoded simulator settings or <code>null</code>.
+ * @return The simulator state.
+ */
+ public State getState(Object context, String config);
+
+ /**
+ * Get the default config for the simulator.
+ * The returned config does not need to be valid!
+ * @return The default config or <code>null</code>.
+ */
+ public String getDefaultConfig();
+
+ /**
+ * Validate a simulator config.
+ * @param config The config to validate.
+ * @return <code>true</code> if the config is valid.
+ */
+ public boolean isValidConfig(String config);
+}
|