use of com.alipay.sofa.service.api.component.ExtensionPoint in project sofa-boot by alipay.
the class ExtensionClientImpl method publishExtensionPoint.
@Override
public void publishExtensionPoint(ExtensionPointParam extensionPointParam) {
Assert.notNull(extensionPointParam, "extensionPointParam can not be null.");
Assert.notNull(extensionPointParam.getName(), "Extension point name can not be null.");
Assert.notNull(extensionPointParam.getContributionClass(), "Extension point contribution can not be null.");
Assert.notNull(extensionPointParam.getTarget(), "Extension point target can not be null.");
ExtensionPoint extensionPoint = new ExtensionPointImpl(extensionPointParam.getName(), extensionPointParam.getContributionClass());
Implementation implementation = new DefaultImplementation(extensionPointParam.getTargetName());
implementation.setTarget(extensionPointParam.getTarget());
ComponentInfo extensionPointComponent = new ExtensionPointComponent(extensionPoint, sofaRuntimeContext, implementation);
sofaRuntimeContext.getComponentManager().register(extensionPointComponent);
}
use of com.alipay.sofa.service.api.component.ExtensionPoint in project sofa-boot by sofastack.
the class ExtensionClientImpl method publishExtensionPoint.
@Override
public void publishExtensionPoint(ExtensionPointParam extensionPointParam) {
Assert.notNull(extensionPointParam, "extensionPointParam can not be null.");
Assert.notNull(extensionPointParam.getName(), "Extension point name can not be null.");
Assert.notNull(extensionPointParam.getContributionClass(), "Extension point contribution can not be null.");
Assert.notNull(extensionPointParam.getTarget(), "Extension point target can not be null.");
ExtensionPoint extensionPoint = new ExtensionPointImpl(extensionPointParam.getName(), extensionPointParam.getContributionClass());
Implementation implementation = new DefaultImplementation(extensionPointParam.getTargetName());
implementation.setTarget(extensionPointParam.getTarget());
ComponentInfo extensionPointComponent = new ExtensionPointComponent(extensionPoint, sofaRuntimeContext, implementation);
sofaRuntimeContext.getComponentManager().register(extensionPointComponent);
}
Aggregations