@Default注解改回@Extension注解
- @Extension可以用于标示Dubbo扩展接口,区分一般的接口 git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@986 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
dd1dd54a52
commit
c1222ed38c
|
|
@ -16,7 +16,7 @@
|
|||
package com.alibaba.dubbo.rpc.cluster;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.rpc.Invoker;
|
||||
import com.alibaba.dubbo.rpc.RpcException;
|
||||
import com.alibaba.dubbo.rpc.cluster.support.FailoverCluster;
|
||||
|
|
@ -29,7 +29,7 @@ import com.alibaba.dubbo.rpc.cluster.support.FailoverCluster;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default(FailoverCluster.NAME)
|
||||
@Extension(FailoverCluster.NAME)
|
||||
public interface Cluster {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc.cluster;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.rpc.Invocation;
|
||||
import com.alibaba.dubbo.rpc.Invoker;
|
||||
import com.alibaba.dubbo.rpc.RpcException;
|
||||
import com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.rpc.Invocation;
|
||||
import com.alibaba.dubbo.rpc.Invoker;
|
||||
import com.alibaba.dubbo.rpc.RpcException;
|
||||
import com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance;
|
||||
|
||||
/**
|
||||
* LoadBalance. (SPI, Singleton, ThreadSafe)
|
||||
|
|
@ -32,7 +32,7 @@ import com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance;
|
|||
* @author qian.lei
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default(RandomLoadBalance.NAME)
|
||||
@Extension(RandomLoadBalance.NAME)
|
||||
public interface LoadBalance {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,9 +15,12 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc.cluster;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
|
||||
*/
|
||||
@Extension
|
||||
public interface Merger<T> {
|
||||
|
||||
T merge(T... items);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
package com.alibaba.dubbo.rpc.cluster;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.rpc.Invocation;
|
||||
|
||||
|
|
@ -27,7 +28,8 @@ import com.alibaba.dubbo.rpc.Invocation;
|
|||
* @see com.alibaba.dubbo.rpc.cluster.Cluster#join(Directory)
|
||||
* @see com.alibaba.dubbo.rpc.cluster.Directory#list(Invocation)
|
||||
* @author chao.liuc
|
||||
*/
|
||||
*/
|
||||
@Extension
|
||||
public interface RouterFactory {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import java.lang.annotation.Target;
|
|||
*
|
||||
* @see ExtensionLoader
|
||||
* @see URL
|
||||
* @see Default
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
@ -38,7 +37,7 @@ public @interface Adaptive {
|
|||
/**
|
||||
* 从{@link URL}的Key名,对应的Value作为要Adapt成的Extension名。
|
||||
* <p>
|
||||
* 如果{@link URL}这些Key都没有Value,使用 用 缺省的扩展(在接口的{@link Default}中设定的值)。<br>
|
||||
* 如果{@link URL}这些Key都没有Value,使用 用 缺省的扩展(在接口的{@link Extension}中设定的值)。<br>
|
||||
* 比如,<code>String[] {"key1", "key2"}</code>,表示
|
||||
* <ol>
|
||||
* <li>先在URL上找key1的Value作为要Adapt成的Extension名;
|
||||
|
|
@ -50,7 +49,7 @@ public @interface Adaptive {
|
|||
* 如果不设置则缺省使用Extension接口类名的点分隔小写字串。<br>
|
||||
* 即对于Extension接口{@code com.alibaba.dubbo.xxx.YyyInvokerWrapper}的缺省值为<code>String[] {"yyy.invoker.wrapper"}</code>
|
||||
*
|
||||
* @see Default#value()
|
||||
* @see Extension#value()
|
||||
*/
|
||||
String[] value() default {};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright 1999-2011 Alibaba Group.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.dubbo.common;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 扩展点缺省值声明
|
||||
*
|
||||
* @author william.liangf
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface Default {
|
||||
|
||||
/**
|
||||
* 扩展点缺省值
|
||||
*/
|
||||
String value();
|
||||
|
||||
}
|
||||
|
|
@ -22,23 +22,18 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 扩展点实现的元信息。
|
||||
*
|
||||
* @deprecated 请在META-INF/services/配置文件中声明扩展点名称,如:fixed=com.xxx.FixedThreadPool
|
||||
* 扩展点接口的标识。
|
||||
*
|
||||
* @author william.liangf
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface Extension {
|
||||
|
||||
/**
|
||||
* 扩展点名称。<br>
|
||||
*
|
||||
* 如果注解在扩展的接口上,则缺省的扩展点。<p>
|
||||
* 缺省扩展点名。
|
||||
*/
|
||||
String value() default "";
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ import com.alibaba.dubbo.common.utils.StringUtils;
|
|||
* @author william.liangf
|
||||
* @author ding.lid
|
||||
*
|
||||
* @see Default
|
||||
* @see Adaptive
|
||||
*/
|
||||
public class ExtensionLoader<T> {
|
||||
|
|
@ -287,7 +286,7 @@ public class ExtensionLoader<T> {
|
|||
}
|
||||
|
||||
private Map<String, Class<?>> loadExtensionClasses() {
|
||||
final Default defaultAnnotation = type.getAnnotation(Default.class);
|
||||
final Extension defaultAnnotation = type.getAnnotation(Extension.class);
|
||||
if(defaultAnnotation != null) {
|
||||
String[] names = NAME_SEPARATOR.split(defaultAnnotation.value());
|
||||
if(names.length > 1) {
|
||||
|
|
@ -399,7 +398,6 @@ public class ExtensionLoader<T> {
|
|||
return extensionClasses;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private String findAnnotationName(Class<?> clazz) {
|
||||
Extension extension = clazz.getAnnotation(Extension.class);
|
||||
return extension == null ? null : extension.value();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -29,7 +29,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
* @author ding.lid
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("hessian2")
|
||||
@Extension("hessian2")
|
||||
public interface Serialization {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,11 +15,14 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.common.status;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
/**
|
||||
* StatusChecker
|
||||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface StatusChecker {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import java.util.concurrent.Executor;
|
|||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +27,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("fixed")
|
||||
@Extension("fixed")
|
||||
public interface ThreadPool {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.common.extensionloader.ext1;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Default("impl1")
|
||||
@Extension("impl1")
|
||||
public interface Ext1 {
|
||||
@Adaptive
|
||||
String echo(URL url, String s);
|
||||
|
|
|
|||
|
|
@ -16,13 +16,15 @@
|
|||
package com.alibaba.dubbo.common.extensionloader.ext2;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* 无Default
|
||||
*
|
||||
* @author ding.lid
|
||||
*/
|
||||
*/
|
||||
@Extension
|
||||
public interface Ext2 {
|
||||
@Adaptive
|
||||
String echo(UrlHolder holder, String s);
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.common.extensionloader.ext3;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Default("impl3")
|
||||
@Extension("impl3")
|
||||
public interface Ext3 {
|
||||
@Adaptive({"key1", "protocol"})
|
||||
String echo(URL url, String s);
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.common.extensionloader.ext4;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
/**
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Default("impl1")
|
||||
@Extension("impl1")
|
||||
public interface Ext4 {
|
||||
@Adaptive
|
||||
String bark(String name, List<Object> list); // 没有URL参数的方法
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.common.extensionloader.ext5;
|
||||
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Default("impl1")
|
||||
@Extension("impl1")
|
||||
public interface Ext5NoAdaptiveMethod {
|
||||
String echo(URL url, String s);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,15 @@
|
|||
package com.alibaba.dubbo.common.extensionloader.ext6_inject;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* 无Default
|
||||
*
|
||||
* @author ding.lid
|
||||
*/
|
||||
*/
|
||||
@Extension
|
||||
public interface Ext6 {
|
||||
@Adaptive
|
||||
String echo(URL url, String s);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
package com.alibaba.dubbo.common.extensionloader.ext7;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -24,6 +25,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author ding.lid
|
||||
*/
|
||||
@Extension
|
||||
public interface Ext7 {
|
||||
@Adaptive
|
||||
String echo(URL url, String s);
|
||||
|
|
|
|||
|
|
@ -15,14 +15,13 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.config.support;
|
||||
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.rpc.Exporter;
|
||||
import com.alibaba.dubbo.rpc.Invocation;
|
||||
import com.alibaba.dubbo.rpc.Invoker;
|
||||
import com.alibaba.dubbo.rpc.Protocol;
|
||||
import com.alibaba.dubbo.rpc.Result;
|
||||
import com.alibaba.dubbo.rpc.RpcException;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.rpc.Exporter;
|
||||
import com.alibaba.dubbo.rpc.Invocation;
|
||||
import com.alibaba.dubbo.rpc.Invoker;
|
||||
import com.alibaba.dubbo.rpc.Protocol;
|
||||
import com.alibaba.dubbo.rpc.Result;
|
||||
import com.alibaba.dubbo.rpc.RpcException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.container;
|
||||
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
/**
|
||||
* Container. (SPI, Singleton, ThreadSafe)
|
||||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("spring")
|
||||
@Extension("spring")
|
||||
public interface Container {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.container.page;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -22,6 +23,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface PageHandler {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package com.alibaba.dubbo.monitor;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -24,7 +24,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("dubbo")
|
||||
@Extension("dubbo")
|
||||
public interface MonitorFactory {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package com.alibaba.dubbo.registry;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +27,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
* @see com.alibaba.dubbo.registry.support.AbstractRegistryFactory
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("dubbo")
|
||||
@Extension("dubbo")
|
||||
public interface RegistryFactory {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package com.alibaba.dubbo.remoting.http;
|
|||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -25,7 +25,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("jetty")
|
||||
@Extension("jetty")
|
||||
public interface HttpBinder {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.remoting.p2p;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.remoting.RemotingException;
|
||||
|
||||
|
|
@ -25,6 +26,7 @@ import com.alibaba.dubbo.remoting.RemotingException;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface Networker {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.remoting.p2p.exchange.support;
|
||||
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.remoting.RemotingException;
|
||||
import com.alibaba.dubbo.remoting.p2p.exchange.ExchangeGroup;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.dubbo.remoting;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -23,7 +25,8 @@ package com.alibaba.dubbo.remoting;
|
|||
* @see com.alibaba.dubbo.remoting.Transporter#connect(com.alibaba.dubbo.common.URL, ChannelHandler)
|
||||
* @author qian.lei
|
||||
* @author william.liangf
|
||||
*/
|
||||
*/
|
||||
@Extension
|
||||
public interface ChannelHandler {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,18 +15,18 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.remoting;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.remoting.transport.handler.DefaultChannelHandlerWrapper;
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.remoting.transport.handler.DefaultChannelHandlerWrapper;
|
||||
|
||||
/**
|
||||
* ChannelHandlerWrapper (SPI, Singleton, ThreadSafe)
|
||||
*
|
||||
* @author chao.liuc
|
||||
*/
|
||||
@Default(DefaultChannelHandlerWrapper.NAME)
|
||||
@Extension(DefaultChannelHandlerWrapper.NAME)
|
||||
public interface ChannelHandlerWrapper {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.io.OutputStream;
|
|||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
/**
|
||||
* Codec. (SPI, Singleton, ThreadSafe)
|
||||
|
|
@ -29,6 +30,7 @@ import com.alibaba.dubbo.common.Constants;
|
|||
* @author ding.lid
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface Codec {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,10 +15,12 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.remoting;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import javax.sound.midi.Receiver;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* Transporter. (SPI, Singleton, ThreadSafe)
|
||||
|
|
@ -30,7 +32,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
* @author ding.lid
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("netty")
|
||||
@Extension("netty")
|
||||
public interface Transporter {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package com.alibaba.dubbo.remoting.exchange;
|
|||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.remoting.RemotingException;
|
||||
import com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger;
|
||||
|
|
@ -30,7 +30,7 @@ import com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default(HeaderExchanger.NAME)
|
||||
@Extension(HeaderExchanger.NAME)
|
||||
public interface Exchanger {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.remoting.telnet;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.remoting.Channel;
|
||||
import com.alibaba.dubbo.remoting.RemotingException;
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ import com.alibaba.dubbo.remoting.RemotingException;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface TelnetHandler {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,12 +15,15 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
|
||||
|
||||
/**
|
||||
* Filter. (SPI, Singleton, ThreadSafe)
|
||||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface Filter {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc;
|
||||
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
|
|
@ -22,6 +23,7 @@ import com.alibaba.dubbo.common.URL;
|
|||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Extension
|
||||
public interface InvokerListener {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* Protocol. (SPI, Singleton, ThreadSafe)
|
||||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("dubbo")
|
||||
@Extension("dubbo")
|
||||
public interface Protocol {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,17 +15,17 @@
|
|||
*/
|
||||
package com.alibaba.dubbo.rpc;
|
||||
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Default;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
import com.alibaba.dubbo.common.Adaptive;
|
||||
import com.alibaba.dubbo.common.Constants;
|
||||
import com.alibaba.dubbo.common.Extension;
|
||||
import com.alibaba.dubbo.common.URL;
|
||||
|
||||
/**
|
||||
* ProxyFactory. (SPI, Singleton, ThreadSafe)
|
||||
*
|
||||
* @author william.liangf
|
||||
*/
|
||||
@Default("javassist")
|
||||
@Extension("javassist")
|
||||
public interface ProxyFactory {
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue