Skip to content

Commit 9b452ea

Browse files
committed
rename package for dubbo3 service model
1 parent 16df936 commit 9b452ea

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package com.alipay.sofa.koupleless.trigger.dubbo;
17+
package com.alipay.sofa.koupleless.dubbo;
1818

1919
import org.apache.dubbo.rpc.model.ApplicationModel;
2020
import org.apache.dubbo.rpc.model.FrameworkModel;
@@ -41,4 +41,4 @@ public void initializeApplicationModel(ApplicationModel applicationModel) {
4141
public void initializeModuleModel(ModuleModel moduleModel) {
4242
moduleModel.addClassLoader(Thread.currentThread().getContextClassLoader());
4343
}
44-
}
44+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package com.alipay.sofa.koupleless.trigger.dubbo;
17+
package com.alipay.sofa.koupleless.dubbo;
1818

1919
import org.apache.dubbo.config.ServiceConfig;
2020

@@ -31,4 +31,4 @@ public static String parseDubboProtocol(ServiceConfig sc) {
3131
public static String buildServiceIdentifier(ServiceConfig sc) {
3232
return parseDubboProtocol(sc) + ":" + sc.getServiceMetadata().getServiceKey();
3333
}
34-
}
34+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package com.alipay.sofa.koupleless.trigger.dubbo.service;
17+
package com.alipay.sofa.koupleless.dubbo.service;
1818

1919
import com.alipay.sofa.koupleless.common.service.AbstractServiceComponent;
2020
import com.alipay.sofa.koupleless.common.service.ServiceState;
2121
import lombok.Builder;
2222

23-
import static com.alipay.sofa.koupleless.trigger.dubbo.service.KouplelessDubboServiceConstants.PROTOCOL;
23+
import static com.alipay.sofa.koupleless.dubbo.service.KouplelessDubboServiceConstants.PROTOCOL;
2424

2525
/**
2626
* @author lianglipeng.llp@alibaba-inc.com
@@ -41,4 +41,4 @@ public DubboServiceComponent(String dubboProtocol, String identifier, Object bea
4141
public String getDubboProtocol() {
4242
return dubboProtocol;
4343
}
44-
}
44+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package com.alipay.sofa.koupleless.trigger.dubbo.service;
17+
package com.alipay.sofa.koupleless.dubbo.service;
1818

1919
/**
2020
* @author lianglipeng.llp@alibaba-inc.com
2121
* @version $Id: KouplelessServiceConstants.java, v 0.1 2024年05月20日 14:23 立蓬 Exp $
2222
*/
2323
public class KouplelessDubboServiceConstants {
2424
public static final String PROTOCOL = "dubbo";
25-
}
25+
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package com.alipay.sofa.koupleless.trigger.dubbo.service;
17+
package com.alipay.sofa.koupleless.dubbo.service;
1818

1919
import com.alipay.sofa.koupleless.common.BizRuntimeContext;
2020
import com.alipay.sofa.koupleless.common.BizRuntimeContextRegistry;
2121
import com.alipay.sofa.koupleless.common.exception.BizRuntimeException;
2222
import com.alipay.sofa.koupleless.common.service.AbstractServiceComponent;
2323
import com.alipay.sofa.koupleless.common.service.ServiceState;
24+
import com.alipay.sofa.koupleless.dubbo.KouplelessDubboUtils;
2425
import org.apache.dubbo.config.ServiceConfig;
2526
import org.apache.dubbo.config.ServiceListener;
2627
import org.apache.dubbo.rpc.model.ServiceMetadata;
2728

2829
import static com.alipay.sofa.koupleless.common.exception.ErrorCodes.ServiceManager.E200001;
2930
import static com.alipay.sofa.koupleless.common.exception.ErrorCodes.SpringContextManager.E100002;
30-
import static com.alipay.sofa.koupleless.trigger.dubbo.service.KouplelessDubboServiceConstants.PROTOCOL;
31-
import static com.alipay.sofa.koupleless.trigger.dubbo.KouplelessDubboUtils.buildServiceIdentifier;
32-
import static com.alipay.sofa.koupleless.trigger.dubbo.KouplelessDubboUtils.parseDubboProtocol;
31+
import static com.alipay.sofa.koupleless.dubbo.service.KouplelessDubboServiceConstants.PROTOCOL;
3332

3433
/**
3534
* @author lianglipeng.llp@alibaba-inc.com
@@ -48,7 +47,8 @@ public void exported(ServiceConfig sc) {
4847
ServiceMetadata serviceMetadata = sc.getServiceMetadata();
4948
Object target = serviceMetadata.getTarget();
5049
DubboServiceComponent dubboServiceComponent = DubboServiceComponent.builder()
51-
.dubboProtocol(parseDubboProtocol(sc)).identifier(buildServiceIdentifier(sc))
50+
.dubboProtocol(KouplelessDubboUtils.parseDubboProtocol(sc)).identifier(
51+
KouplelessDubboUtils.buildServiceIdentifier(sc))
5252
.bean(target).beanClass(target.getClass())
5353
.interfaceType(serviceMetadata.getServiceType()).metaData(serviceMetadata)
5454
.state(ServiceState.EXPORTED).build();
@@ -63,12 +63,12 @@ public void unexported(ServiceConfig sc) {
6363
throw new BizRuntimeException(E100002, "biz runtime context is null");
6464
}
6565
AbstractServiceComponent component = bizRuntimeContext.getServiceComponent(PROTOCOL,
66-
buildServiceIdentifier(sc));
66+
KouplelessDubboUtils.buildServiceIdentifier(sc));
6767
if (component == null) {
6868
throw new BizRuntimeException(E200001,
69-
"service not found:" + buildServiceIdentifier(sc));
69+
"service not found:" + KouplelessDubboUtils.buildServiceIdentifier(sc));
7070
}
7171
component.setServiceState(ServiceState.UNEXPORTED);
7272
bizRuntimeContext.unregisterService(component);
7373
}
74-
}
74+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
classloaderScopeModelInitializer=com.alipay.sofa.koupleless.trigger.dubbo.ClassloaderScopeModelInitializer
1+
classloaderScopeModelInitializer=com.alipay.sofa.koupleless.dubbo.ClassloaderScopeModelInitializer
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
kouplelessServiceListener=com.alipay.sofa.koupleless.trigger.dubbo.service.KouplelessDubboServiceListener
1+
kouplelessServiceListener=com.alipay.sofa.koupleless.dubbo.service.KouplelessDubboServiceListener

0 commit comments

Comments
 (0)