ArrayList<ProviderEntity> list = new ArrayList<ProviderEntity>();
ProviderEntity providerEntity = new ProviderEntity(Hello.class,HelloImpl.class);
list.add(providerEntity);
ServiceConfig serviceConfig = new ServiceConfig.Builder()
.setRemoteIP("127.0.0.1")
.setJobMode(ServiceConfig.JOB_MODE_CONNECT)
.setTryRecoveryConnectNum(-1)
.setTryConnectNum(2)
.setProviderConfigList(list)
.setOAuthCode("0000000000")
.build();
ServiceManager serviceManager = new ServiceManager(serviceConfig);
serviceManager.startup();
ArrayList<ConsumerEntity> consumerEntityList = new ArrayList<ConsumerEntity>();
consumerEntityList.add(new ConsumerEntity(Hello.class));
ServiceConfig serviceConfig = new ServiceConfig.Builder()
.setJobMode(ServiceConfig.JOB_MODE_LISTENER)
.setConsumerConfigList(consumerEntityList)
.setOAuthCode("0000000000")
.setSSLConnectInfo(encryptConnectInfoSer)
.build();
final ServiceManager serviceManager = new ServiceManager(serviceConfig);
serviceManager.startup();
Hello helloImpl = serviceManager.getBean(Hello.class);