KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > model > DynamicEntryPointResolver


1 /*
2  * $Id: DynamicEntryPointResolver.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.model;
12
13 import org.mule.umo.UMODescriptor;
14 import org.mule.umo.model.ModelException;
15 import org.mule.umo.model.UMOEntryPoint;
16 import org.mule.umo.model.UMOEntryPointResolver;
17
18 /**
19  * <code>DynamicEntryPointResolver</code>
20  * <OL>
21  * <LI> Checks to see if the component implements the Callable lifecycle interface,
22  * then the onCall(UMOEventContext) method will be used to receive the event.
23  * <LI> If the component has a transformer configured for it, the return type for the
24  * transformer will be matched against methods on the component to see if there is a
25  * method that accepts the transformer return type. If so this event will be used.
26  * Note if there is more than one match, an exception will be thrown.
27  * <LI> If there is a method on the component that accepts an
28  * org.mule.umo.UMOEventContext . If so this event will be used. Note if there is
29  * more than one match, an exception will be thrown.
30  * <LI> The last chack determines if there are any meothds on the component that
31  * accept a java.util.Event . If so this event will be used. Note if there is more
32  * than one match, an exception will be thrown.
33  * <LI> If none of the above find a match an exception will be thrown and the
34  * component registration will fail.
35  * </OL>
36  * It allows also void methods where Mule assumes that the Payload itself of the
37  * message will be modified.
38  *
39  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
40  * @version $Revision: 3798 $
41  */

42 public class DynamicEntryPointResolver implements UMOEntryPointResolver
43 {
44
45     /**
46      * Default Constructor
47      */

48     public DynamicEntryPointResolver()
49     {
50         super();
51     }
52
53     /**
54      * Determinse if a void Entrypoint can be accepted. This will always return true
55      * for this implementation
56      *
57      * @return true
58      */

59     protected boolean isVoidOk()
60     {
61         return true;
62     }
63
64     public UMOEntryPoint resolveEntryPoint(UMODescriptor descriptor) throws ModelException
65     {
66         return new DynamicEntryPoint();
67     }
68 }
69
Popular Tags