C++ Client API Reference for Oracle Coherence
14c (14.1.2.0.0)

F79659-03

coherence/lang/ExecutableClass.hpp

00001 /*
00002  * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
00003  *
00004  * Licensed under the Universal Permissive License v 1.0 as shown at
00005  * http://oss.oracle.com/licenses/upl.
00006  */
00007 #ifndef COH_EXECUTABLE_CLASS_HPP
00008 #define COH_EXECUTABLE_CLASS_HPP
00009 
00010 #include "coherence/lang/compatibility.hpp"
00011 
00012 #include "coherence/lang/Class.hpp"
00013 
00014 COH_OPEN_NAMESPACE2(coherence,lang)
00015 
00016 /**
00017 * Interface specialization for Classes which are executable.
00018 *
00019 * An executable class includes a method compatible with the following
00020 * signature:
00021 * @code
00022 * public: static void main(ObjectArray::View vasArg);
00023 * @endcode
00024 * The class does not implement this interface, it however must be registered
00025 * with the SystemClassLoader via COH_REGISTER_EXECUTABLE_CLASS(class).
00026 *
00027 * As of Coherence 3.7.1 it is no longer necessary to register executable classes
00028 * via this interface. As an alternative the "main" method with the above
00029 * signature can be registered via any Class implementation and will be
00030 * resolved via reflection.
00031 *
00032 * @author mf 2008.10.02
00033 */
00034 class ExecutableClass
00035     : public interface_spec<ExecutableClass>
00036     {
00037     // ----- ExecutableClass interface --------------------------------------
00038 
00039     public:
00040         /**
00041         * Execute the class.
00042         *
00043         * @param vasArg  the executable argument String array
00044         */
00045         virtual void execute(ObjectArray::View vasArg) const = 0;
00046     };
00047 
00048 COH_CLOSE_NAMESPACE2
00049 
00050 #endif // COH_EXECUTABLE_CLASS_HPP
Copyright © 2000, 2025, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.