001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)SequencingEngineComponent.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.engine.sequencing;
030:
031: import org.w3c.dom.DocumentFragment;
032:
033: import javax.jbi.component.Component;
034: import javax.jbi.servicedesc.ServiceEndpoint;
035:
036: /**
037: * This class implements the component contract with the JBI.
038: *
039: * @author Sun Microsystems, Inc.
040: */
041: public class SequencingEngineComponent implements Component {
042: /**
043: * Lifecycle object.
044: */
045: private SequencingEngineLifeCycle mLifeCycle;
046:
047: /**
048: * SU Manager.
049: */
050: private SequencingEngineSUManager mSUManager;
051:
052: /**
053: * Creates a new instance of SequencingEngineComponent
054: */
055: public SequencingEngineComponent() {
056: mLifeCycle = new SequencingEngineLifeCycle();
057: mSUManager = new SequencingEngineSUManager();
058: mLifeCycle.setSUManager(mSUManager);
059: }
060:
061: /**
062: * This method is called by JBI to check if this component, in the role of
063: * provider of the service indicated by the given exchange, can actually
064: * perform the operation desired.
065: *
066: * @param endpoint
067: * @param exchange
068: *
069: * @return true if Ok.
070: */
071: public boolean isExchangeWithConsumerOkay(
072: javax.jbi.servicedesc.ServiceEndpoint endpoint,
073: javax.jbi.messaging.MessageExchange exchange) {
074: return true;
075: }
076:
077: /**
078: * This method is called by JBI to check if this component, in the role of
079: * consumer of the service indicated by the given exchange, can actually
080: * interact with the the provider completely.
081: *
082: * @param endpoint
083: * @param exchange
084: *
085: * @return true if OK.
086: */
087: public boolean isExchangeWithProviderOkay(
088: javax.jbi.servicedesc.ServiceEndpoint endpoint,
089: javax.jbi.messaging.MessageExchange exchange) {
090: return true;
091: }
092:
093: /**
094: * Returns the lifecycle object.
095: *
096: * @return ComponentLifecycle.
097: */
098: public javax.jbi.component.ComponentLifeCycle getLifeCycle() {
099: return mLifeCycle;
100: }
101:
102: /**
103: * Returns the service description.
104: *
105: * @param endpoint service endpoint.
106: *
107: * @return document.
108: */
109: public org.w3c.dom.Document getServiceDescription(
110: javax.jbi.servicedesc.ServiceEndpoint endpoint) {
111: return null;
112: }
113:
114: /**
115: * Returns a SU Mangaer object.
116: *
117: * @return Su Manager for SE.
118: */
119: public javax.jbi.component.ServiceUnitManager getServiceUnitManager() {
120: return mSUManager;
121: }
122:
123: /**
124: * Resolve the endpoint reference using the given capabilities of the
125: * consumer. This is called by JBI when its trying to resove the given EPR
126: * on behalf of the component.
127: *
128: * @param epr endpoint reference.
129: *
130: * @return service endpoint.
131: */
132: public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
133: return null;
134: }
135: }
|