public OsgiServiceUnit(DefaultComponent component, Endpoint endpoint, ClassLoader classLoader) throws DeploymentException { this.component = component; this.endpoint = endpoint; this.classLoader = classLoader; this.endpoint.setServiceUnit(this); this.endpoint.validate(); this.name = endpoint.getKey(); addEndpoint(this.endpoint); } public Endpoint getEndpoint() {
/** * Dynamically adds a new endpoint */ public synchronized void addEndpoint(Endpoint endpoint) throws Exception { endpoint.setServiceUnit(serviceUnit); validateEndpoint(endpoint); endpoint.validate(); registry.registerEndpoint(endpoint); serviceUnit.addEndpoint(endpoint); }
endpoint.setServiceUnit(su); validate(endpoint); su.addEndpoint(endpoint);