Tabnine Logo
XxlRpcProviderFactory.addService
Code IndexAdd Tabnine to your IDE (free)

How to use
addService
method
in
com.xxl.rpc.remoting.provider.XxlRpcProviderFactory

Best Java code snippets using com.xxl.rpc.remoting.provider.XxlRpcProviderFactory.addService (Showing top 4 results out of 315)

origin: xuxueli/xxl-job

private void initRpcProvider(String ip, int port, String appName, String accessToken) throws Exception {
  // init, provider factory
  String address = IpUtil.getIpPort(ip, port);
  Map<String, String> serviceRegistryParam = new HashMap<String, String>();
  serviceRegistryParam.put("appName", appName);
  serviceRegistryParam.put("address", address);
  xxlRpcProviderFactory = new XxlRpcProviderFactory();
  xxlRpcProviderFactory.initConfig(NetEnum.JETTY, Serializer.SerializeEnum.HESSIAN.getSerializer(), ip, port, accessToken, ExecutorServiceRegistry.class, serviceRegistryParam);
  // add services
  xxlRpcProviderFactory.addService(ExecutorBiz.class.getName(), null, new ExecutorBizImpl());
  // start
  xxlRpcProviderFactory.start();
}
origin: xuxueli/xxl-job

private void initRpcProvider(){
  // init
  XxlRpcProviderFactory xxlRpcProviderFactory = new XxlRpcProviderFactory();
  xxlRpcProviderFactory.initConfig(
      NetEnum.JETTY,
      Serializer.SerializeEnum.HESSIAN.getSerializer(),
      null,
      0,
      XxlJobAdminConfig.getAdminConfig().getAccessToken(),
      null,
      null);
  // add services
  xxlRpcProviderFactory.addService(AdminBiz.class.getName(), null, XxlJobAdminConfig.getAdminConfig().getAdminBiz());
  // jetty handler
  jettyServerHandler = new JettyServerHandler(xxlRpcProviderFactory);
}
private void stopRpcProvider() throws Exception {
origin: com.xuxueli/xxl-job-core

private void initRpcProvider(String ip, int port, String appName, String accessToken) throws Exception {
  // init invoker factory
  xxlRpcInvokerFactory = new XxlRpcInvokerFactory();
  // init, provider factory
  String address = IpUtil.getIpPort(ip, port);
  Map<String, String> serviceRegistryParam = new HashMap<String, String>();
  serviceRegistryParam.put("appName", appName);
  serviceRegistryParam.put("address", address);
  xxlRpcProviderFactory = new XxlRpcProviderFactory();
  xxlRpcProviderFactory.initConfig(NetEnum.JETTY, Serializer.SerializeEnum.HESSIAN.getSerializer(), ip, port, accessToken, ExecutorServiceRegistry.class, serviceRegistryParam);
  // add services
  xxlRpcProviderFactory.addService(ExecutorBiz.class.getName(), null, new ExecutorBizImpl());
  // start
  xxlRpcProviderFactory.start();
}
origin: xuxueli/xxl-mq

public void initServer() throws Exception {
  // address, static registry
  ip = (ip!=null&&ip.trim().length()>0)?ip:IpUtil.getIp();
  String address = IpUtil.getIpPort(ip, port);
  XxlCommonRegistryData xxlCommonRegistryData = new XxlCommonRegistryData();
  xxlCommonRegistryData.setKey(IXxlMqBroker.class.getName());
  xxlCommonRegistryData.setValue(address);
  XxlCommonRegistryServiceImpl.staticRegistryData = xxlCommonRegistryData;
  // init server
  providerFactory = new XxlRpcProviderFactory();
  providerFactory.initConfig(NetEnum.NETTY, Serializer.SerializeEnum.HESSIAN.getSerializer(), ip, port, null, null, null);
  // add server
  providerFactory.addService(IXxlMqBroker.class.getName(), null, this);
  // start server
  providerFactory.start();
}
com.xxl.rpc.remoting.providerXxlRpcProviderFactoryaddService

Popular methods of XxlRpcProviderFactory

  • <init>
  • initConfig
  • start
  • stop

Popular in Java

  • Finding current android device location
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now