KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > UMODescriptor


1 /*
2  * $Id: UMODescriptor.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.umo;
12
13 import org.mule.MuleException;
14 import org.mule.umo.endpoint.UMOEndpoint;
15 import org.mule.umo.routing.UMOInboundMessageRouter;
16 import org.mule.umo.routing.UMOOutboundMessageRouter;
17 import org.mule.umo.routing.UMOResponseMessageRouter;
18 import org.mule.umo.transformer.UMOTransformer;
19
20 import java.beans.ExceptionListener JavaDoc;
21 import java.util.List JavaDoc;
22 import java.util.Map JavaDoc;
23
24 /**
25  * <code>UMODescriptor</code> describes all the properties for a Mule UMO. New Mule
26  * Managed components can be initialised as needed from their descriptor.
27  *
28  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
29  * @version $Revision: 3798 $
30  */

31 public interface UMODescriptor extends UMOImmutableDescriptor
32 {
33     /**
34      * Interceptors are executable objects that can be chained together. Interceptors
35      * are executed in the order they are added, for example if INTERCEPTOR_1 is
36      * added and then INTERCEPTOR_2 is added to UMO_A the execution order will be:
37      * INTERCEPTOR_1 -> INTERCEPTOR_2 -> UMO_A.
38      *
39      * @param interceptor the interceptor to add.
40      */

41     void addInterceptor(UMOInterceptor interceptor);
42
43     /**
44      * Interceptors are executable objects that can be chained together. Interceptors
45      * are executed in the order they are added, for example if INTERCEPTOR_1 is
46      * added and then INTERCEPTOR_2 is added to UMO_A the execution order will be:
47      * INTERCEPTOR_1 -> INTERCEPTOR_2 -> UMO_A.
48      *
49      * @param interceptorList A list of interceptors to associate.
50      */

51     void setInterceptors(List JavaDoc interceptorList);
52
53     /**
54      * The exception strategy to use to handle exceptions in the Mule UMO.
55      *
56      * @param listener the exception strategy to use. If none has been set or
57      * argument is null a default
58      */

59     void setExceptionListener(ExceptionListener JavaDoc listener);
60
61     /**
62      * The inbound endpointUri to use when receiveing an event.
63      *
64      * @param endpoint the inbound endpoint to use
65      * @throws MuleException if the Provider is not valid i.e. the proivder is not a
66      * receiver
67      * @see org.mule.umo.endpoint.UMOEndpoint
68      * @deprecated use setInboundRouter() instead (see MULE-506)
69      */

70     void setInboundEndpoint(UMOEndpoint endpoint) throws MuleException;
71
72     /**
73      * sets the identifier for the Mule UMO created from the descriptor
74      *
75      * @param newName the identifier for the Mule UMO created from the descriptor
76      */

77     void setName(String JavaDoc newName);
78
79     /**
80      * The outbound Provider to use when sending an event.
81      *
82      * @param endpoint the outbound endpoint to use
83      * @throws MuleException if the Provider is not valid i.e. the proivder is a
84      * receiver
85      * @see UMOEndpoint
86      * @deprecated use setOutboundRouter() instead (see MULE-506)
87      */

88     void setOutboundEndpoint(UMOEndpoint endpoint) throws MuleException;
89
90     /**
91      * @param props the properties for the descriptor. These will be passed to the
92      * UMO when it's initialise method is called or set as bean properties
93      * whe the UMO is created
94      */

95     void setProperties(Map JavaDoc props);
96
97     /**
98      * The version on the Mule UMO. This is currently not used by the mule run-time
99      * but may be used in future.
100      *
101      * @param ver the version of the Mule descriptor
102      */

103     void setVersion(String JavaDoc ver);
104
105     /**
106      * The String used to instanciate create the object, this can be a FQ class name
107      * or a reference to an object in a configured container
108      *
109      * @param reference The String object reference
110      */

111     void setImplementation(Object JavaDoc reference);
112
113     /**
114      * Inbound Routers control how events are received by a component. If no router
115      * is set. A default will be used that uses the inboundProvider set on his
116      * descriptor.
117      *
118      * @param router the inbound router for this component
119      * @see UMOInboundMessageRouter
120      */

121     void setInboundRouter(UMOInboundMessageRouter router);
122
123     /**
124      * Outbound Routers control how events are published by a component once. the
125      * event has been processed. If no router is set. A default will be used that
126      * uses the outboundProvider set on his descriptor to route the event.
127      *
128      * @param router the outbound router for this component
129      * @see UMOOutboundMessageRouter
130      */

131     void setOutboundRouter(UMOOutboundMessageRouter router);
132
133     /**
134      * Response Routers control how events are returned in a request/response call.
135      * It cn be use to aggregate response events before returning, thus acting as a
136      * Join in a forked process. This can be used to make request/response calls a
137      * lot more efficient as independent tasks can be forked, execute concurrently
138      * and then join before the request completes
139      *
140      * @param router the response router for this component
141      * @see org.mule.umo.routing.UMOResponseMessageRouter
142      */

143     void setResponseRouter(UMOResponseMessageRouter router);
144
145     /**
146      * @param transformer the transformer to use.
147      * @see UMOTransformer
148      * @see org.mule.transformers.AbstractTransformer
149      * @deprecated use setInboundRouter() instead (see MULE-506)
150      */

151     void setInboundTransformer(UMOTransformer transformer);
152
153     /**
154      * The transformer to use when sending events or data.
155      *
156      * @param transformer the transformer to use.
157      * @see UMOTransformer
158      * @see org.mule.transformers.AbstractTransformer
159      * @deprecated use setOutboundRouter() instead (see MULE-506)
160      */

161     void setOutboundTransformer(UMOTransformer transformer);
162
163     /**
164      * Determines if only a single instance of this component is created. This is
165      * useful when a component hands off event processing to another engine such as
166      * Rules processing or Bpel and the processing engine allocates and manages its
167      * own threads.
168      *
169      * @param singleton true if this component is a singleton
170      */

171     void setSingleton(boolean singleton);
172
173     /**
174      * Sets the initial state of this component
175      *
176      * @param state the initial state of this component
177      */

178     void setInitialState(String JavaDoc state);
179
180     void setEncoding(String JavaDoc encoding);
181
182     /**
183      * Sets the name of the contaier where the object for this descriptor resides. If
184      * this value is 'none' the 'implementaiton' attributed is expected to be a fully
185      * qualified class name that will be instanciated.
186      *
187      * @param containerName the container name, or null if it is not known - in which
188      * case each container will be queried for the component
189      * implementation.
190      */

191     void setContainer(String JavaDoc containerName);
192 }
193
Popular Tags