net.jahhan.common.extension.annotation.Extension类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中net.jahhan.common.extension.annotation.Extension类的一些代码示例,展示了Extension类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension类的具体详情如下:
包路径:net.jahhan.common.extension.annotation.Extension
类名称:Extension

Extension介绍

暂无

代码示例

代码示例来源:origin: net.jahhan/dubbo-cluster

/**
 * mock impl
 * 
 * @author chao.liuc
 * 
 */
@Extension("mock")
public class MockClusterWrapper extends Wrapper<Cluster> implements Cluster {

  public <T> Invoker<T> join(Directory<T> directory) throws JahhanException {
    return new MockClusterInvoker<T>(directory,
        this.wrapper.join(directory));
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-http

/**
 * @author lishen
 */
@Extension("tomcat")
@Singleton
public class TomcatHttpBinder implements HttpBinder {

  public HttpServer bind(URL url, HttpHandler handler) {
    return new TomcatHttpServer(url, handler);
  }

}

代码示例来源:origin: net.jahhan/dubbo-filter-cache

/**
 * ThreadLocalCacheFactory
 * 
 * @author william.liangf
 */
@Extension("threadlocal")
@Singleton
public class ThreadLocalCacheFactory extends AbstractCacheFactory {

  protected Cache createCache(URL url) {
    return new ThreadLocalCache(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-registry-multicast

/**
 * MulticastRegistryLocator
 * 
 * @author william.liangf
 */
@Extension("multicast")
@Singleton
public class MulticastRegistryFactory extends AbstractRegistryFactory {

  public Registry createRegistry(URL url) {
    return new MulticastRegistry(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-zookeeper

@Extension("curator")
@Singleton
public class CuratorZookeeperTransporter implements ZookeeperTransporter {

  public ZookeeperClient connect(URL url) {
    return new CuratorZookeeperClient(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-filter-cache

/**
 * JCacheFactory
 * 
 * @author william.liangf
 */
@Extension("jcache")
@Singleton
public class JCacheFactory extends AbstractCacheFactory {

  protected Cache createCache(URL url) {
    return new JCache(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-api

/**
 * 只有message receive使用线程池.
 * 
 * @author chao.liuc
 */
@Extension("message")
@Singleton
public class MessageOnlyDispatcher implements Dispatcher {

  public static final String NAME = "message";

  public ChannelHandler dispatch(ChannelHandler handler, URL url) {
    return new MessageOnlyChannelHandler(handler, url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-api

/**
 * 除发送全部使用线程池处理
 * 
 * @author chao.liuc
 */
@Extension("execution")
@Singleton
public class ExecutionDispatcher implements Dispatcher {
  
  public static final String NAME = "execution";

  public ChannelHandler dispatch(ChannelHandler handler, URL url) {
    return new ExecutionChannelHandler(handler, url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-api

/**
 * 不派发线程池。
 * 
 * @author chao.liuc
 */
@Extension("direct")
@Singleton
public class DirectDispatcher implements Dispatcher {
  
  public static final String NAME = "direct";

  public ChannelHandler dispatch(ChannelHandler handler, URL url) {
    return handler;
  }

}

代码示例来源:origin: net.jahhan/dubbo-filter-validation

/**
 * JValidation
 * 
 * @author william.liangf
 */
@Extension("jvalidation")
@Singleton
public class JValidation extends AbstractValidation {

  @Override
  protected Validator createValidator(URL url) {
    return new JValidator(url);
  }

}

代码示例来源:origin: net.jahhan/common-plugin-util

@Extension("none")
@Singleton
public class NONECrypto implements ICrypto {

  @Override
  public String encrypt(String content, String key) {
    return content;
  }

  @Override
  public String decrypt(String content, String key) {
    return content;
  }
}

代码示例来源:origin: net.jahhan/dubbo-remoting-http

/**
 * ServletHttpTransporter
 * 
 * @author william.liangf
 */
@Extension("servlet")
@Singleton
public class ServletHttpBinder implements HttpBinder {
  
  @Adaptive()
  public HttpServer bind(URL url, HttpHandler handler) {
    return new ServletHttpServer(url, handler);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-http

/**
 * JettyHttpTransporter
 * 
 * @author william.liangf
 */
@Extension("jetty")
@Singleton
public class JettyHttpBinder implements HttpBinder {

  public HttpServer bind(URL url, HttpHandler handler) {
    return new JettyHttpServer(url, handler);
  }

}

代码示例来源:origin: net.jahhan/dubbo-cluster

/**
 * AbsentConfiguratorFactory
 * 
 * @author william.liangf
 */
@Extension("override")
@Singleton
public class OverrideConfiguratorFactory implements ConfiguratorFactory {

  public Configurator getConfigurator(URL url) {
    return new OverrideConfigurator(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-zookeeper

@Extension("zkclient")
@Singleton
public class ZkclientZookeeperTransporter implements ZookeeperTransporter {

  public ZookeeperClient connect(URL url) {
    return new ZkclientZookeeperClient(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-cluster

/**
 * BroadcastCluster
 * 
 * @author william.liangf
 */
@Extension("broadcast")
@Singleton
public class BroadcastCluster implements Cluster {

  public <T> Invoker<T> join(Directory<T> directory) throws JahhanException {
    return new BroadcastClusterInvoker<T>(directory);
  }

}

代码示例来源:origin: net.jahhan/dubbo-cluster

/**
 * @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
 */
@Extension("mergeable")
@Singleton
public class MergeableCluster implements Cluster {

  public static final String NAME = "mergeable";

  public <T> Invoker<T> join( Directory<T> directory ) throws JahhanException {
    return new MergeableClusterInvoker<T>( directory );
  }

}

代码示例来源:origin: net.jahhan/dubbo-filter-cache

/**
 * LruCacheFactory
 * 
 * @author william.liangf
 */
@Extension("lru")
@Singleton
public class LruCacheFactory extends AbstractCacheFactory {

  protected Cache createCache(URL url) {
    return new LruCache(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-cluster

/**
 * AbsentConfiguratorFactory
 * 
 * @author william.liangf
 */
@Extension("absent")
@Singleton
public class AbsentConfiguratorFactory implements ConfiguratorFactory {

  public Configurator getConfigurator(URL url) {
    return new AbsentConfigurator(url);
  }

}

代码示例来源:origin: net.jahhan/dubbo-remoting-mina

/**
 * @author ding.lid
 */
@Extension("mina")
@Singleton
public class MinaTransporter implements Transporter {
  
  public static final String NAME = "mina";

  public Server bind(URL url, ChannelHandler handler) throws RemotingException {
    return new MinaServer(url, handler);
  }

  public Client connect(URL url, ChannelHandler handler) throws RemotingException {
    return new MinaClient(url, handler);
  }

}

相关文章