001    // SECTION-START[License Header]
002    // <editor-fold defaultstate="collapsed" desc=" Generated License ">
003    /*
004     *   Java Object Management and Configuration
005     *   Copyright (C) Christian Schulte, 2005-206
006     *   All rights reserved.
007     *
008     *   Redistribution and use in source and binary forms, with or without
009     *   modification, are permitted provided that the following conditions
010     *   are met:
011     *
012     *     o Redistributions of source code must retain the above copyright
013     *       notice, this list of conditions and the following disclaimer.
014     *
015     *     o Redistributions in binary form must reproduce the above copyright
016     *       notice, this list of conditions and the following disclaimer in
017     *       the documentation and/or other materials provided with the
018     *       distribution.
019     *
020     *   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
021     *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
022     *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
023     *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
024     *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
025     *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
026     *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
027     *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
028     *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
029     *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030     *
031     *   $JOMC: Invocation.java 4268 2012-02-16 23:14:52Z schulte2005 $
032     *
033     */
034    // </editor-fold>
035    // SECTION-END
036    package org.jomc.spi;
037    
038    import java.lang.reflect.Method;
039    import java.util.Map;
040    
041    // SECTION-START[Documentation]
042    // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
043    /**
044     * Invocation of an object.
045     *
046     * <dl>
047     *   <dt><b>Identifier:</b></dt><dd>org.jomc.spi.Invocation</dd>
048     *   <dt><b>Multiplicity:</b></dt><dd>One</dd>
049     *   <dt><b>Scope:</b></dt><dd>None</dd>
050     * </dl>
051     *
052     * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
053     * @version 1.0
054     * @see org.jomc.ObjectManager#getObject(java.lang.Class) getObject(Invocation.class)
055     * @see org.jomc.ObjectManager#getObject(java.lang.Class,java.lang.String) getObject(Invocation.class, "<i>implementation name</i>")
056     * @see org.jomc.ObjectManagerFactory
057     */
058    // </editor-fold>
059    // SECTION-END
060    // SECTION-START[Annotations]
061    // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
062    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" )
063    // </editor-fold>
064    // SECTION-END
065    public interface Invocation
066    {
067        // SECTION-START[Invocation]
068    
069        /**
070         * Gets the context of this invocation.
071         *
072         * @return The context of this invocation.
073         */
074        Map getContext();
075    
076        /**
077         * Gets the object of this invocation.
078         *
079         * @return The object of this invocation.
080         */
081        Object getObject();
082    
083        /**
084         * Gets the method of this invocation.
085         *
086         * @return The method of this invocation.
087         */
088        Method getMethod();
089    
090        /**
091         * Gets the arguments of this invocation.
092         *
093         * @return The arguments of this invocation or {@code null}.
094         */
095        Object[] getArguments();
096    
097        /**
098         * Gets the result of this invocation.
099         *
100         * @return The result of this invocation or {@code null}.
101         *
102         * @see #setResult(java.lang.Object)
103         */
104        Object getResult();
105    
106        /**
107         * Sets the result of this invocation.
108         *
109         * @param value The new result of this invocation or {@code null}.
110         *
111         * @see #getResult()
112         */
113        void setResult( Object value );
114    
115        // SECTION-END
116    }