Source Code Cross Referenced for ActivationSpec.java in  » ESB » servicemix » org » apache » servicemix » jbi » container » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » servicemix » org.apache.servicemix.jbi.container 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.servicemix.jbi.container;
018:
019:        import java.io.Serializable;
020:
021:        import javax.xml.namespace.QName;
022:
023:        import org.apache.servicemix.jbi.messaging.PojoMarshaler;
024:        import org.apache.servicemix.jbi.resolver.EndpointChooser;
025:        import org.apache.servicemix.jbi.resolver.EndpointResolver;
026:        import org.apache.servicemix.jbi.resolver.InterfaceNameEndpointResolver;
027:        import org.apache.servicemix.jbi.resolver.ServiceAndEndpointNameResolver;
028:        import org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver;
029:        import org.apache.servicemix.jbi.resolver.URIResolver;
030:
031:        /**
032:         * Represents the registration of a component with the {@link JBIContainer}
033:         * 
034:         * @org.apache.xbean.XBean element="activationSpec" description="The Component
035:         *                         configuration consisting of its container related
036:         *                         properties such as its routing information"
037:         * 
038:         * @version $Revision: 564374 $
039:         */
040:        public class ActivationSpec implements  Serializable {
041:
042:            static final long serialVersionUID = 8458586342841647313L;
043:
044:            private String id;
045:            private String componentName;
046:            private Object component;
047:            private QName service;
048:            private QName interfaceName;
049:            private QName operation;
050:            private String endpoint;
051:            private transient EndpointResolver destinationResolver;
052:            private transient EndpointChooser interfaceChooser;
053:            private transient EndpointChooser serviceChooser;
054:            private QName destinationService;
055:            private QName destinationInterface;
056:            private QName destinationOperation;
057:            private String destinationEndpoint;
058:            private transient PojoMarshaler marshaler;
059:            private SubscriptionSpec[] subscriptions = {};
060:            private boolean failIfNoDestinationEndpoint = true;
061:            private Boolean persistent;
062:            private String destinationUri;
063:
064:            public ActivationSpec() {
065:            }
066:
067:            public ActivationSpec(Object component) {
068:                this .component = component;
069:            }
070:
071:            public ActivationSpec(String id, Object component) {
072:                this .id = id;
073:                this .component = component;
074:            }
075:
076:            /**
077:             * The unique component ID
078:             * 
079:             * @return the unique ID
080:             */
081:            public String getId() {
082:                return id;
083:            }
084:
085:            /**
086:             * Sets the unique component ID
087:             * 
088:             * @param id
089:             */
090:            public void setId(String id) {
091:                this .id = id;
092:            }
093:
094:            public String getComponentName() {
095:                return componentName;
096:            }
097:
098:            public void setComponentName(String componentName) {
099:                this .componentName = componentName;
100:            }
101:
102:            /**
103:             * @org.apache.xbean.Property
104:             * @return
105:             */
106:            public Object getComponent() {
107:                return component;
108:            }
109:
110:            public void setComponent(Object component) {
111:                this .component = component;
112:            }
113:
114:            /**
115:             * Returns the service of the component to register
116:             */
117:            public QName getService() {
118:                return service;
119:            }
120:
121:            public void setService(QName service) {
122:                this .service = service;
123:            }
124:
125:            /**
126:             * Returns the endpoint name of this component
127:             */
128:            public String getEndpoint() {
129:                return endpoint;
130:            }
131:
132:            public void setEndpoint(String endpoint) {
133:                this .endpoint = endpoint;
134:            }
135:
136:            public QName getInterfaceName() {
137:                return interfaceName;
138:            }
139:
140:            public void setInterfaceName(QName interfaceName) {
141:                this .interfaceName = interfaceName;
142:            }
143:
144:            public QName getOperation() {
145:                return operation;
146:            }
147:
148:            public void setOperation(QName operation) {
149:                this .operation = operation;
150:            }
151:
152:            /**
153:             * Returns the destination resolver used to decide which destination the
154:             * container should route this component to.
155:             * 
156:             * @return the destination resolver, lazily creating one if possible
157:             */
158:            public EndpointResolver getDestinationResolver() {
159:                if (destinationResolver == null) {
160:                    destinationResolver = createEndpointResolver();
161:                }
162:                return destinationResolver;
163:            }
164:
165:            /**
166:             * Sets the destination resolver used by the container to route requests
167:             * send on the default endpoint.
168:             * 
169:             * @param destinationResolver
170:             */
171:            public void setDestinationResolver(
172:                    EndpointResolver destinationResolver) {
173:                this .destinationResolver = destinationResolver;
174:            }
175:
176:            public EndpointChooser getInterfaceChooser() {
177:                return interfaceChooser;
178:            }
179:
180:            public void setInterfaceChooser(EndpointChooser interfaceChooser) {
181:                this .interfaceChooser = interfaceChooser;
182:            }
183:
184:            public EndpointChooser getServiceChooser() {
185:                return serviceChooser;
186:            }
187:
188:            public void setServiceChooser(EndpointChooser serviceChooser) {
189:                this .serviceChooser = serviceChooser;
190:            }
191:
192:            /**
193:             * The destination service name
194:             */
195:            public QName getDestinationService() {
196:                return destinationService;
197:            }
198:
199:            public void setDestinationService(QName destinationService) {
200:                this .destinationService = destinationService;
201:            }
202:
203:            /**
204:             * The destination interface
205:             */
206:            public QName getDestinationInterface() {
207:                return destinationInterface;
208:            }
209:
210:            public void setDestinationInterface(QName destinationInterface) {
211:                this .destinationInterface = destinationInterface;
212:            }
213:
214:            /**
215:             * The destination operation name
216:             */
217:            public QName getDestinationOperation() {
218:                return destinationOperation;
219:            }
220:
221:            public void setDestinationOperation(QName destinationOperation) {
222:                this .destinationOperation = destinationOperation;
223:            }
224:
225:            /**
226:             * The destination endpoint
227:             */
228:            public String getDestinationEndpoint() {
229:                return destinationEndpoint;
230:            }
231:
232:            public void setDestinationEndpoint(String destinationEndpoint) {
233:                this .destinationEndpoint = destinationEndpoint;
234:            }
235:
236:            public PojoMarshaler getMarshaler() {
237:                return marshaler;
238:            }
239:
240:            public void setMarshaler(PojoMarshaler marshaler) {
241:                this .marshaler = marshaler;
242:            }
243:
244:            public SubscriptionSpec[] getSubscriptions() {
245:                return subscriptions;
246:            }
247:
248:            public void setSubscriptions(SubscriptionSpec[] subscriptions) {
249:                this .subscriptions = subscriptions;
250:            }
251:
252:            public boolean isFailIfNoDestinationEndpoint() {
253:                return failIfNoDestinationEndpoint;
254:            }
255:
256:            /**
257:             * Sets whether or not there should be a failure if there is no matching
258:             * endpoint for the service dispatch. It may be in a pure publish/subscribe
259:             * model you want all available subscribes to receive the message but do not
260:             * mind if there is not a single destination endpoint that can be found.
261:             * 
262:             * @param failIfNoDestinationEndpoint
263:             */
264:            public void setFailIfNoDestinationEndpoint(
265:                    boolean failIfNoDestinationEndpoint) {
266:                this .failIfNoDestinationEndpoint = failIfNoDestinationEndpoint;
267:            }
268:
269:            /**
270:             * Lazily create a resolver from the available information
271:             */
272:            protected EndpointResolver createEndpointResolver() {
273:                // lets construct a resolver if any of the output
274:                if (destinationService != null) {
275:                    if (destinationEndpoint != null) {
276:                        return new ServiceAndEndpointNameResolver(
277:                                destinationService, destinationEndpoint);
278:                    } else {
279:                        return new ServiceNameEndpointResolver(
280:                                destinationService);
281:                    }
282:                } else if (destinationInterface != null) {
283:                    return new InterfaceNameEndpointResolver(
284:                            destinationInterface);
285:                } else if (destinationUri != null) {
286:                    return new URIResolver(destinationUri);
287:                }
288:                return null;
289:            }
290:
291:            public Boolean getPersistent() {
292:                return persistent;
293:            }
294:
295:            /**
296:             * Set if message exchanges issued by the component should be persistent or
297:             * not. This value will override the default one given on the
298:             * {@link org.apache.servicemix.jbi.container.JBIContainer#persistent}
299:             * attribute.
300:             * 
301:             * @param persistent
302:             *            the new value to set
303:             */
304:            public void setPersistent(Boolean persistent) {
305:                this .persistent = persistent;
306:            }
307:
308:            /**
309:             * @return the destinationUri
310:             */
311:            public String getDestinationUri() {
312:                return destinationUri;
313:            }
314:
315:            /**
316:             * @param destinationUri
317:             *            the destinationUri to set
318:             */
319:            public void setDestinationUri(String destinationUri) {
320:                this.destinationUri = destinationUri;
321:            }
322:
323:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.