/*
* Copyright 2007 Kevin Roe, Daniel Mccarney
* This file is part of Jriver.
*
* Jriver is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Jriver is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jriver.lib.std;
import java.io.*;
import org.jriver.lib.Player;
/**
* An interface that all commands accessible by the Jriver driver
* must implement.
* @author Enigma
*/
public interface Command
{
/**
* The entry point defined in this interface
*/
public static final String ENTRY_POINT = "execute";
/**
* The directory (i.e. package) in which we can find our commands
*/
public static final String COMMAND_DIR =
File.pathSeparator + "org" + File.pathSeparator + "jriver" +
File.pathSeparator + "lib" + File.pathSeparator + "bin" + File.pathSeparator;
/**
* The package in which we can find our commands
*/
public static final String COMMAND_PACKAGE = "org.jriver.lib.bin.";
/**
* The entry point to the command
* The execute method is called when the command is loaded by the
* command parser. It is the main entry point for a command. Equivalent
* to the main method of a regular application.
* @param args The arguments for the command to operate on
* @param in The InputStream of the current user
* @param out The OutputStream of the current user
*/
public void execute (String[] args, Player player);
}