KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > jbi > serviceengine > core > JavaEEServiceEngine


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.jbi.serviceengine.core;
24
25 import javax.jbi.component.*;
26 import javax.jbi.servicedesc.ServiceEndpoint;
27 import org.w3c.dom.Document JavaDoc;
28
29 /**
30  * Represents JSR 208 compliant service engine which provides beidge beteween
31  * SJS AS containers and JBI environment.
32  * @author Manisha Umbarje
33  */

34         
35 public class JavaEEServiceEngine implements Component {
36   
37     JavaEEServiceEngineLifeCycle lifeCycle = null;
38     public JavaEEServiceEngine() {
39     }
40     /**
41      * Get the required life cycle control implementation for this component.
42      * @return the life cycle control implementation for this component.
43      */

44     public ComponentLifeCycle getLifeCycle(){
45         if(lifeCycle == null)
46             lifeCycle = new JavaEEServiceEngineLifeCycle();
47         return lifeCycle;
48     }
49
50     /**
51      * Get the Service Unit manager for this component. If this component
52      * does not support deployments, return <code>null</code>.
53      * @return the Service Unit manager for this component, or <code>null</code>
54      * if there is none.
55      */

56     public ServiceUnitManager getServiceUnitManager(){
57         return null;
58         
59     }
60
61     /**
62      * Retrieves a DOM representation containing metadata which describes the
63      * service provided by this component, through the given endpoint. The
64      * result can use WSDL 1.1 or WSDL 2.0.
65      * @param endpoint the endpoint to be described.
66      * @return the description for the specified endpoint.
67      */

68     public Document JavaDoc getServiceDescription(ServiceEndpoint endpoint){
69         
70         //return bridge.getServiceDescription(endpoint);
71
return null;
72     }
73     
74     /** This method is called by JBI to check if this component, in the role of
75      * provider of the service indicated by the given exchange, can actually
76      * perform the operation desired. The consumer is described by the given
77      * capabilities, and JBI has already ensured that a fit exists between the
78      * set of required capabilities of the provider and the available
79      * capabilities of the consumer, and vice versa. This matching consists of
80      * simple set matching based on capability names only. <br><br>
81      * Note that JBI assures matches on capability names only; it is the
82      * responsibility of this method to examine capability values to ensure a
83      * match with the consumer.
84      * @param endpoint the endpoint to be used by the consumer
85      * @param exchange the proposed message exchange to be performed
86      * @param consumerCapabilities the consumer?s capabilities and requirements
87      * @return true if this provider component can perform the the given
88      * exchange with the described consumer
89      */

90     public boolean isExchangeWithConsumerOkay(
91         javax.jbi.servicedesc.ServiceEndpoint endpoint,
92         javax.jbi.messaging.MessageExchange exchange)
93     {
94         return true;
95     }
96     
97     /** This method is called by JBI to check if this component, in the role of
98      * consumer of the service indicated by the given exchange, can actually
99      * interact with the the provider completely. Ths provider is described
100      * by the given capabilities, and JBI has already ensure that a fit exists
101      * between the set of required capabilities of the consumer and the
102      * available capabilities of the provider, and vice versa. This matching
103      * consists of simple set matching based on capability names only. <br><br>
104      * Note that JBI assures matches on capability names only; it is the
105      * responsibility of this method to examine capability values to ensure a
106      * match with the provider.
107      * @param exchange the proposed message exchange to be performed
108      * @param providerCapabilities the provider's capabilities and requirements
109      * @return true if this consurer component can interact with the described
110      * provider to perform the given exchange
111      */

112     public boolean isExchangeWithProviderOkay(
113         javax.jbi.servicedesc.ServiceEndpoint endpoint,
114         javax.jbi.messaging.MessageExchange exchange)
115     {
116         return true;
117     }
118     
119     public ServiceEndpoint resolveEndpointReference(
120             org.w3c.dom.DocumentFragment JavaDoc epr) {
121     return null;
122     }
123     
124 }
125
126
Popular Tags