00001 /* 00002 * ExecutableClass.hpp 00003 * 00004 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_EXECUTABLE_CLASS_HPP 00017 #define COH_EXECUTABLE_CLASS_HPP 00018 00019 #include "coherence/lang/compatibility.hpp" 00020 00021 #include "coherence/lang/Class.hpp" 00022 00023 COH_OPEN_NAMESPACE2(coherence,lang) 00024 00025 /** 00026 * Interface specialization for Classes which are executable. 00027 * 00028 * An executable class includes a method compatible with the following 00029 * signature: 00030 * @code 00031 * public: static void main(ObjectArray::View vasArg); 00032 * @endcode 00033 * The class does not implement this interface, it however must be registered 00034 * with the SystemClassLoader via COH_REGISTER_EXECUTABLE_CLASS(class). 00035 * 00036 * @author mf 2008.10.02 00037 */ 00038 class ExecutableClass 00039 : public interface_spec<ExecutableClass> 00040 { 00041 // ----- ExecutableClass interface -------------------------------------- 00042 00043 public: 00044 /** 00045 * Execute the class. 00046 * 00047 * @param vasArg the executable argument String array 00048 */ 00049 virtual void execute(ObjectArray::View vasArg) const = 0; 00050 }; 00051 00052 COH_CLOSE_NAMESPACE2 00053 00054 #endif // COH_EXECUTABLE_CLASS_HPP