1 17 package org.apache.servicemix.http; 18 19 import org.apache.servicemix.common.BaseComponent; 20 import org.apache.servicemix.common.Endpoint; 21 import org.apache.servicemix.common.xbean.AbstractXBeanDeployer; 22 23 import javax.jbi.management.DeploymentException; 24 25 public class HttpXBeanDeployer extends AbstractXBeanDeployer { 26 27 public HttpXBeanDeployer(BaseComponent component) { 28 super(component); 29 } 30 31 protected boolean validate(Endpoint endpoint) throws DeploymentException { 32 if (endpoint instanceof HttpEndpoint == false) { 33 throw failure("deploy", "Endpoint should be a Http endpoint", null); 34 } 35 HttpEndpoint ep = (HttpEndpoint) endpoint; 36 if (ep.getRole() == null) { 37 throw failure("deploy", "Endpoint must have a defined role", null); 38 } 39 if (ep.getLocationURI() == null) { 40 throw failure("deploy", "Endpoint must have a defined locationURI", null); 41 } 42 return true; 43 } 44 45 46 } 47 | Popular Tags |