Package: CommandInvoker

CommandInvoker

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2010 VMware Inc.
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
7: *
8: * Contributors:
9: * VMware Inc. - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.shell.internal;
13:
14: import java.util.List;
15:
16: import org.eclipse.virgo.shell.internal.parsing.ParsedCommand;
17:
18:
19:
20: /**
21: * A <code>CommandInvoker</code> is used to invoke a command once it has been parsed.
22: * <p />
23: *
24: * <strong>Concurrent Semantics</strong><br />
25: *
26: * Implementations <strong>must</strong> be thread-safe.
27: *
28: */
29: public interface CommandInvoker {
30:
31: /**
32: * Invokes the supplied <code>command</code>.
33: * @param command the command to invoke
34: * @return the result of invoking the command
35: * @throws CommandNotFoundException if a matching command could not be found
36: * @throws ParametersMismatchException if the command has too few parameters
37: */
38: List<String> invokeCommand(ParsedCommand command) throws CommandNotFoundException, ParametersMismatchException;
39: }