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.cxfse;
018
019 import java.util.List;
020
021 import org.apache.cxf.Bus;
022 import org.apache.cxf.BusFactory;
023 import org.apache.servicemix.common.DefaultComponent;
024
025 /**
026 *
027 * @author gnodet
028 * @org.apache.xbean.XBean element="component"
029 */
030 public class CxfSeComponent extends DefaultComponent {
031
032 public static final String JBI_TRANSPORT_ID = "http://cxf.apache.org/transports/jbi";
033
034 private CxfSeEndpoint[] endpoints;
035 private Bus bus;
036
037 /**
038 * @return the endpoints
039 */
040 public CxfSeEndpoint[] getEndpoints() {
041 return endpoints;
042 }
043
044 /**
045 * @param endpoints the endpoints to set
046 */
047 public void setEndpoints(CxfSeEndpoint[] endpoints) {
048 this.endpoints = endpoints;
049 }
050
051 @Override
052 protected List getConfiguredEndpoints() {
053 return asList(endpoints);
054 }
055
056 @Override
057 protected Class[] getEndpointClasses() {
058 return new Class[] {CxfSeEndpoint.class };
059 }
060
061 @Override
062 protected void doInit() throws Exception {
063 bus = BusFactory.getDefaultBus();
064 super.doInit();
065 }
066
067 public Bus getBus() {
068 return bus;
069 }
070
071 }