View Javadoc

1   // SECTION-START[License Header]
2   // <editor-fold defaultstate="collapsed" desc=" Generated License ">
3   /*
4    *   Java Object Management and Configuration
5    *   Copyright (C) Christian Schulte, 2005-206
6    *   All rights reserved.
7    *
8    *   Redistribution and use in source and binary forms, with or without
9    *   modification, are permitted provided that the following conditions
10   *   are met:
11   *
12   *     o Redistributions of source code must retain the above copyright
13   *       notice, this list of conditions and the following disclaimer.
14   *
15   *     o Redistributions in binary form must reproduce the above copyright
16   *       notice, this list of conditions and the following disclaimer in
17   *       the documentation and/or other materials provided with the
18   *       distribution.
19   *
20   *   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21   *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22   *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23   *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
24   *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25   *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26   *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27   *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28   *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29   *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30   *
31   *   $JOMC: Invocation.java 4712 2013-01-02 13:56:12Z schulte $
32   *
33   */
34  // </editor-fold>
35  // SECTION-END
36  package org.jomc.spi;
37  
38  import java.lang.reflect.Method;
39  import java.util.Map;
40  
41  // SECTION-START[Documentation]
42  // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
43  /**
44   * Invocation of an object.
45   *
46   * <dl>
47   *   <dt><b>Identifier:</b></dt><dd>org.jomc.spi.Invocation</dd>
48   *   <dt><b>Multiplicity:</b></dt><dd>One</dd>
49   *   <dt><b>Scope:</b></dt><dd>None</dd>
50   * </dl>
51   *
52   * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0
53   * @version 1.0
54   * @see org.jomc.ObjectManager#getObject(java.lang.Class) getObject(Invocation.class)
55   * @see org.jomc.ObjectManager#getObject(java.lang.Class,java.lang.String) getObject(Invocation.class, "<i>implementation name</i>")
56   * @see org.jomc.ObjectManagerFactory
57   */
58  // </editor-fold>
59  // SECTION-END
60  // SECTION-START[Annotations]
61  // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
62  @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
63  // </editor-fold>
64  // SECTION-END
65  public interface Invocation
66  {
67      // SECTION-START[Invocation]
68  
69      /**
70       * Gets the context of this invocation.
71       *
72       * @return The context of this invocation.
73       */
74      Map getContext();
75  
76      /**
77       * Gets the object of this invocation.
78       *
79       * @return The object of this invocation.
80       */
81      Object getObject();
82  
83      /**
84       * Gets the method of this invocation.
85       *
86       * @return The method of this invocation.
87       */
88      Method getMethod();
89  
90      /**
91       * Gets the arguments of this invocation.
92       *
93       * @return The arguments of this invocation or {@code null}.
94       */
95      Object[] getArguments();
96  
97      /**
98       * Gets the result of this invocation.
99       *
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 }