本文整理了Java中com.alipay.sofa.rpc.ext.Extension
类的一些代码示例,展示了Extension
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension
类的具体详情如下:
包路径:com.alipay.sofa.rpc.ext.Extension
类名称:Extension
暂无
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("h2c")
public class Http2ClearTextServer extends AbstractHttpServer {
public Http2ClearTextServer() {
super("h2c");
}
}
代码示例来源:origin: alipay/sofa-rpc
private ExtensionClass<T> buildClass(Extension extension, Class<? extends T> implClass, String alias) {
ExtensionClass<T> extensionClass = new ExtensionClass<T>(implClass, alias);
extensionClass.setCode(extension.code());
extensionClass.setSingleton(extensible.singleton());
extensionClass.setOrder(extension.order());
extensionClass.setOverride(extension.override());
extensionClass.setRejection(extension.rejection());
return extensionClass;
}
代码示例来源:origin: alipay/sofa-rpc
" from file:" + url + ", " + className + " must add annotation @Extension.");
} else {
String aliasInCode = extension.value();
if (StringUtils.isBlank(aliasInCode)) {
if (extensible.coded() && extension.code() < 0) {
throw new IllegalArgumentException("Error when load extension of extensible " + interfaceName +
" from file:" + url + ", code of @Extension must >=0 at " + className + ".");
if (old != null) {
if (extension.override()) {
if (extension.order() < old.getOrder()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Extension of extensible {} with alias {} override from {} to {} failure, " +
if (old.isOverride() && old.getOrder() >= extension.order()) {
代码示例来源:origin: alipay/sofa-rpc
private ExtensionClass<T> buildClass(Extension extension, Class<? extends T> implClass, String alias) {
ExtensionClass<T> extensionClass = new ExtensionClass<T>(implClass, alias);
extensionClass.setCode(extension.code());
extensionClass.setSingleton(extensible.singleton());
extensionClass.setOrder(extension.order());
extensionClass.setOverride(extension.override());
extensionClass.setRejection(extension.rejection());
return extensionClass;
}
代码示例来源:origin: alipay/sofa-rpc
" from file:" + url + ", " + className + " must add annotation @Extension.");
} else {
String aliasInCode = extension.value();
if (StringUtils.isBlank(aliasInCode)) {
if (extensible.coded() && extension.code() < 0) {
throw new IllegalArgumentException("Error when load extension of extensible " + interfaceName +
" from file:" + url + ", code of @Extension must >=0 at " + className + ".");
if (old != null) {
if (extension.override()) {
if (extension.order() < old.getOrder()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Extension of extensible {} with alias {} override from {} to {} failure, " +
if (old.isOverride() && old.getOrder() >= extension.order()) {
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("h2c")
public class Http2ClearTextServer extends AbstractHttpServer {
public Http2ClearTextServer() {
super("h2c");
}
}
代码示例来源:origin: com.alipay.sofa/sofa-rpc-all
private ExtensionClass<T> buildClass(Extension extension, Class<? extends T> implClass, String alias) {
ExtensionClass<T> extensionClass = new ExtensionClass<T>(implClass, alias);
extensionClass.setCode(extension.code());
extensionClass.setSingleton(extensible.singleton());
extensionClass.setOrder(extension.order());
extensionClass.setOverride(extension.override());
extensionClass.setRejection(extension.rejection());
return extensionClass;
}
代码示例来源:origin: com.alipay.sofa/sofa-rpc-all
" from file:" + url + ", " + className + " must add annotation @Extension.");
} else {
String aliasInCode = extension.value();
if (StringUtils.isBlank(aliasInCode)) {
if (extensible.coded() && extension.code() < 0) {
throw new IllegalArgumentException("Error when load extension of extensible " + interfaceName +
" from file:" + url + ", code of @Extension must >=0 at " + className + ".");
if (old != null) {
if (extension.override()) {
if (extension.order() < old.getOrder()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Extension of extensible {} with alias {} override from {} to {} failure, " +
if (old.isOverride() && old.getOrder() >= extension.order()) {
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("http")
public class Http1Server extends AbstractHttpServer {
public Http1Server() {
super("http");
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("http")
public class Http1Server extends AbstractHttpServer {
public Http1Server() {
super("http");
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhiyuan.lzy@antfin.com">zhiyuan.lzy</a>
*/
@Extension("h2c")
public class Http2ClearTextProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected Http2ClearTextProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:lw111072@antfin.com">liangen</a>
*/
@Extension("rest")
public class RestProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected RestProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:lw111072@antfin.com">liangen</a>
*/
@Extension("rest")
public class RestProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected RestProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
*
* @author <a href="mailto:zhiyuan.lzy@antfin.com">zhiyuan.lzy</a>
*/
@Extension("h2c")
public class Http2ClearTextProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected Http2ClearTextProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Provider bootstrap for bolt
*
* @author <a href=mailto:zhanggeng.zg@antfin.com>GengZhang</a>
*/
@Extension("bolt")
public class BoltProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected BoltProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Provider bootstrap for bolt
*
* @author <a href=mailto:zhanggeng.zg@antfin.com>GengZhang</a>
*/
@Extension("bolt")
public class BoltProviderBootstrap<T> extends DefaultProviderBootstrap<T> {
/**
* 构造函数
*
* @param providerConfig 服务发布者配置
*/
protected BoltProviderBootstrap(ProviderConfig<T> providerConfig) {
super(providerConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Http2ClearText Server Transport
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("http")
public class Http1ServerTransport extends AbstractHttp2ServerTransport {
/**
* 构造函数
*
* @param transportConfig 服务端配置
*/
protected Http1ServerTransport(ServerTransportConfig transportConfig) {
super(transportConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Http2ClearText Server Transport
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("http")
public class Http1ServerTransport extends AbstractHttp2ServerTransport {
/**
* 构造函数
*
* @param transportConfig 服务端配置
*/
protected Http1ServerTransport(ServerTransportConfig transportConfig) {
super(transportConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Http2ClearText Client Transport
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("h2c")
public class Http2ClearTextClientTransport extends AbstractHttp2ClientTransport {
/**
* 客户端配置
*
* @param transportConfig 客户端配置
*/
public Http2ClearTextClientTransport(ClientTransportConfig transportConfig) {
super(transportConfig);
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* Http2ClearText Server Transport
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
* @since 5.4.0
*/
@Extension("h2c")
public class Http2ClearTextServerTransport extends AbstractHttp2ServerTransport {
/**
* 构造函数
*
* @param transportConfig 服务端配置
*/
protected Http2ClearTextServerTransport(ServerTransportConfig transportConfig) {
super(transportConfig);
}
}
内容来源于网络,如有侵权,请联系作者删除!