KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > jbi > installation > Component2


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.servicemix.jbi.installation;
18
19 import org.w3c.dom.Document JavaDoc;
20 import org.w3c.dom.DocumentFragment JavaDoc;
21
22 import javax.jbi.component.Component;
23 import javax.jbi.component.ComponentLifeCycle;
24 import javax.jbi.component.ServiceUnitManager;
25 import javax.jbi.messaging.MessageExchange;
26 import javax.jbi.servicedesc.ServiceEndpoint;
27
28 public class Component2 implements Component {
29
30     private static Component delegate;
31
32     /* (non-Javadoc)
33      * @see javax.jbi.component.Component#getLifeCycle()
34      */

35     public ComponentLifeCycle getLifeCycle() {
36         return delegate.getLifeCycle();
37     }
38
39     /* (non-Javadoc)
40      * @see javax.jbi.component.Component#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)
41      */

42     public Document JavaDoc getServiceDescription(ServiceEndpoint endpoint) {
43         return delegate.getServiceDescription(endpoint);
44     }
45
46     /* (non-Javadoc)
47      * @see javax.jbi.component.Component#getServiceUnitManager()
48      */

49     public ServiceUnitManager getServiceUnitManager() {
50         return delegate.getServiceUnitManager();
51     }
52
53     /* (non-Javadoc)
54      * @see javax.jbi.component.Component#isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
55      */

56     public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange) {
57         return delegate.isExchangeWithConsumerOkay(endpoint, exchange);
58     }
59
60     /* (non-Javadoc)
61      * @see javax.jbi.component.Component#isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
62      */

63     public boolean isExchangeWithProviderOkay(ServiceEndpoint endpoint, MessageExchange exchange) {
64         return delegate.isExchangeWithProviderOkay(endpoint, exchange);
65     }
66
67     /* (non-Javadoc)
68      * @see javax.jbi.component.Component#resolveEndpointReference(org.w3c.dom.DocumentFragment)
69      */

70     public ServiceEndpoint resolveEndpointReference(DocumentFragment JavaDoc epr) {
71         return delegate.resolveEndpointReference(epr);
72     }
73
74     /**
75      * @return Returns the delegate.
76      */

77     public static Component getDelegate() {
78         return delegate;
79     }
80
81     /**
82      * @param delegate The delegate to set.
83      */

84     public static void setDelegate(Component delegate) {
85         Component2.delegate = delegate;
86     }
87
88 }
89
Popular Tags