├── .gitignore ├── LICENSE ├── NOTICE ├── README.md ├── README.third_party.md ├── RELEASE.md ├── docs └── cn │ ├── architecture.jpg │ ├── config.md │ ├── example.md │ ├── example │ ├── 3a.md │ ├── asyncInvoke.md │ ├── circuitBreaker.md │ ├── compress.md │ ├── concurrency.md │ ├── delayBoot.md │ ├── directInvoke.md │ ├── export.md │ ├── generic.md │ ├── http.md │ ├── implicit.md │ ├── loadbalance.md │ ├── multiRegistry.md │ ├── paramCheck.md │ ├── payload.md │ ├── proxy.md │ ├── register.md │ ├── route.md │ ├── serialization_whitelist.md │ ├── timeout.md │ ├── trace.md │ └── warmup.md │ ├── qa.md │ └── quickstart.md ├── joyrpc-all └── pom.xml ├── joyrpc-api ├── pom.xml └── src │ └── main │ └── java │ └── io │ └── joyrpc │ ├── annotation │ ├── Alias.java │ ├── CallbackArg.java │ ├── Consumer.java │ ├── EnableTrace.java │ ├── Export.java │ ├── Ignore.java │ ├── Provider.java │ └── ServiceName.java │ └── context │ └── RequestContext.java ├── joyrpc-core ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── joyrpc │ │ ├── Callback.java │ │ ├── CallbackInvoker.java │ │ ├── CallbackListener.java │ │ ├── GenericService.java │ │ ├── GroupInvoker.java │ │ ├── Invoker.java │ │ ├── InvokerAware.java │ │ ├── Plugin.java │ │ ├── Result.java │ │ ├── apm │ │ ├── health │ │ │ ├── Doctor.java │ │ │ ├── HealthProbe.java │ │ │ └── HealthState.java │ │ ├── metric │ │ │ ├── Clock.java │ │ │ ├── Dashboard.java │ │ │ ├── DashboardAware.java │ │ │ ├── DashboardFactory.java │ │ │ ├── Metric.java │ │ │ ├── Snapshot.java │ │ │ ├── TPMetric.java │ │ │ ├── TPSnapshot.java │ │ │ ├── TPWindow.java │ │ │ └── mc │ │ │ │ ├── McDashboard.java │ │ │ │ ├── McDashboardFactory.java │ │ │ │ ├── McTPMetric.java │ │ │ │ ├── McTPSnapshot.java │ │ │ │ └── McTPWindow.java │ │ └── trace │ │ │ ├── TraceFactory.java │ │ │ └── Tracer.java │ │ ├── cache │ │ ├── AbstractCache.java │ │ ├── AbstractExpressionCacheKeyGenerator.java │ │ ├── Cache.java │ │ ├── CacheConfig.java │ │ ├── CacheFactory.java │ │ ├── CacheKeyGenerator.java │ │ ├── CacheObject.java │ │ ├── json │ │ │ └── JSONCacheKeyGenerator.java │ │ └── map │ │ │ ├── LRUHashMap.java │ │ │ ├── MapCache.java │ │ │ ├── MapCacheFactory.java │ │ │ └── MapCacheObject.java │ │ ├── cluster │ │ ├── Candidate.java │ │ ├── Cluster.java │ │ ├── ClusterAware.java │ │ ├── MetricHandler.java │ │ ├── Node.java │ │ ├── Region.java │ │ ├── Shard.java │ │ ├── ShardStateTransition.java │ │ ├── Weighter.java │ │ ├── candidate │ │ │ ├── Candidature.java │ │ │ ├── all │ │ │ │ └── AllCandidature.java │ │ │ ├── region │ │ │ │ ├── DataCenterDistribution.java │ │ │ │ ├── RegionCandidature.java │ │ │ │ └── RegionDistribution.java │ │ │ └── single │ │ │ │ └── SingleCandidature.java │ │ ├── discovery │ │ │ ├── Normalizer.java │ │ │ ├── backup │ │ │ │ ├── Backup.java │ │ │ │ ├── BackupCluster.java │ │ │ │ ├── BackupDatum.java │ │ │ │ ├── BackupShard.java │ │ │ │ └── file │ │ │ │ │ └── FileBackup.java │ │ │ ├── config │ │ │ │ ├── ConfigHandler.java │ │ │ │ └── Configure.java │ │ │ ├── naming │ │ │ │ ├── AbstractRegistar.java │ │ │ │ ├── ClusterHandler.java │ │ │ │ ├── ClusterProvider.java │ │ │ │ ├── Registar.java │ │ │ │ ├── fix │ │ │ │ │ └── FixRegistar.java │ │ │ │ └── http │ │ │ │ │ ├── HttpProvider.java │ │ │ │ │ └── HttpRegistrar.java │ │ │ └── registry │ │ │ │ ├── AbstractRegistry.java │ │ │ │ ├── AbstractRegistryFactory.java │ │ │ │ ├── Registry.java │ │ │ │ ├── RegistryFactory.java │ │ │ │ ├── URLKey.java │ │ │ │ ├── fix │ │ │ │ ├── FixRegistry.java │ │ │ │ └── FixRegistryFactory.java │ │ │ │ ├── http │ │ │ │ └── HttpRegistry.java │ │ │ │ └── memory │ │ │ │ ├── MemoryRegistry.java │ │ │ │ └── MemoryRegistryFactory.java │ │ ├── distribution │ │ │ ├── CircuitBreaker.java │ │ │ ├── ExceptionPolicy.java │ │ │ ├── ExceptionPredication.java │ │ │ ├── FailoverPolicy.java │ │ │ ├── FailoverSelector.java │ │ │ ├── LoadBalance.java │ │ │ ├── NodeSelector.java │ │ │ ├── RateLimiter.java │ │ │ ├── Router.java │ │ │ ├── TimeoutPolicy.java │ │ │ ├── circuitbreaker │ │ │ │ ├── McCircuitBreaker.java │ │ │ │ ├── McCircuitBreakerConfig.java │ │ │ │ ├── McIntfCircuitBreakerConfig.java │ │ │ │ └── McMethodBreakerConfig.java │ │ │ ├── limiter │ │ │ │ ├── LeakyBucketRateLimiter.java │ │ │ │ └── RateLimiterConfig.java │ │ │ ├── loadbalance │ │ │ │ ├── DecoratorLoadBalance.java │ │ │ │ ├── RandomWeight.java │ │ │ │ ├── StickyLoadBalance.java │ │ │ │ ├── adaptive │ │ │ │ │ ├── AdaptiveConfig.java │ │ │ │ │ ├── AdaptiveEvaluator.java │ │ │ │ │ ├── AdaptiveLoadBalance.java │ │ │ │ │ ├── AdaptivePolicy.java │ │ │ │ │ ├── AdaptiveScorer.java │ │ │ │ │ ├── Arbiter.java │ │ │ │ │ ├── Election.java │ │ │ │ │ ├── Judge.java │ │ │ │ │ ├── JudgeRank.java │ │ │ │ │ ├── MetricAware.java │ │ │ │ │ ├── NodeMetric.java │ │ │ │ │ ├── NodeRank.java │ │ │ │ │ ├── Rank.java │ │ │ │ │ ├── RankScore.java │ │ │ │ │ ├── arbiter │ │ │ │ │ │ ├── OverallArbiter.java │ │ │ │ │ │ └── WeightArbiter.java │ │ │ │ │ ├── election │ │ │ │ │ │ └── RandomWeightElection.java │ │ │ │ │ └── judge │ │ │ │ │ │ ├── AbstractJudge.java │ │ │ │ │ │ ├── ConcurrencyLimitJudge.java │ │ │ │ │ │ ├── QpsLimitJudge.java │ │ │ │ │ │ ├── ServerStatusJudge.java │ │ │ │ │ │ ├── TpLimitJudge.java │ │ │ │ │ │ └── ZoneAwareJudge.java │ │ │ │ ├── local │ │ │ │ │ └── LocalLoadBalance.java │ │ │ │ ├── randomweight │ │ │ │ │ └── RandomWeightLoadBalance.java │ │ │ │ └── roundrobin │ │ │ │ │ └── RoundRobinLoadBalance.java │ │ │ ├── router │ │ │ │ ├── AbstractRouter.java │ │ │ │ ├── broadcast │ │ │ │ │ └── BroadcastRouter.java │ │ │ │ ├── failfast │ │ │ │ │ └── FailfastRouter.java │ │ │ │ ├── failover │ │ │ │ │ ├── FailoverRouter.java │ │ │ │ │ └── simple │ │ │ │ │ │ └── SimpleFailoverSelector.java │ │ │ │ ├── forking │ │ │ │ │ └── ForkingRouter.java │ │ │ │ └── pinpoint │ │ │ │ │ └── PinPointRouter.java │ │ │ └── selector │ │ │ │ ├── method │ │ │ │ ├── MethodRouter.java │ │ │ │ ├── MethodSelector.java │ │ │ │ ├── MethodSelectorBuilder.java │ │ │ │ └── predicate │ │ │ │ │ ├── LanMatcher.java │ │ │ │ │ ├── LocalIpMatcher.java │ │ │ │ │ ├── MethodNameMatcher.java │ │ │ │ │ ├── Operator.java │ │ │ │ │ └── ParameterMatcher.java │ │ │ │ ├── none │ │ │ │ └── NoneSelector.java │ │ │ │ ├── simple │ │ │ │ └── SimpleSelector.java │ │ │ │ └── tag │ │ │ │ ├── TagRouter.java │ │ │ │ └── TagSelector.java │ │ ├── event │ │ │ ├── ClusterEvent.java │ │ │ ├── ConfigEvent.java │ │ │ ├── MetricEvent.java │ │ │ ├── NodeEvent.java │ │ │ ├── OfflineEvent.java │ │ │ ├── ReconnectEvent.java │ │ │ └── SessionLostEvent.java │ │ └── filter │ │ │ ├── NodeFilter.java │ │ │ ├── ProtocolFilter.java │ │ │ └── SslFilter.java │ │ ├── codec │ │ ├── ArrayInputStream.java │ │ ├── Base64.java │ │ ├── Base64Codec.java │ │ ├── CodecType.java │ │ ├── Hex.java │ │ ├── HexCodec.java │ │ ├── UnsafeByteArrayInputStream.java │ │ ├── UnsafeByteArrayOutputStream.java │ │ ├── checksum │ │ │ ├── Checksum.java │ │ │ ├── crc32 │ │ │ │ ├── Crc32C.java │ │ │ │ ├── Crc32CChecksum.java │ │ │ │ └── NativeCrc32Checksum.java │ │ │ └── none │ │ │ │ └── NoneChecksum.java │ │ ├── compression │ │ │ ├── AdaptiveCompressOutputStream.java │ │ │ ├── Compression.java │ │ │ ├── Finishable.java │ │ │ ├── gzip │ │ │ │ └── GzipCompression.java │ │ │ └── zlib │ │ │ │ ├── DeflateCompression.java │ │ │ │ └── ZlibCompression.java │ │ ├── crypto │ │ │ ├── AbstractCipherCrypto.java │ │ │ ├── Crypto.java │ │ │ ├── Decryptor.java │ │ │ ├── Encryptor.java │ │ │ ├── Signature.java │ │ │ ├── aes │ │ │ │ └── AesCrypto.java │ │ │ ├── des │ │ │ │ └── DesCrypto.java │ │ │ ├── hmac │ │ │ │ ├── HmacMD5Signature.java │ │ │ │ ├── HmacSHA1Signature.java │ │ │ │ ├── HmacSHA256Signature.java │ │ │ │ ├── HmacSHA384Signature.java │ │ │ │ ├── HmacSHA512Signature.java │ │ │ │ └── HmacSignature.java │ │ │ ├── rsa │ │ │ │ ├── MD2WithRSASignature.java │ │ │ │ ├── MD5WithRSASignature.java │ │ │ │ ├── MD5andSHA1WithRSASignature.java │ │ │ │ ├── NONEWithRSASignature.java │ │ │ │ ├── RSASignature.java │ │ │ │ ├── SHA1WithRSASignature.java │ │ │ │ ├── SHA256WithRSASignature.java │ │ │ │ ├── SHA384WithRSASignature.java │ │ │ │ └── SHA512WithRSASignature.java │ │ │ └── tripledes │ │ │ │ └── TripleDesCrypto.java │ │ ├── digester │ │ │ ├── Digester.java │ │ │ ├── MessageDigester.java │ │ │ └── md5 │ │ │ │ ├── Md5.java │ │ │ │ └── Md5Digester.java │ │ └── serialization │ │ │ ├── AbstractSerializer.java │ │ │ ├── AdvanceObjectInputReader.java │ │ │ ├── AdvanceObjectOutputWriter.java │ │ │ ├── Codec.java │ │ │ ├── CustomCodec.java │ │ │ ├── GenericSerializer.java │ │ │ ├── Json.java │ │ │ ├── ObjectInputReader.java │ │ │ ├── ObjectOutputWriter.java │ │ │ ├── ObjectReader.java │ │ │ ├── ObjectWriter.java │ │ │ ├── Registration.java │ │ │ ├── Serialization.java │ │ │ ├── Serializer.java │ │ │ ├── TypeReference.java │ │ │ ├── Xml.java │ │ │ ├── generic │ │ │ ├── JsonGenericSerializer.java │ │ │ └── StandardGenericSerializer.java │ │ │ ├── java │ │ │ ├── AdvanceJavaSerialization.java │ │ │ ├── JavaInputStream.java │ │ │ └── JavaSerialization.java │ │ │ └── jaxb │ │ │ └── JaxbSerialization.java │ │ ├── config │ │ ├── AbstractConfig.java │ │ ├── AbstractConsumerConfig.java │ │ ├── AbstractIdConfig.java │ │ ├── AbstractInterfaceConfig.java │ │ ├── AnnotationConfig.java │ │ ├── ConfigAware.java │ │ ├── ConsumerConfig.java │ │ ├── ConsumerGroupConfig.java │ │ ├── MethodConfig.java │ │ ├── ParameterConfig.java │ │ ├── ProviderConfig.java │ │ ├── RegistryConfig.java │ │ ├── ServerConfig.java │ │ ├── Warmup.java │ │ └── validator │ │ │ ├── AliasValidator.java │ │ │ ├── FilterValidator.java │ │ │ ├── InterfaceValidator.java │ │ │ ├── IntfValidator.java │ │ │ ├── KeyValidator.java │ │ │ ├── ParameterValidator.java │ │ │ ├── PluginValidator.java │ │ │ ├── ValidateAlias.java │ │ │ ├── ValidateFilter.java │ │ │ ├── ValidateInterface.java │ │ │ ├── ValidateKey.java │ │ │ ├── ValidateParameter.java │ │ │ ├── ValidatePlugin.java │ │ │ └── standard │ │ │ └── StandardValidator.java │ │ ├── constants │ │ ├── Constants.java │ │ ├── ExceptionCode.java │ │ ├── Head.java │ │ └── Version.java │ │ ├── context │ │ ├── AbstractInterfaceConfiguration.java │ │ ├── ConfigEvent.java │ │ ├── ConfigEventHandler.java │ │ ├── Configurator.java │ │ ├── ContextSupplier.java │ │ ├── Environment.java │ │ ├── EnvironmentAware.java │ │ ├── EnvironmentContextSupplier.java │ │ ├── EnvironmentSupplier.java │ │ ├── GlobalContext.java │ │ ├── IntfConfiguration.java │ │ ├── OsType.java │ │ ├── Property.java │ │ ├── Variable.java │ │ ├── adaptive │ │ │ ├── AdaptiveConfigHandler.java │ │ │ └── AdaptiveConfiguration.java │ │ ├── auth │ │ │ ├── IPPermission.java │ │ │ ├── IPPermissionConfigHandler.java │ │ │ └── IPPermissionConfiguration.java │ │ ├── circuit │ │ │ ├── CircuitConfigHandler.java │ │ │ └── CircuitConfiguration.java │ │ ├── circuitbreaker │ │ │ ├── BreakerConfigHandler.java │ │ │ └── BreakerConfiguration.java │ │ ├── env │ │ │ ├── Global.java │ │ │ ├── command │ │ │ │ └── CommandSupplier.java │ │ │ └── system │ │ │ │ └── SystemSupplier.java │ │ ├── global │ │ │ └── GlobalConfigHandler.java │ │ ├── limiter │ │ │ ├── LimiterConfigHandler.java │ │ │ └── LimiterConfiguration.java │ │ ├── mock │ │ │ ├── MockConfigHandler.java │ │ │ └── MockConfiguration.java │ │ └── router │ │ │ ├── GroupRouterConfigHandler.java │ │ │ ├── GroupRouterConfiguration.java │ │ │ ├── SelectorConfigHandler.java │ │ │ └── SelectorConfiguration.java │ │ ├── event │ │ ├── AbstractEvent.java │ │ ├── AsyncResult.java │ │ ├── Event.java │ │ ├── EventBus.java │ │ ├── EventHandler.java │ │ ├── Publisher.java │ │ ├── PublisherConfig.java │ │ ├── Recipient.java │ │ ├── UpdateEvent.java │ │ └── jbus │ │ │ └── JEventBus.java │ │ ├── exception │ │ ├── AuthenticationException.java │ │ ├── AuthorizationException.java │ │ ├── CacheException.java │ │ ├── ChannelClosedException.java │ │ ├── ChannelSendException.java │ │ ├── CircuitBreakerException.java │ │ ├── CodecException.java │ │ ├── ConnectionException.java │ │ ├── CreationException.java │ │ ├── FailoverException.java │ │ ├── GenericException.java │ │ ├── HandlerException.java │ │ ├── IllegalConfigureException.java │ │ ├── IllegalInterfaceException.java │ │ ├── InitializationException.java │ │ ├── LafException.java │ │ ├── MethodOverloadException.java │ │ ├── NoAliveProviderException.java │ │ ├── NoReferException.java │ │ ├── OverloadException.java │ │ ├── ParserException.java │ │ ├── ProtocolException.java │ │ ├── ProxyException.java │ │ ├── RateLimiterException.java │ │ ├── ReconnectException.java │ │ ├── ReflectionException.java │ │ ├── RejectException.java │ │ ├── RpcException.java │ │ ├── SerializerException.java │ │ ├── SessionException.java │ │ ├── ShutdownExecption.java │ │ ├── SslException.java │ │ └── TransportException.java │ │ ├── expression │ │ ├── Expression.java │ │ └── ExpressionProvider.java │ │ ├── filter │ │ ├── AbstractCacheFilter.java │ │ ├── AbstractConcurrencyFilter.java │ │ ├── AbstractConsumerFilter.java │ │ ├── AbstractFilter.java │ │ ├── AbstractProviderFilter.java │ │ ├── AbstractTraceFilter.java │ │ ├── AbstractValidationFilter.java │ │ ├── ConsumerFilter.java │ │ ├── Filter.java │ │ ├── ProviderFilter.java │ │ ├── consumer │ │ │ ├── CacheFilter.java │ │ │ ├── ConcurrencyFilter.java │ │ │ ├── GenericFilter.java │ │ │ ├── MockFilter.java │ │ │ ├── TraceFilter.java │ │ │ └── ValidationFilter.java │ │ └── provider │ │ │ ├── AuthorizationFilter.java │ │ │ ├── CacheFilter.java │ │ │ ├── ConcurrencyFilter.java │ │ │ ├── ExceptionFilter.java │ │ │ ├── GenericFilter.java │ │ │ ├── IPPermissionFilter.java │ │ │ ├── LimiterFilter.java │ │ │ ├── MethodBlackWhiteListFilter.java │ │ │ ├── TimeoutFilter.java │ │ │ ├── TraceFilter.java │ │ │ └── ValidationFilter.java │ │ ├── invoker │ │ ├── AbstractService.java │ │ ├── Exporter.java │ │ ├── ExporterManager.java │ │ ├── InvokerCaller.java │ │ ├── Refer.java │ │ ├── ServiceManager.java │ │ ├── callback │ │ │ ├── CallbackContainer.java │ │ │ └── CallbackManager.java │ │ ├── chain │ │ │ ├── DefaultFilterChainFactory.java │ │ │ └── FilterChainFactory.java │ │ ├── event │ │ │ └── ExporterEvent.java │ │ ├── exception │ │ │ ├── ExceptionHandler.java │ │ │ └── SystemExceptionHandler.java │ │ ├── group │ │ │ ├── AbstractGroupInvoker.java │ │ │ ├── FailoverGroupInvoker.java │ │ │ └── ParameterGroupInvoker.java │ │ ├── injection │ │ │ ├── AliasInjection.java │ │ │ ├── ContextTransmit.java │ │ │ ├── NodeReqInjection.java │ │ │ ├── ProtocolInjection.java │ │ │ ├── ReqInjection.java │ │ │ ├── RespInjection.java │ │ │ ├── RetryInjection.java │ │ │ ├── Transmit.java │ │ │ └── Transmits.java │ │ └── option │ │ │ ├── AbstractInterfaceOption.java │ │ │ ├── AbstractMethodOption.java │ │ │ ├── ArgumentOption.java │ │ │ ├── CacheOption.java │ │ │ ├── CallbackOption.java │ │ │ ├── Concurrency.java │ │ │ ├── ConsumerMethodOption.java │ │ │ ├── InterfaceOption.java │ │ │ ├── InterfaceOptionFactory.java │ │ │ ├── MethodAdaptiveOption.java │ │ │ ├── MethodOption.java │ │ │ ├── ProviderMethodOption.java │ │ │ └── inner │ │ │ ├── InnerConsumerMethodOption.java │ │ │ ├── InnerConsumerOption.java │ │ │ ├── InnerInterfaceOptionFactory.java │ │ │ ├── InnerProviderMethodOption.java │ │ │ └── InnerProviderOption.java │ │ ├── permission │ │ ├── Authentication.java │ │ ├── Authorization.java │ │ ├── BlackList.java │ │ ├── BlackWhiteList.java │ │ ├── ExceptionBlackWhiteList.java │ │ ├── Identification.java │ │ ├── SerializerBlackList.java │ │ ├── SerializerBlackWhiteList.java │ │ ├── SerializerTypeScanner.java │ │ ├── SerializerWhiteList.java │ │ ├── StringBlackWhiteList.java │ │ ├── WhiteList.java │ │ └── token │ │ │ ├── TokenAuthentication.java │ │ │ ├── TokenAuthorization.java │ │ │ └── TokenIdentification.java │ │ ├── protocol │ │ ├── AbstractCodec.java │ │ ├── AbstractProtocol.java │ │ ├── ClientProtocol.java │ │ ├── MessageHandler.java │ │ ├── MsgType.java │ │ ├── Protocol.java │ │ ├── ServerProtocol.java │ │ ├── handler │ │ │ ├── AbstractNegotiationHandler.java │ │ │ ├── AbstractReceiver.java │ │ │ ├── AuthenticationReceiver.java │ │ │ ├── BizReceiver.java │ │ │ ├── CallbackReceiver.java │ │ │ ├── DefaultProtocolDeduction.java │ │ │ ├── HeartbeatReceiver.java │ │ │ ├── NegotiationReceiver.java │ │ │ ├── OfflineReceiver.java │ │ │ ├── RequestReceiver.java │ │ │ ├── ResponseReceiver.java │ │ │ ├── SessionbeatReceiver.java │ │ │ └── ShakeHandReceiver.java │ │ ├── http │ │ │ ├── AbstractHttpDecoder.java │ │ │ ├── HeaderInjection.java │ │ │ └── injection │ │ │ │ └── DefaultHeaderInjection.java │ │ ├── joy │ │ │ ├── JoyClientProtocol.java │ │ │ ├── JoyServerProtocol.java │ │ │ └── codec │ │ │ │ └── JoyCodec.java │ │ ├── message │ │ │ ├── BaseMessage.java │ │ │ ├── Call.java │ │ │ ├── HeartbeatAware.java │ │ │ ├── Invocation.java │ │ │ ├── Message.java │ │ │ ├── MessageHeader.java │ │ │ ├── Request.java │ │ │ ├── RequestMessage.java │ │ │ ├── Response.java │ │ │ ├── ResponseMessage.java │ │ │ ├── ResponsePayload.java │ │ │ ├── SuccessResponse.java │ │ │ ├── authentication │ │ │ │ ├── AuthenticationRequest.java │ │ │ │ └── AuthenticationResponse.java │ │ │ ├── heartbeat │ │ │ │ ├── DefaultHeartbeatResponse.java │ │ │ │ └── HeartbeatResponse.java │ │ │ ├── negotiation │ │ │ │ ├── AbstractNegotiation.java │ │ │ │ ├── NegotiationRequest.java │ │ │ │ └── NegotiationResponse.java │ │ │ └── session │ │ │ │ └── Sessionbeat.java │ │ └── telnet │ │ │ ├── TelnetChannelHandler.java │ │ │ ├── TelnetServerProtocol.java │ │ │ └── handler │ │ │ ├── ClearTelnetHandler.java │ │ │ ├── EchoTelnetHandler.java │ │ │ ├── ExitTelnetHandler.java │ │ │ └── HelpTelnetHandler.java │ │ ├── proxy │ │ ├── AbstractIDLFactory.java │ │ ├── IDLFactory.java │ │ ├── JCompiler.java │ │ ├── MethodCaller.java │ │ ├── ProxyFactory.java │ │ └── jdk │ │ │ ├── JdkCompiler.java │ │ │ ├── JdkIDLFactory.java │ │ │ └── JdkProxyFactory.java │ │ ├── transaction │ │ ├── TransactionContext.java │ │ ├── TransactionFactory.java │ │ └── TransactionOption.java │ │ ├── transport │ │ ├── AbstractClient.java │ │ ├── AbstractServer.java │ │ ├── ChannelTransport.java │ │ ├── Client.java │ │ ├── DecoratorClient.java │ │ ├── DecoratorServer.java │ │ ├── DefaultChannelTransport.java │ │ ├── DefaultEndpointFactory.java │ │ ├── Endpoint.java │ │ ├── EndpointFactory.java │ │ ├── MessageHandler.java │ │ ├── Server.java │ │ ├── ShareServer.java │ │ ├── Transport.java │ │ ├── TransportClient.java │ │ ├── TransportFactory.java │ │ ├── TransportServer.java │ │ ├── buffer │ │ │ ├── ChannelBuffer.java │ │ │ ├── ChannelBufferInputStream.java │ │ │ └── ChannelBufferOutputStream.java │ │ ├── channel │ │ │ ├── AbstractChannelManager.java │ │ │ ├── Channel.java │ │ │ ├── ChannelChain.java │ │ │ ├── ChannelChainReaderContext.java │ │ │ ├── ChannelChainWriterContext.java │ │ │ ├── ChannelContext.java │ │ │ ├── ChannelHandler.java │ │ │ ├── ChannelManager.java │ │ │ ├── ChannelManagerFactory.java │ │ │ ├── ChannelOperator.java │ │ │ ├── ChannelReader.java │ │ │ ├── ChannelWriter.java │ │ │ ├── DecoratorChannel.java │ │ │ ├── FutureManager.java │ │ │ ├── RequestFuture.java │ │ │ ├── SharedChannelManager.java │ │ │ ├── SharedChannelManagerFactory.java │ │ │ ├── UnsharedChannelManager.java │ │ │ └── UnsharedChannelManagerFactory.java │ │ ├── codec │ │ │ ├── Codec.java │ │ │ ├── CodecContext.java │ │ │ ├── DecodeContext.java │ │ │ ├── Decoder.java │ │ │ ├── DeductionContext.java │ │ │ ├── DefaultDecodeContext.java │ │ │ ├── DefaultEncodeContext.java │ │ │ ├── EncodeContext.java │ │ │ ├── Encoder.java │ │ │ ├── FixedLengthCodec.java │ │ │ ├── Http2Codec.java │ │ │ ├── HttpCodec.java │ │ │ ├── LengthFieldFrameCodec.java │ │ │ ├── ProtocolDeduction.java │ │ │ └── TelnetCodec.java │ │ ├── event │ │ │ ├── ActiveEvent.java │ │ │ ├── ChannelEvent.java │ │ │ ├── HeartbeatEvent.java │ │ │ ├── InactiveEvent.java │ │ │ ├── ReconnectedEvent.java │ │ │ └── TransportEvent.java │ │ ├── heartbeat │ │ │ ├── DefaultHeartbeatTrigger.java │ │ │ ├── HeartbeatStrategy.java │ │ │ └── HeartbeatTrigger.java │ │ ├── http │ │ │ ├── DefaultHttpHeaders.java │ │ │ ├── DefaultHttpRequestMessage.java │ │ │ ├── DefaultHttpResponseMessage.java │ │ │ ├── HttpClient.java │ │ │ ├── HttpHeaders.java │ │ │ ├── HttpMessage.java │ │ │ ├── HttpMethod.java │ │ │ ├── HttpRequest.java │ │ │ ├── HttpRequestMessage.java │ │ │ ├── HttpResponse.java │ │ │ ├── HttpResponseMessage.java │ │ │ └── jdk │ │ │ │ └── JdkHttpClient.java │ │ ├── http2 │ │ │ ├── AbstractHttp2Message.java │ │ │ ├── DefaultHttp2Headers.java │ │ │ ├── DefaultHttp2RequestMessage.java │ │ │ ├── DefaultHttp2ResponseMessage.java │ │ │ ├── Http2Headers.java │ │ │ ├── Http2Message.java │ │ │ ├── Http2RequestMessage.java │ │ │ └── Http2ResponseMessage.java │ │ ├── message │ │ │ ├── Header.java │ │ │ └── Message.java │ │ ├── session │ │ │ ├── DefaultSession.java │ │ │ ├── Session.java │ │ │ └── SessionManager.java │ │ └── telnet │ │ │ ├── TelnetEscape.java │ │ │ ├── TelnetHandler.java │ │ │ ├── TelnetInput.java │ │ │ ├── TelnetRequest.java │ │ │ └── TelnetResponse.java │ │ └── util │ │ ├── ClassUtils.java │ │ ├── Close.java │ │ ├── Daemon.java │ │ ├── Files.java │ │ ├── Futures.java │ │ ├── GenericChecker.java │ │ ├── GenericClass.java │ │ ├── GenericConstructor.java │ │ ├── GenericExecutable.java │ │ ├── GenericMethod.java │ │ ├── GenericMethodOption.java │ │ ├── GenericType.java │ │ ├── IDLConversion.java │ │ ├── IDLConverter.java │ │ ├── IDLMethod.java │ │ ├── IDLMethodDesc.java │ │ ├── IDLType.java │ │ ├── IdGenerator.java │ │ ├── Maps.java │ │ ├── Memory.java │ │ ├── MethodOption.java │ │ ├── MilliPeriod.java │ │ ├── Pair.java │ │ ├── PropertiesUtils.java │ │ ├── Resource.java │ │ ├── Shutdown.java │ │ ├── State.java │ │ ├── StateController.java │ │ ├── StateEvent.java │ │ ├── StateFuture.java │ │ ├── StateInt.java │ │ ├── StateMachine.java │ │ ├── StateTransition.java │ │ ├── StringUtils.java │ │ ├── SuperIterator.java │ │ ├── Switcher.java │ │ ├── SystemClock.java │ │ ├── Timer.java │ │ ├── TimerQueue.java │ │ ├── TriFunction.java │ │ ├── Waiter.java │ │ ├── concurrenttrees │ │ ├── common │ │ │ ├── CharSequences.java │ │ │ ├── Iterables.java │ │ │ ├── KeyValuePair.java │ │ │ ├── LazyIterator.java │ │ │ └── PrettyPrinter.java │ │ ├── radix │ │ │ ├── ConcurrentRadixTree.java │ │ │ ├── RadixTree.java │ │ │ └── node │ │ │ │ ├── Node.java │ │ │ │ ├── NodeFactory.java │ │ │ │ ├── concrete │ │ │ │ ├── DefaultByteArrayNodeFactory.java │ │ │ │ ├── DefaultCharArrayNodeFactory.java │ │ │ │ ├── DefaultCharSequenceNodeFactory.java │ │ │ │ ├── SmartArrayBasedNodeFactory.java │ │ │ │ ├── bytearray │ │ │ │ │ ├── ByteArrayCharSequence.java │ │ │ │ │ ├── ByteArrayNodeDefault.java │ │ │ │ │ ├── ByteArrayNodeLeafNullValue.java │ │ │ │ │ ├── ByteArrayNodeLeafVoidValue.java │ │ │ │ │ ├── ByteArrayNodeLeafWithValue.java │ │ │ │ │ ├── ByteArrayNodeNonLeafNullValue.java │ │ │ │ │ └── ByteArrayNodeNonLeafVoidValue.java │ │ │ │ ├── chararray │ │ │ │ │ ├── CharArrayNodeDefault.java │ │ │ │ │ ├── CharArrayNodeLeafNullValue.java │ │ │ │ │ ├── CharArrayNodeLeafVoidValue.java │ │ │ │ │ ├── CharArrayNodeLeafWithValue.java │ │ │ │ │ ├── CharArrayNodeNonLeafNullValue.java │ │ │ │ │ └── CharArrayNodeNonLeafVoidValue.java │ │ │ │ ├── charsequence │ │ │ │ │ ├── CharSequenceNodeDefault.java │ │ │ │ │ ├── CharSequenceNodeLeafNullValue.java │ │ │ │ │ ├── CharSequenceNodeLeafVoidValue.java │ │ │ │ │ ├── CharSequenceNodeLeafWithValue.java │ │ │ │ │ ├── CharSequenceNodeNonLeafNullValue.java │ │ │ │ │ └── CharSequenceNodeNonLeafVoidValue.java │ │ │ │ └── voidvalue │ │ │ │ │ └── VoidValue.java │ │ │ │ └── util │ │ │ │ ├── AtomicReferenceArrayListAdapter.java │ │ │ │ ├── NodeCharacterComparator.java │ │ │ │ ├── NodeCharacterKey.java │ │ │ │ ├── NodeCharacterProvider.java │ │ │ │ ├── NodeUtil.java │ │ │ │ └── PrettyPrintable.java │ │ ├── radixinverted │ │ │ ├── ConcurrentInvertedRadixTree.java │ │ │ └── InvertedRadixTree.java │ │ ├── radixreversed │ │ │ ├── ConcurrentReversedRadixTree.java │ │ │ └── ReversedRadixTree.java │ │ ├── solver │ │ │ └── LCSubstringSolver.java │ │ └── suffix │ │ │ ├── ConcurrentSuffixTree.java │ │ │ └── SuffixTree.java │ │ ├── network │ │ ├── IpLong.java │ │ ├── IpPart.java │ │ ├── IpType.java │ │ ├── Ipv4.java │ │ ├── Lan.java │ │ ├── Line.java │ │ ├── Ping.java │ │ ├── Segment.java │ │ └── Topology.java │ │ └── thread │ │ ├── DefaultThreadPool.java │ │ ├── NamedThreadFactory.java │ │ ├── ThreadPool.java │ │ ├── ThreadPoolFactory.java │ │ └── adaptive │ │ └── AdaptiveThreadPoolFactory.java │ └── resources │ └── META-INF │ ├── permission │ └── serialization.whitelist │ ├── services │ ├── io.joyrpc.GroupInvoker │ ├── io.joyrpc.apm.metric.DashboardFactory │ ├── io.joyrpc.cache.CacheFactory │ ├── io.joyrpc.cache.CacheKeyGenerator │ ├── io.joyrpc.cluster.candidate.Candidature │ ├── io.joyrpc.cluster.discovery.registry.RegistryFactory │ ├── io.joyrpc.cluster.distribution.FailoverSelector │ ├── io.joyrpc.cluster.distribution.LoadBalance │ ├── io.joyrpc.cluster.distribution.NodeSelector │ ├── io.joyrpc.cluster.distribution.RateLimiter │ ├── io.joyrpc.cluster.distribution.Router │ ├── io.joyrpc.cluster.distribution.loadbalance.adaptive.Arbiter │ ├── io.joyrpc.cluster.distribution.loadbalance.adaptive.Election │ ├── io.joyrpc.cluster.distribution.loadbalance.adaptive.Judge │ ├── io.joyrpc.cluster.filter.NodeFilter │ ├── io.joyrpc.codec.checksum.Checksum │ ├── io.joyrpc.codec.compression.Compression │ ├── io.joyrpc.codec.crypto.Decryptor │ ├── io.joyrpc.codec.crypto.Encryptor │ ├── io.joyrpc.codec.crypto.Signature │ ├── io.joyrpc.codec.digester.Digester │ ├── io.joyrpc.codec.serialization.GenericSerializer │ ├── io.joyrpc.codec.serialization.Serialization │ ├── io.joyrpc.config.Warmup │ ├── io.joyrpc.config.validator.InterfaceValidator │ ├── io.joyrpc.context.ConfigEventHandler │ ├── io.joyrpc.context.ContextSupplier │ ├── io.joyrpc.context.Environment │ ├── io.joyrpc.context.EnvironmentSupplier │ ├── io.joyrpc.event.EventBus │ ├── io.joyrpc.filter.ConsumerFilter │ ├── io.joyrpc.filter.ProviderFilter │ ├── io.joyrpc.invoker.chain.FilterChainFactory │ ├── io.joyrpc.invoker.exception.ExceptionHandler │ ├── io.joyrpc.invoker.injection.NodeReqInjection │ ├── io.joyrpc.invoker.injection.Transmit │ ├── io.joyrpc.invoker.option.InterfaceOptionFactory │ ├── io.joyrpc.permission.Authentication │ ├── io.joyrpc.permission.Authorization │ ├── io.joyrpc.permission.Identification │ ├── io.joyrpc.protocol.ClientProtocol │ ├── io.joyrpc.protocol.MessageHandler │ ├── io.joyrpc.protocol.ServerProtocol │ ├── io.joyrpc.protocol.http.HeaderInjection │ ├── io.joyrpc.proxy.IDLFactory │ ├── io.joyrpc.proxy.JCompiler │ ├── io.joyrpc.proxy.ProxyFactory │ ├── io.joyrpc.transport.EndpointFactory │ ├── io.joyrpc.transport.channel.ChannelManagerFactory │ ├── io.joyrpc.transport.http.HttpClient │ ├── io.joyrpc.transport.telnet.TelnetHandler │ └── io.joyrpc.util.thread.ThreadPoolFactory │ ├── system_context │ ├── system_env │ ├── system_http_header │ ├── system_network_error │ └── system_standard_type ├── joyrpc-example ├── joyrpc-example-api │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── example │ │ │ └── api │ │ │ ├── ApiClient.java │ │ │ ├── ApiServer.java │ │ │ ├── CallbackClient.java │ │ │ └── CallbackServer.java │ │ └── resources │ │ └── log4j.properties ├── joyrpc-example-boot │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── example │ │ │ ├── boot │ │ │ ├── BootAsyncClient.java │ │ │ ├── BootClient.java │ │ │ ├── BootGeneric.java │ │ │ ├── BootGroupClient.java │ │ │ ├── BootJavassistClient.java │ │ │ ├── BootRestServer.java │ │ │ └── BootServer.java │ │ │ └── service │ │ │ └── AsyncTraceService.java │ │ └── resources │ │ ├── application-async-client.properties │ │ ├── application-client.properties │ │ ├── application-generic.properties │ │ ├── application-group-client.properties │ │ ├── application-javassist-client.properties │ │ ├── application-rest.properties │ │ ├── application-server.properties │ │ └── application.properties ├── joyrpc-example-dubbo │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── example │ │ │ ├── dubbo │ │ │ ├── consumer │ │ │ │ └── DubboClient.java │ │ │ ├── generic │ │ │ │ └── DubboGeneric.java │ │ │ └── provider │ │ │ │ └── DubboServer.java │ │ │ └── service │ │ │ ├── DemoService.java │ │ │ ├── impl │ │ │ └── DemoServiceImpl.java │ │ │ └── vo │ │ │ ├── EchoData.java │ │ │ ├── EchoHeader.java │ │ │ ├── EchoRequest.java │ │ │ ├── EchoResponse.java │ │ │ └── Java8TimeObj.java │ │ └── resources │ │ ├── application-client.properties │ │ ├── application-generic.properties │ │ ├── application-server.properties │ │ └── application.properties ├── joyrpc-example-grpc │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── example │ │ │ ├── boot │ │ │ ├── BootGrpcClient.java │ │ │ └── BootGrpcServer.java │ │ │ └── service │ │ │ ├── DemoServiceGrpc.java │ │ │ ├── HelloProto.java │ │ │ ├── HelloRequest.java │ │ │ ├── HelloRequestOrBuilder.java │ │ │ ├── HelloResponse.java │ │ │ └── HelloResponseOrBuilder.java │ │ ├── proto │ │ └── grpc.proto │ │ └── resources │ │ └── application.properties ├── joyrpc-example-interface │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── example │ │ └── service │ │ ├── CallbackService.java │ │ ├── DemoService.java │ │ ├── EchoService.java │ │ ├── TraceService.java │ │ ├── impl │ │ ├── CallbackServiceImpl.java │ │ ├── DemoServiceImpl.java │ │ ├── EchoServiceImpl.java │ │ └── TraceServiceImpl.java │ │ └── vo │ │ ├── EchoData.java │ │ ├── EchoDataRequest.java │ │ ├── EchoDataResponse.java │ │ ├── EchoHeader.java │ │ ├── EchoRequest.java │ │ ├── EchoResponse.java │ │ └── Java8TimeObj.java ├── joyrpc-example-spring │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── example │ │ │ └── spring │ │ │ ├── SpringClient.java │ │ │ └── SpringServer.java │ │ └── resources │ │ └── spring │ │ ├── joyrpc-consumer.xml │ │ └── joyrpc-provider.xml └── pom.xml ├── joyrpc-extension ├── README.md ├── joyrpc-extension-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── extension │ │ ├── AbstractParametric.java │ │ ├── Classify.java │ │ ├── Context.java │ │ ├── Converts.java │ │ ├── DateParser.java │ │ ├── Disable.java │ │ ├── Extensible.java │ │ ├── Extension.java │ │ ├── ExtensionLoader.java │ │ ├── ExtensionManager.java │ │ ├── ExtensionMeta.java │ │ ├── ExtensionPoint.java │ │ ├── ExtensionPointLazy.java │ │ ├── ExtensionScanner.java │ │ ├── ExtensionSelector.java │ │ ├── ExtensionSpi.java │ │ ├── Instantiation.java │ │ ├── MapParametric.java │ │ ├── Name.java │ │ ├── Option.java │ │ ├── Ordered.java │ │ ├── Parametric.java │ │ ├── Plugin.java │ │ ├── Prototype.java │ │ ├── Selector.java │ │ ├── Strip.java │ │ ├── Type.java │ │ ├── URL.java │ │ ├── URLBiOption.java │ │ ├── URLKey.java │ │ ├── URLOption.java │ │ ├── WrapperParametric.java │ │ ├── condition │ │ ├── Condition.java │ │ ├── Conditional.java │ │ ├── ConditionalOnClass.java │ │ ├── ConditionalOnJava.java │ │ ├── ConditionalOnMissingClass.java │ │ ├── ConditionalOnProperty.java │ │ ├── OnClassCondition.java │ │ ├── OnJavaCondition.java │ │ ├── OnMissingClassCondition.java │ │ └── OnPropertyCondition.java │ │ ├── exception │ │ └── PluginException.java │ │ ├── listener │ │ ├── ExtensionEvent.java │ │ ├── ExtensionListener.java │ │ └── LoaderEvent.java │ │ └── spi │ │ └── SpiLoader.java ├── joyrpc-extension-spring │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── extension │ │ └── spring │ │ └── SpringLoader.java ├── joyrpc-extension-springboot │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── extension │ │ │ └── spring │ │ │ └── boot │ │ │ └── SpringLoaderAutoConfiguration.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── joyrpc-plugin ├── joyrpc-cache │ ├── joyrpc-cache-cache2k │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cache │ │ │ │ └── cache2k │ │ │ │ ├── Cache2kCache.java │ │ │ │ └── Cache2kCacheFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cache.CacheFactory │ ├── joyrpc-cache-caffeine │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cache │ │ │ │ └── caffeine │ │ │ │ ├── CaffeineCache.java │ │ │ │ └── CaffeineCacheFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cache.CacheFactory │ ├── joyrpc-cache-guava │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cache │ │ │ │ └── guava │ │ │ │ ├── GuavaCache.java │ │ │ │ └── GuavaCacheFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cache.CacheFactory │ └── pom.xml ├── joyrpc-codec │ ├── joyrpc-compression-lz4 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── compression │ │ │ │ └── lz4 │ │ │ │ ├── Lz4Compression.java │ │ │ │ └── Lz4FrameCompression.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.compression.Compression │ ├── joyrpc-compression-lzma │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── compression │ │ │ │ └── lzma │ │ │ │ └── LzmaCompression.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.compression.Compression │ ├── joyrpc-compression-snappy │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── compression │ │ │ │ └── snappy │ │ │ │ ├── BufferRecycler.java │ │ │ │ ├── CorruptionException.java │ │ │ │ ├── Preconditions.java │ │ │ │ ├── SnappyCompression.java │ │ │ │ ├── SnappyCompressor.java │ │ │ │ ├── SnappyDecompressor.java │ │ │ │ ├── SnappyFrameCompression.java │ │ │ │ ├── SnappyFramed.java │ │ │ │ ├── SnappyFramedInputStream.java │ │ │ │ ├── SnappyFramedOutputStream.java │ │ │ │ ├── SnappyInputStream.java │ │ │ │ └── SnappyOutputStream.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.compression.Compression │ ├── joyrpc-serialization-fastjson │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── serialization │ │ │ │ └── fastjson │ │ │ │ ├── AbstractInvocationCodec.java │ │ │ │ ├── AbstractResponsePayloadCodec.java │ │ │ │ ├── AbstractSerializer.java │ │ │ │ ├── BackupShardSerializer.java │ │ │ │ ├── InvocationCodec.java │ │ │ │ ├── JsonConfig.java │ │ │ │ ├── JsonSerialization.java │ │ │ │ ├── JsonThrowableDeserializer.java │ │ │ │ ├── ResponsePayloadCodec.java │ │ │ │ └── java8 │ │ │ │ ├── MonthDaySerialization.java │ │ │ │ ├── YearMonthSerialization.java │ │ │ │ ├── YearSerialization.java │ │ │ │ ├── ZoneIdSerialization.java │ │ │ │ └── ZoneOffsetSerialization.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.codec.serialization.Json │ │ │ └── io.joyrpc.codec.serialization.Serialization │ ├── joyrpc-serialization-fst │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ ├── io │ │ │ │ └── joyrpc │ │ │ │ │ └── codec │ │ │ │ │ └── serialization │ │ │ │ │ └── fst │ │ │ │ │ ├── FSTObjectReader.java │ │ │ │ │ ├── FSTObjectWriter.java │ │ │ │ │ └── FSTSerialization.java │ │ │ └── org │ │ │ │ └── nustaq │ │ │ │ └── serialization │ │ │ │ └── AutowiredObjectSerializer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.serialization.Serialization │ ├── joyrpc-serialization-hessian │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ ├── codec │ │ │ │ └── serialization │ │ │ │ │ └── hessian2 │ │ │ │ │ ├── Hessian2BWLInput.java │ │ │ │ │ ├── Hessian2Reader.java │ │ │ │ │ ├── Hessian2Serialization.java │ │ │ │ │ ├── Hessian2SerializerFactory.java │ │ │ │ │ └── Hessian2Writer.java │ │ │ │ └── com │ │ │ │ └── caucho │ │ │ │ └── hessian │ │ │ │ ├── HessianException.java │ │ │ │ ├── HessianUnshared.java │ │ │ │ ├── io │ │ │ │ ├── AbstractDeserializer.java │ │ │ │ ├── AbstractDeserializerWrapper.java │ │ │ │ ├── AbstractHessianInput.java │ │ │ │ ├── AbstractHessianOutput.java │ │ │ │ ├── AbstractHessianResolver.java │ │ │ │ ├── AbstractListDeserializer.java │ │ │ │ ├── AbstractMapDeserializer.java │ │ │ │ ├── AbstractSerializer.java │ │ │ │ ├── AbstractSerializerFactory.java │ │ │ │ ├── AbstractSerializerWrapper.java │ │ │ │ ├── AbstractStreamDeserializer.java │ │ │ │ ├── AbstractStreamSerializer.java │ │ │ │ ├── AbstractStringValueDeserializer.java │ │ │ │ ├── AnnotationDeserializer.java │ │ │ │ ├── AnnotationInvocationHandler.java │ │ │ │ ├── AnnotationSerializer.java │ │ │ │ ├── ArrayDeserializer.java │ │ │ │ ├── ArraySerializer.java │ │ │ │ ├── AutowiredObjectDeserializer.java │ │ │ │ ├── AutowiredObjectSerializer.java │ │ │ │ ├── BasicDeserializer.java │ │ │ │ ├── BasicSerializer.java │ │ │ │ ├── BeanDeserializer.java │ │ │ │ ├── BeanSerializer.java │ │ │ │ ├── BeanSerializerFactory.java │ │ │ │ ├── BigDecimalDeserializer.java │ │ │ │ ├── ByteArraySerializer.java │ │ │ │ ├── ByteHandle.java │ │ │ │ ├── CalendarHandle.java │ │ │ │ ├── CalendarSerializer.java │ │ │ │ ├── ClassDeserializer.java │ │ │ │ ├── ClassFactory.java │ │ │ │ ├── ClassSerializer.java │ │ │ │ ├── CollectionDeserializer.java │ │ │ │ ├── CollectionSerializer.java │ │ │ │ ├── ContextSerializerFactory.java │ │ │ │ ├── Deflation.java │ │ │ │ ├── Deserializer.java │ │ │ │ ├── EnumDeserializer.java │ │ │ │ ├── EnumSerializer.java │ │ │ │ ├── EnumerationDeserializer.java │ │ │ │ ├── EnumerationSerializer.java │ │ │ │ ├── EnvelopeFactory.java │ │ │ │ ├── ExtSerializerFactory.java │ │ │ │ ├── FieldDeserializer2.java │ │ │ │ ├── FieldDeserializer2Factory.java │ │ │ │ ├── FieldDeserializer2FactoryUnsafe.java │ │ │ │ ├── FileDeserializer.java │ │ │ │ ├── FloatHandle.java │ │ │ │ ├── Hessian2Constants.java │ │ │ │ ├── Hessian2Input.java │ │ │ │ ├── Hessian2Output.java │ │ │ │ ├── Hessian2StreamingInput.java │ │ │ │ ├── Hessian2StreamingOutput.java │ │ │ │ ├── HessianDebugInputStream.java │ │ │ │ ├── HessianDebugOutputStream.java │ │ │ │ ├── HessianDebugState.java │ │ │ │ ├── HessianEnvelope.java │ │ │ │ ├── HessianFactory.java │ │ │ │ ├── HessianFieldException.java │ │ │ │ ├── HessianHandle.java │ │ │ │ ├── HessianInput.java │ │ │ │ ├── HessianInputFactory.java │ │ │ │ ├── HessianMethodSerializationException.java │ │ │ │ ├── HessianOutput.java │ │ │ │ ├── HessianProtocolException.java │ │ │ │ ├── HessianRemote.java │ │ │ │ ├── HessianRemoteObject.java │ │ │ │ ├── HessianRemoteResolver.java │ │ │ │ ├── HessianSerializerInput.java │ │ │ │ ├── HessianSerializerOutput.java │ │ │ │ ├── HessianServiceException.java │ │ │ │ ├── IOExceptionWrapper.java │ │ │ │ ├── InetAddressHandle.java │ │ │ │ ├── InetAddressSerializer.java │ │ │ │ ├── InputStreamDeserializer.java │ │ │ │ ├── InputStreamSerializer.java │ │ │ │ ├── IteratorDeserializer.java │ │ │ │ ├── IteratorSerializer.java │ │ │ │ ├── JavaDeserializer.java │ │ │ │ ├── JavaSerializer.java │ │ │ │ ├── JavaUnsharedSerializer.java │ │ │ │ ├── LocaleHandle.java │ │ │ │ ├── LocaleSerializer.java │ │ │ │ ├── MapDeserializer.java │ │ │ │ ├── MapSerializer.java │ │ │ │ ├── ObjectDeserializer.java │ │ │ │ ├── ObjectHandleSerializer.java │ │ │ │ ├── ObjectNameDeserializer.java │ │ │ │ ├── ObjectSerializer.java │ │ │ │ ├── RemoteDeserializer.java │ │ │ │ ├── RemoteSerializer.java │ │ │ │ ├── Serializer.java │ │ │ │ ├── SerializerFactory.java │ │ │ │ ├── ShortHandle.java │ │ │ │ ├── SqlDateDeserializer.java │ │ │ │ ├── SqlDateSerializer.java │ │ │ │ ├── StackTraceElementDeserializer.java │ │ │ │ ├── StringValueDeserializer.java │ │ │ │ ├── StringValueSerializer.java │ │ │ │ ├── ThrowableSerializer.java │ │ │ │ ├── UnsafeDeserializer.java │ │ │ │ ├── UnsafeSerializer.java │ │ │ │ ├── UnsafeUnsharedSerializer.java │ │ │ │ ├── ValueDeserializer.java │ │ │ │ ├── WriteReplaceSerializer.java │ │ │ │ └── java8 │ │ │ │ │ ├── DurationHandle.java │ │ │ │ │ ├── InstantHandle.java │ │ │ │ │ ├── Java8TimeSerializer.java │ │ │ │ │ ├── Java8TimeWrapper.java │ │ │ │ │ ├── LocalDateHandle.java │ │ │ │ │ ├── LocalDateTimeHandle.java │ │ │ │ │ ├── LocalTimeHandle.java │ │ │ │ │ ├── MonthDayHandle.java │ │ │ │ │ ├── OffsetDateTimeHandle.java │ │ │ │ │ ├── OffsetTimeHandle.java │ │ │ │ │ ├── PeriodHandle.java │ │ │ │ │ ├── YearHandle.java │ │ │ │ │ ├── YearMonthHandle.java │ │ │ │ │ ├── ZoneIdHandle.java │ │ │ │ │ ├── ZoneOffsetHandle.java │ │ │ │ │ └── ZonedDateTimeHandle.java │ │ │ │ ├── package-info.java │ │ │ │ └── util │ │ │ │ ├── HessianFreeList.java │ │ │ │ ├── IdentityIntMap.java │ │ │ │ └── IntMap.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── permission │ │ │ └── serialization.whitelist │ │ │ └── services │ │ │ └── io.joyrpc.codec.serialization.Serialization │ ├── joyrpc-serialization-jackson │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── serialization │ │ │ │ └── jackson │ │ │ │ ├── AbstractDeserializer.java │ │ │ │ ├── BackupShardSerializer.java │ │ │ │ ├── CalendarDeserializer.java │ │ │ │ ├── InvocationDeserializer.java │ │ │ │ ├── InvocationSerializer.java │ │ │ │ ├── JacksonSerialization.java │ │ │ │ ├── ResponsePayloadDeserializer.java │ │ │ │ ├── ResponsePayloadSerializer.java │ │ │ │ ├── SimpleTypeReference.java │ │ │ │ ├── ThrowableDeserializer.java │ │ │ │ ├── ThrowableSerializer.java │ │ │ │ └── java8 │ │ │ │ ├── DurationDeserializer.java │ │ │ │ ├── DurationSerializer.java │ │ │ │ ├── InstantDeserializer.java │ │ │ │ ├── InstantSerializer.java │ │ │ │ ├── LocalDateDeserializer.java │ │ │ │ ├── LocalDateSerializer.java │ │ │ │ ├── LocalDateTimeDeserializer.java │ │ │ │ ├── LocalDateTimeSerializer.java │ │ │ │ ├── LocalTimeDeserializer.java │ │ │ │ ├── LocalTimeSerializer.java │ │ │ │ ├── MonthDayDeserializer.java │ │ │ │ ├── MonthDaySerializer.java │ │ │ │ ├── OffsetDateTimeDeserializer.java │ │ │ │ ├── OffsetDateTimeSerializer.java │ │ │ │ ├── OffsetTimeDeserializer.java │ │ │ │ ├── OffsetTimeSerializer.java │ │ │ │ ├── OptionalDeserializer.java │ │ │ │ ├── OptionalDoubleDeserializer.java │ │ │ │ ├── OptionalDoubleSerializer.java │ │ │ │ ├── OptionalIntDeserializer.java │ │ │ │ ├── OptionalIntSerializer.java │ │ │ │ ├── OptionalLongDeserializer.java │ │ │ │ ├── OptionalLongSerializer.java │ │ │ │ ├── OptionalSerializer.java │ │ │ │ ├── PeriodDeserializer.java │ │ │ │ ├── PeriodSerializer.java │ │ │ │ ├── YearDeserializer.java │ │ │ │ ├── YearMonthDeserializer.java │ │ │ │ ├── YearMonthSerializer.java │ │ │ │ ├── YearSerializer.java │ │ │ │ ├── ZoneIdDeserializer.java │ │ │ │ ├── ZoneIdSerializer.java │ │ │ │ ├── ZoneOffsetDeserializer.java │ │ │ │ ├── ZoneOffsetSerializer.java │ │ │ │ ├── ZonedDateTimeDeserializer.java │ │ │ │ └── ZonedDateTimeSerializer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.codec.serialization.Json │ │ │ └── io.joyrpc.codec.serialization.Serialization │ ├── joyrpc-serialization-kryo │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ ├── com │ │ │ │ └── esotericsoftware │ │ │ │ │ └── kryo │ │ │ │ │ └── AutowiredObjectSerializer.java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── codec │ │ │ │ └── serialization │ │ │ │ └── kryo │ │ │ │ ├── KryoReader.java │ │ │ │ ├── KryoSerialization.java │ │ │ │ └── KryoWriter.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.serialization.Serialization │ ├── joyrpc-serialization-protostuff │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ ├── joyrpc │ │ │ │ └── codec │ │ │ │ │ └── serialization │ │ │ │ │ └── protostuff │ │ │ │ │ ├── ProtoSerialization.java │ │ │ │ │ ├── ProtobufSerialization.java │ │ │ │ │ ├── ProtostuffSerialization.java │ │ │ │ │ └── schema │ │ │ │ │ ├── AbstractJava8Schema.java │ │ │ │ │ ├── AbstractSqlDateSchema.java │ │ │ │ │ ├── DurationSchema.java │ │ │ │ │ ├── InstantSchema.java │ │ │ │ │ ├── LocalDateSchema.java │ │ │ │ │ ├── LocalDateTimeSchema.java │ │ │ │ │ ├── LocalTimeSchema.java │ │ │ │ │ ├── LocaleSchema.java │ │ │ │ │ ├── MonthDaySchema.java │ │ │ │ │ ├── OffsetDateTimeSchema.java │ │ │ │ │ ├── OffsetTimeSchema.java │ │ │ │ │ ├── PeriodSchema.java │ │ │ │ │ ├── SqlDateSchema.java │ │ │ │ │ ├── SqlTimeSchema.java │ │ │ │ │ ├── SqlTimestampSchema.java │ │ │ │ │ ├── YearMonthSchema.java │ │ │ │ │ ├── YearSchema.java │ │ │ │ │ ├── ZoneIdSchema.java │ │ │ │ │ ├── ZoneOffsetSchema.java │ │ │ │ │ └── ZonedDateTimeSchema.java │ │ │ │ └── protostuff │ │ │ │ ├── AbstractProtostuffReader.java │ │ │ │ ├── AbstractProtostuffWriter.java │ │ │ │ ├── AutowiredObjectSerializer.java │ │ │ │ ├── ProtobufReader.java │ │ │ │ ├── ProtobufWriter.java │ │ │ │ ├── ProtostuffReader.java │ │ │ │ ├── ProtostuffWriter.java │ │ │ │ └── runtime │ │ │ │ └── RuntimeEnv.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.codec.serialization.Serialization │ └── pom.xml ├── joyrpc-expression │ ├── joyrpc-expression-jexl │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ ├── cache │ │ │ │ └── jexl │ │ │ │ │ └── JexlCacheKeyGenerator.java │ │ │ │ └── expression │ │ │ │ └── jexl │ │ │ │ └── JexlProvider.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.cache.CacheKeyGenerator │ │ │ └── io.joyrpc.expression.ExpressionProvider │ └── pom.xml ├── joyrpc-protocol │ ├── joyrpc-protocol-dubbo │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ ├── com │ │ │ │ └── alibaba │ │ │ │ │ └── com │ │ │ │ │ └── caucho │ │ │ │ │ └── hessian │ │ │ │ │ └── io │ │ │ │ │ └── java8 │ │ │ │ │ ├── DurationHandle.java │ │ │ │ │ ├── InstantHandle.java │ │ │ │ │ ├── Java8TimeSerializer.java │ │ │ │ │ ├── LocalDateHandle.java │ │ │ │ │ ├── LocalDateTimeHandle.java │ │ │ │ │ ├── LocalTimeHandle.java │ │ │ │ │ ├── MonthDayHandle.java │ │ │ │ │ ├── OffsetDateTimeHandle.java │ │ │ │ │ ├── OffsetTimeHandle.java │ │ │ │ │ ├── PeriodHandle.java │ │ │ │ │ ├── YearHandle.java │ │ │ │ │ ├── YearMonthHandle.java │ │ │ │ │ ├── ZoneIdHandle.java │ │ │ │ │ ├── ZoneIdSerializer.java │ │ │ │ │ ├── ZoneOffsetHandle.java │ │ │ │ │ └── ZonedDateTimeHandle.java │ │ │ ├── io │ │ │ │ └── joyrpc │ │ │ │ │ └── protocol │ │ │ │ │ └── dubbo │ │ │ │ │ ├── AbstractDubboProtocol.java │ │ │ │ │ ├── DubboClientProtocol.java │ │ │ │ │ ├── DubboServerProtocol.java │ │ │ │ │ ├── DubboStatus.java │ │ │ │ │ ├── DubboVersion.java │ │ │ │ │ ├── codec │ │ │ │ │ └── DubboCodec.java │ │ │ │ │ ├── message │ │ │ │ │ ├── DubboInvocation.java │ │ │ │ │ ├── DubboMessageHeader.java │ │ │ │ │ ├── DubboResponseErrorPayload.java │ │ │ │ │ └── DubboResponsePayload.java │ │ │ │ │ └── serialization │ │ │ │ │ ├── hessian2 │ │ │ │ │ ├── DubboHessian2Serialization.java │ │ │ │ │ └── DubboHessian2SerializerFactory.java │ │ │ │ │ └── protostuff │ │ │ │ │ ├── DubboProtostuffReader.java │ │ │ │ │ ├── DubboProtostuffSerialization.java │ │ │ │ │ ├── DubboProtostuffWriter.java │ │ │ │ │ └── delegate │ │ │ │ │ ├── SqlDateDelegate.java │ │ │ │ │ ├── TimeDelegate.java │ │ │ │ │ └── TimestampDelegate.java │ │ │ └── org │ │ │ │ └── apache │ │ │ │ └── dubbo │ │ │ │ └── common │ │ │ │ └── serialize │ │ │ │ └── protostuff │ │ │ │ └── Wrapper.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── permission │ │ │ └── serialization.whitelist │ │ │ └── services │ │ │ ├── io.joyrpc.codec.serialization.Serialization │ │ │ ├── io.joyrpc.protocol.ClientProtocol │ │ │ └── io.joyrpc.protocol.ServerProtocol │ ├── joyrpc-protocol-grpc │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── protocol │ │ │ │ └── grpc │ │ │ │ ├── GrpcClientProtocol.java │ │ │ │ ├── GrpcServerProtocol.java │ │ │ │ ├── HeaderMapping.java │ │ │ │ ├── Headers.java │ │ │ │ ├── exception │ │ │ │ └── GrpcBizException.java │ │ │ │ ├── handler │ │ │ │ ├── GrpcClientHandler.java │ │ │ │ ├── GrpcDecoder.java │ │ │ │ └── GrpcServerHandler.java │ │ │ │ └── message │ │ │ │ └── GrpcResponseMessage.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.protocol.ClientProtocol │ │ │ └── io.joyrpc.protocol.ServerProtocol │ ├── joyrpc-protocol-http │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── protocol │ │ │ │ └── http │ │ │ │ ├── ContentTypeHandler.java │ │ │ │ ├── HeaderMapping.java │ │ │ │ ├── HttpController.java │ │ │ │ ├── HttpResponse.java │ │ │ │ ├── HttpServerProtocol.java │ │ │ │ ├── Plugin.java │ │ │ │ ├── URLBinding.java │ │ │ │ ├── binding │ │ │ │ └── DefaultBinding.java │ │ │ │ ├── controller │ │ │ │ ├── DefaultHttpController.java │ │ │ │ └── FaviconController.java │ │ │ │ ├── handler │ │ │ │ ├── HttpToJoyHandler.java │ │ │ │ └── JoyToHttpHandler.java │ │ │ │ └── message │ │ │ │ ├── AbstractJsonResponseMessage.java │ │ │ │ ├── ErrorResponse.java │ │ │ │ └── JsonResponseMessage.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.protocol.ServerProtocol │ │ │ ├── io.joyrpc.protocol.http.HttpController │ │ │ └── io.joyrpc.protocol.http.URLBinding │ ├── joyrpc-protocol-jsonrpc │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── protocol │ │ │ │ └── jsonrpc │ │ │ │ ├── controller │ │ │ │ ├── JsonRpc0Controller.java │ │ │ │ └── JsonRpcController.java │ │ │ │ ├── exception │ │ │ │ └── JsonRpcCodecException.java │ │ │ │ └── message │ │ │ │ ├── JsonRpcError.java │ │ │ │ ├── JsonRpcRequest.java │ │ │ │ ├── JsonRpcResponse.java │ │ │ │ └── JsonRpcResponseMessage.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── permission │ │ │ └── serialization.whitelist │ │ │ └── services │ │ │ ├── io.joyrpc.protocol.http.ContentTypeHandler │ │ │ └── io.joyrpc.protocol.http.HttpController │ ├── joyrpc-protocol-telnet │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── protocol │ │ │ │ └── telnet │ │ │ │ ├── handler │ │ │ │ ├── AbstractTelnetHandler.java │ │ │ │ ├── BizThreadTelnetHandler.java │ │ │ │ ├── CheckTelnetHandler.java │ │ │ │ ├── ConfigTelnetHandler.java │ │ │ │ ├── InvokeTelnetHandler.java │ │ │ │ ├── JVMStatusTelnetHandler.java │ │ │ │ ├── ListTelnetHandler.java │ │ │ │ ├── PortTelnetHandler.java │ │ │ │ ├── ServiceInfoTelnetHandler.java │ │ │ │ ├── SudoTelnetHandler.java │ │ │ │ ├── VersionTelnetHandler.java │ │ │ │ └── WhitelistTelnetHandler.java │ │ │ │ └── util │ │ │ │ └── TelnetUtils.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.protocol.ServerProtocol │ │ │ └── io.joyrpc.transport.telnet.TelnetHandler │ └── pom.xml ├── joyrpc-proxy │ ├── joyrpc-proxy-bytebuddy │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── proxy │ │ │ │ └── bytebuddy │ │ │ │ ├── ByteBuddyIDLFactory.java │ │ │ │ ├── ByteBuddyInvocationHandler.java │ │ │ │ ├── ByteBuddyProxyFactory.java │ │ │ │ └── SimpleNamingStrategy.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.proxy.IDLFactory │ │ │ └── io.joyrpc.proxy.ProxyFactory │ ├── joyrpc-proxy-javassist │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── proxy │ │ │ │ └── javassist │ │ │ │ ├── JavassistIDLFactory.java │ │ │ │ └── JavassistProxyFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.proxy.IDLFactory │ │ │ └── io.joyrpc.proxy.ProxyFactory │ └── pom.xml ├── joyrpc-registry │ ├── joyrpc-registry-broadcast │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cluster │ │ │ │ └── discovery │ │ │ │ └── registry │ │ │ │ └── broadcast │ │ │ │ ├── BroadcastRegistry.java │ │ │ │ └── BroadcastRegistryFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cluster.discovery.registry.RegistryFactory │ ├── joyrpc-registry-consul │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cluster │ │ │ │ └── discovery │ │ │ │ └── registry │ │ │ │ └── consul │ │ │ │ ├── ConsulRegistry.java │ │ │ │ └── ConsulRegistryFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cluster.discovery.registry.RegistryFactory │ ├── joyrpc-registry-etcd │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cluster │ │ │ │ └── discovery │ │ │ │ └── registry │ │ │ │ └── etcd │ │ │ │ ├── EtcdRegistry.java │ │ │ │ └── EtcdRegistryFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cluster.discovery.registry.RegistryFactory │ ├── joyrpc-registry-nacos │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cluster │ │ │ │ └── discovery │ │ │ │ └── registry │ │ │ │ └── nacos │ │ │ │ ├── NacosRegistry.java │ │ │ │ ├── NacosRegistryFactory.java │ │ │ │ └── dubbo │ │ │ │ ├── DubboNacosRegistry.java │ │ │ │ └── DubboNacosRegistryFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cluster.discovery.registry.RegistryFactory │ ├── joyrpc-registry-zk │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── cluster │ │ │ │ └── discovery │ │ │ │ └── registry │ │ │ │ └── zk │ │ │ │ ├── ZKRegistry.java │ │ │ │ ├── ZKRegistryFactory.java │ │ │ │ └── ZookeeperRegistryFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.cluster.discovery.registry.RegistryFactory │ └── pom.xml ├── joyrpc-trace │ ├── joyrpc-trace-jaeger │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── apm │ │ │ │ └── trace │ │ │ │ └── jaeger │ │ │ │ └── JaegerTraceFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.apm.trace.TraceFactory │ ├── joyrpc-trace-pinpoint │ │ └── pom.xml │ ├── joyrpc-trace-skywalking │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── apm │ │ │ │ └── trace │ │ │ │ └── skywalking │ │ │ │ └── SkywalkingTraceFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.joyrpc.apm.trace.TraceFactory │ ├── joyrpc-trace-zipkin │ │ └── pom.xml │ └── pom.xml ├── joyrpc-transaction │ ├── joyrpc-transaction-hmily │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── transaction │ │ │ │ └── hmily │ │ │ │ ├── HmilyTransactionFactory.java │ │ │ │ ├── HmilyTransactionOption.java │ │ │ │ └── HmilyTransmit.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.context.io.joyrpc.invoker.injection.Transmit │ │ │ └── io.joyrpc.transaction.TransactionFactory │ ├── joyrpc-transaction-seata │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── transaction │ │ │ │ └── seata │ │ │ │ ├── SeataTransactionContext.java │ │ │ │ ├── SeataTransactionFactory.java │ │ │ │ └── SeataTransmit.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.context.io.joyrpc.invoker.injection.Transmit │ │ │ └── io.joyrpc.transaction.TransactionFactory │ └── pom.xml ├── joyrpc-transport │ ├── joyrpc-transport-netty4 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── transport │ │ │ │ └── netty4 │ │ │ │ ├── Plugin.java │ │ │ │ ├── buffer │ │ │ │ └── NettyChannelBuffer.java │ │ │ │ ├── channel │ │ │ │ ├── NettyChannel.java │ │ │ │ ├── NettyClientChannel.java │ │ │ │ ├── NettyContext.java │ │ │ │ └── NettyServerChannel.java │ │ │ │ ├── codec │ │ │ │ └── NettyDeductionContext.java │ │ │ │ ├── handler │ │ │ │ ├── ChannelChainReaderAdapter.java │ │ │ │ ├── ChannelChainWriterAdapter.java │ │ │ │ ├── ConnectionHandler.java │ │ │ │ ├── IdleHeartbeatHandler.java │ │ │ │ ├── LengthFieldMessageDecoder.java │ │ │ │ ├── MessageDecoder.java │ │ │ │ ├── MessageEncoder.java │ │ │ │ └── ProtocolDeductionHandler.java │ │ │ │ ├── http │ │ │ │ ├── HttpRequestNormalizer.java │ │ │ │ └── HttpResponseNormalizer.java │ │ │ │ ├── http2 │ │ │ │ ├── Http2ClientCodecHandler.java │ │ │ │ ├── Http2CodecContext.java │ │ │ │ ├── Http2DecodeContext.java │ │ │ │ ├── Http2EncodeContext.java │ │ │ │ ├── Http2NettyHeaders.java │ │ │ │ └── Http2ServerCodecHandler.java │ │ │ │ ├── pipeline │ │ │ │ ├── AbstractPipelineFactory.java │ │ │ │ ├── DefaultPipelineFactory.java │ │ │ │ ├── Http2PipelineFactory.java │ │ │ │ ├── HttpPipelineFactory.java │ │ │ │ ├── LengthFieldFramePipelineFactory.java │ │ │ │ └── PipelineFactory.java │ │ │ │ ├── ssl │ │ │ │ ├── SslContextManager.java │ │ │ │ └── SslServerHandshakeHandler.java │ │ │ │ ├── transport │ │ │ │ ├── BufAllocator.java │ │ │ │ ├── EventLoopGroupFactory.java │ │ │ │ ├── NettyClient.java │ │ │ │ ├── NettyFactory.java │ │ │ │ └── NettyServer.java │ │ │ │ └── util │ │ │ │ └── FutureAdapter.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.transport.TransportFactory │ │ │ └── io.joyrpc.transport.netty4.pipeline.PipelineFactory │ ├── joyrpc-transport-resteasy │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── io │ │ │ │ └── joyrpc │ │ │ │ └── transport │ │ │ │ └── resteasy │ │ │ │ ├── codec │ │ │ │ └── RestEasyCodec.java │ │ │ │ ├── handler │ │ │ │ └── RestEasyDispatcher.java │ │ │ │ ├── mapper │ │ │ │ ├── ApplicationExceptionMapper.java │ │ │ │ ├── ClientErrorExceptionMapper.java │ │ │ │ └── IllegalArgumentExceptionMapper.java │ │ │ │ ├── pipeline │ │ │ │ └── RestEasyPipelineFactory.java │ │ │ │ └── server │ │ │ │ ├── RestServer.java │ │ │ │ └── RestServerFactory.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.joyrpc.transport.EndpointFactory │ │ │ └── io.joyrpc.transport.netty4.pipeline.PipelineFactory │ └── pom.xml └── pom.xml ├── joyrpc-spring ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── joyrpc │ │ ├── cache │ │ └── spring │ │ │ └── SpelCacheKeyGenerator.java │ │ ├── expression │ │ └── spring │ │ │ └── SpelProvider.java │ │ └── spring │ │ ├── ConsumerBean.java │ │ ├── ConsumerGroupBean.java │ │ ├── ConsumerSpring.java │ │ ├── Counter.java │ │ ├── GlobalParameterBean.java │ │ ├── MethodBean.java │ │ ├── ProviderBean.java │ │ ├── RegistryBean.java │ │ ├── ServerBean.java │ │ ├── annotation │ │ └── Spring.java │ │ ├── context │ │ ├── SpringContextSupplier.java │ │ └── SpringEnvironmentSupplier.java │ │ ├── event │ │ ├── ConsumerDoneEvent.java │ │ ├── ContextDoneEvent.java │ │ └── ProviderDoneEvent.java │ │ ├── processor │ │ └── DependsOnDefinitionPostProcessor.java │ │ └── schema │ │ ├── AbstractBeanDefinitionParser.java │ │ ├── AbstractInterfaceBeanDefinitionParser.java │ │ ├── ConsumerBeanDefinitionParser.java │ │ ├── ConsumerGroupBeanDefinitionParser.java │ │ ├── GlobalParameterDefinitionParser.java │ │ ├── MethodBeanDefinitionParser.java │ │ ├── ProviderBeanDefinitionParser.java │ │ ├── RegistryBeanDefinitionParser.java │ │ ├── ServerBeanDefinitionParser.java │ │ └── SpringNamespaceHandler.java │ └── resources │ └── META-INF │ ├── joyrpc.xsd │ ├── services │ ├── io.joyrpc.cache.CacheKeyGenerator │ └── io.joyrpc.expression.ExpressionProvider │ ├── spring.handlers │ └── spring.schemas ├── joyrpc-springboot ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── joyrpc │ │ └── spring │ │ └── boot │ │ ├── Plugin.java │ │ ├── RpcAutoConfiguration.java │ │ ├── RpcDefinitionPostProcessor.java │ │ ├── RpcProperties.java │ │ └── annotation │ │ ├── AnnotationProvider.java │ │ └── DefaultAnnotationProvider.java │ └── resources │ └── META-INF │ ├── services │ └── io.joyrpc.spring.boot.annotation.AnnotationProvider │ ├── spring-configuration-metadata.json │ └── spring.factories ├── joyrpc-test ├── joyrpc-test-cache │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── cache │ │ └── CacheTest.java ├── joyrpc-test-cluster │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── cluster │ │ ├── candidate │ │ └── region │ │ │ └── RegionCandidatureTest.java │ │ └── discovery │ │ └── naming │ │ └── FixFixRegistarTest.java ├── joyrpc-test-compress │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── codec │ │ └── compression │ │ └── CompressionTest.java ├── joyrpc-test-extension │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── joyrpc │ │ │ └── extension │ │ │ ├── api │ │ │ ├── Consumer.java │ │ │ ├── Filter.java │ │ │ └── Producer.java │ │ │ ├── boot │ │ │ ├── ExtensionAutoConfiguration.java │ │ │ ├── MyConsumer3.java │ │ │ └── MyProducer1.java │ │ │ ├── consumer │ │ │ ├── MyConsumer.java │ │ │ ├── MyConsumer1.java │ │ │ └── MyConsumer2.java │ │ │ ├── filter │ │ │ ├── ConsumerFilter1.java │ │ │ ├── ConsumerFilter2.java │ │ │ ├── ConsumerFilter3.java │ │ │ ├── ConsumerFilter4.java │ │ │ └── ProcedureFilter1.java │ │ │ ├── producer │ │ │ └── MyProducer.java │ │ │ └── test │ │ │ ├── ExtensionManagerTest.java │ │ │ ├── SpringTest.java │ │ │ └── UrlTest.java │ │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── io.joyrpc.extension.api.Consumer │ │ │ ├── io.joyrpc.extension.api.Filter │ │ │ └── io.joyrpc.extension.api.Producer │ │ └── plugin.disable ├── joyrpc-test-proxy │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── proxy │ │ ├── HelloService.java │ │ └── ProxyFactoryTest.java ├── joyrpc-test-quickstart │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── example │ │ ├── ConsulConsumerStartTest.java │ │ ├── ConsulProviderStartTest.java │ │ ├── ConsumerStartTest.java │ │ ├── ProviderStartTest.java │ │ └── service │ │ ├── DemoService.java │ │ └── DemoServiceImpl.java ├── joyrpc-test-serialization │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── codec │ │ └── serialization │ │ ├── BackupTest.java │ │ ├── HelloGrpc.java │ │ ├── HelloWold.java │ │ ├── SerializationTest.java │ │ ├── exception │ │ └── NotFoundException.java │ │ └── model │ │ ├── AddressBook.java │ │ ├── Animal.java │ │ ├── Apple.java │ │ ├── ArrayObject.java │ │ ├── Employee.java │ │ ├── MyBook.java │ │ ├── MyEmployee.java │ │ ├── Person.java │ │ ├── PhoneNumber.java │ │ ├── PhoneType.java │ │ └── TransientObj.java ├── joyrpc-test-util │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── joyrpc │ │ └── util │ │ ├── ClassUtilsTest.java │ │ ├── GenericTest.java │ │ ├── TimerTest.java │ │ ├── model │ │ └── User.java │ │ └── network │ │ └── Ipv4Test.java └── pom.xml ├── license_config ├── apache_license │ ├── header.txt │ └── license.txt ├── descriptionTemplate.ftl └── licenses.properties └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .classpath 3 | .project 4 | .factorypath 5 | .settings/ 6 | .idea/ 7 | *.iml 8 | .DS_Store 9 | Thumbs.db 10 | dependency-reduced-pom.xml -------------------------------------------------------------------------------- /docs/cn/architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jd-opensource/joyrpc/ff7bbce76a5ba2542935707c0147a4c0008e3965/docs/cn/architecture.jpg -------------------------------------------------------------------------------- /docs/cn/example.md: -------------------------------------------------------------------------------- 1 | 使用示例 2 | == 3 | 4 | 1. [注册及订阅](./example/register.md) 5 | 2. [多注册中心](./example/multiRegistry.md) 6 | 3. [直连调用](./example/directInvoke.md) 7 | 4. [集群分发策略](./example/route.md) 8 | 5. [负载均衡](./example/loadbalance.md) 9 | 6. [泛化调用](./example/generic.md) 10 | 7. [超时时间](./example/timeout.md) 11 | 8. [隐式传参](./example/implicit.md) 12 | 9. [参数校验](./example/paramCheck.md) 13 | 10. [安全认证](./example/3a.md) 14 | 11. [调用压缩](./example/compress.md) 15 | 12. [暴露方法](./example/export.md) 16 | 13. [代理类配置](./example/proxy.md) 17 | 14. [延迟启动](./example/delayBoot.md) 18 | 15. [并发控制](./example/concurrency.md) 19 | 16. [异步调用](./example/asyncInvoke.md) 20 | 17. [数据包大小设置](./example/payload.md) 21 | 18. [预热接口](./example/warmup.md) 22 | 19. [分布式跟踪](./example/trace.md) 23 | 20. [熔断限流](./example/circuitBreaker.md) 24 | 21. [序列化白名单](./example/serialization_whitelist.md) 25 | 22. [HTTP调用](./example/http.md) 26 | -------------------------------------------------------------------------------- /docs/cn/example/compress.md: -------------------------------------------------------------------------------- 1 | 调用压缩 2 | == 3 | 在Consumer发送请求和Provider返回响应的时候,都可以开启调用压缩。 4 | 目前支持多种算法:lz4(默认)、snappy、lzma、zlib 5 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 6 | 7 | ### consumer设置 8 | 9 | 如果Consumer端配置了压缩,且请求的数据大于2048B,那么请求数据将被压缩后再发给Provider。 10 | 11 | ```xml 12 | 13 | 14 | 15 | ``` 16 | ### provider设置 17 | 18 | 如果Provider端配置了压缩,那么不管请求时是不是带压缩标识,返回响应的时候也都会检查数据大小,如果数据大小超过阈值,则将响应数据压缩后再发给Consumer。 19 | 20 | ```xml 21 | 22 | 23 | 24 | ``` 25 | 26 | **最佳实践**:请求数据大的客户端配置,响应数据大的服务端配置。 -------------------------------------------------------------------------------- /docs/cn/example/delayBoot.md: -------------------------------------------------------------------------------- 1 | 延迟启动 2 | == 3 | 服务发布的时候,spring在加载到 joyrpc:provider的时候默认会马上发布服务。 4 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 5 | 6 | 如果需要延迟一段时间再发布服务,可以通过如下配置实现: 7 | 8 | ```xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/cn/example/export.md: -------------------------------------------------------------------------------- 1 | 方法限制 2 | == 3 | 支持一个接口下只发布部分方法 4 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 5 | 6 | ### 1. XML方式 7 | 8 | 配置接口下的include白名单和exclude黑名单即可,多个方法用英文逗号隔开。 9 | 10 | ```xml 11 | 12 | 13 | 14 | ``` 15 | ### 2. API方式 16 | 17 | ```java 18 | providerConfig.setInclude("*"); 19 | providerConfig.setExclude("sayHello"); 20 | ``` 21 | 22 | ### 3. 注解方式 23 | 24 | 使用@Export注解来设置黑白名单 25 | 26 | ```java 27 | @Export(false) 28 | public String sayHello(String str) { 29 | return str; 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /docs/cn/example/loadbalance.md: -------------------------------------------------------------------------------- 1 | 负载均衡 2 | == 3 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 4 | 5 | 在Consumer调用,会对服务列表进行软负载,配置如下: 6 | 7 | ````xml 8 | 9 | 10 | 11 | ```` 12 | 13 | 参数说明 14 | 15 | | 参数 | 名称 | 类型 | 默认值 | 说明 | 16 | | :----: | :---- | :---- |:---- |:---- | 17 | | loadbalance | 负载均衡算法 | String | randomWeight | 1.randomWeight:加权随机负载均衡,会根据服务节点权重进行负载
2.adaptive:自适应负载均衡,会根据服务端承受能力来进行动态负载
3.roundRobin:轮询算法 18 | | sticky | 粘连算法 | Boolean | false | 配合指定的loadbalance算法,尽量保持同一个目标地址。
目标地址下线或出了异常再进行切换 | -------------------------------------------------------------------------------- /docs/cn/example/payload.md: -------------------------------------------------------------------------------- 1 | 数据包大小设置 2 | == 3 | 默认数据包大小为8M,即服务的请求和返回值序列化后默认不超过8M,要不然数据接收方会丢弃此数据。 4 | 数据较大,建议开启调用压缩,如果压缩后数据还大,可以进行自定义数据包配置。 5 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 6 | 7 | - 1. 如果请求值数据较大,则服务提供者进行配置。 8 | 9 | - 2. 如果是返回值数据较大,则服务调用者进行配置。 10 | 11 | ```xml 12 | 13 | 14 | 15 | 16 | 17 | ``` -------------------------------------------------------------------------------- /docs/cn/example/proxy.md: -------------------------------------------------------------------------------- 1 | 代理类配置 2 | == 3 | 支持bytebuddy(默认)、javassist、jdk 三种代理类生成方式。 4 | 主要作用就是在调用端拦截下业务代码的本地调用,转为调用远程服务端。可通过配置进行设置。 5 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 6 | 7 | 8 | ```xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ``` -------------------------------------------------------------------------------- /docs/cn/example/register.md: -------------------------------------------------------------------------------- 1 | 注册&订阅 2 | == 3 | 4 | 1.注册同订阅互相独立、不互斥、不依赖,任意一个设置为true,则同注册中心建立长连接;两个均是false时,同注册中心不创建长连接。 5 | 6 | 2.在启动Provider时候,会自动去指定注册中心注册一条Provider信息,同时订阅接口配置。 7 | 8 | >说明:下面示例中采用 **``** 标签 表示 JOYRPC 中的schema。 9 | 10 | - 默认配置 11 | 12 | >默认所有provider及consumer均开启注册及订阅; 13 | 14 | ```xml 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ``` 26 | 27 | - 不注册及不订阅 28 | 29 | >(不推荐)可以通过如下配置实现不注册和不订阅。通常用于直连场景或线下调试。 30 | 31 | ```xml 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | ``` -------------------------------------------------------------------------------- /docs/cn/example/serialization_whitelist.md: -------------------------------------------------------------------------------- 1 | 序列化白名单 2 | == 3 | 4 | 增对目前序列化漏洞频发的情况,默认启用了反序列化白名单 5 | 6 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 7 | 8 | ## 1 序列化白名单组成 9 | 10 | ### 1.1 白名单文件 11 | 12 | #### 1.1.1 系统内置的白名单文件 13 | 14 | 定义在"META-INF/permission/serialization.whitelist"中 15 | 16 | 包括java的常用类型和joyrpc自带的数据类型 17 | 18 | ```text 19 | #### java 20 | ## 21 | int 22 | byte 23 | short 24 | long 25 | float 26 | double 27 | boolean 28 | char 29 | void 30 | java.lang.Integer 31 | java.lang.Byte 32 | java.lang.Short 33 | ...... 34 | ``` 35 | 36 | #### 1.1.2 用户定义的白名单文件 37 | 38 | 定义在classpath的"permission/serialization.whitelist"中 39 | 40 | ### 1.2 自动扫描接口类 41 | 42 | 获取方法参数、返回值涉及的类型,如果该类型是复杂的对象类型,则会递归扫描其能序列化的字段类型。 43 | 44 | 会根据泛型类型来自动识别泛型变量 45 | 46 | ### 1.3 枚举类型 47 | 48 | 枚举类型默认进入白名单 49 | 50 | ### 1.4 异常 51 | 52 | 异常类型默认进入白名单 53 | 54 | ## 2 序列化白名单开关 55 | 56 | 默认启用了序列化白名单,可以通过如下开关来进行关闭 57 | 58 | 在环境变量、JVM参数、全局参数或Springboot应用中的配置项设置参数如下 59 | 60 | ```properties 61 | serializer.whitelist.enabled=false 62 | ``` 63 | -------------------------------------------------------------------------------- /docs/cn/example/timeout.md: -------------------------------------------------------------------------------- 1 | 超时时间 2 | == 3 | 通常设置在Consumer端,可以指定接口级别,方法级别。 4 | >说明:下面示例中采用 **``** 标签 表示JOYRPC中的schema。 5 | 6 | 超时时间单位为ms(毫秒) 7 | 8 | ### 接口级别设置 9 | ```xml 10 | 11 | 12 | 13 | 14 | ``` 15 | 16 | ### 方法级别设置 17 | ```xml 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ``` 28 | 29 | ### 请求级别设置 30 | ```java 31 | 32 | RequestContext.setAttachment("timeout",7000); 33 | 34 | ``` 35 | -------------------------------------------------------------------------------- /docs/cn/qa.md: -------------------------------------------------------------------------------- 1 | 常见问题 2 | === 3 | 4 | Q: JOYRPC 内部是用 Zookeeper 作为注册中心的吗?可以集成其它 ETCD 等注册中心吗? 5 | 6 | > JOYRPC 的注册中心模块是可扩展的,对内对外使用的都是一套核心接口。目前开源的版本中集成了 Zookeeper、ETCD,Hazelcast,其它的注册中心实现社区已经在集成中。 7 | 8 | Q: IPV6支持? 9 | 10 | > 根据当前jvm虚拟机的参数来选用IPV4或IPV6,在支持IPV6的机器上,可以配置系统参数java.net.forceIPv6Stack=true来强制使用IPV6,便于进行调试,系统内置的广播模式服务发现已经支持IPV6。 11 | 12 | Q: 分布式事务支持? 13 | 14 | > 支持Seata分布式事务 15 | 16 | Q: 指定网卡支持? 17 | 18 | > 当存在多个网卡的情况下,可以配置系统参数LOCAL_NIC={网卡名称}来强制使用IPV6可以通过设置 19 | -------------------------------------------------------------------------------- /joyrpc-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-api 13 | jar 14 | 15 | -------------------------------------------------------------------------------- /joyrpc-api/src/main/java/io/joyrpc/annotation/CallbackArg.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.annotation; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | import java.lang.annotation.*; 25 | 26 | import static java.lang.annotation.ElementType.PARAMETER; 27 | 28 | /** 29 | * 回调参数注解 30 | */ 31 | @Documented 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(PARAMETER) 34 | @Inherited 35 | public @interface CallbackArg { 36 | 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/Callback.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 回调函数,保持兼容 25 | */ 26 | @FunctionalInterface 27 | public interface Callback extends CallbackListener { 28 | 29 | /** 30 | * 回调通知 31 | * 32 | * @param result 通知对象 33 | * @return 返回值对象 34 | */ 35 | S notify(Q result); 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/apm/health/Doctor.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.apm.health; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extensible; 24 | 25 | /** 26 | * 健康诊断 27 | */ 28 | @Extensible("doctor") 29 | public interface Doctor { 30 | 31 | /** 32 | * 诊断,期望毫秒级返回结果 33 | * 34 | * @return 35 | */ 36 | HealthState diagnose(); 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/apm/metric/DashboardAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.apm.metric; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 感知面板 25 | */ 26 | public interface DashboardAware { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/apm/metric/Metric.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.apm.metric; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 指标抽象接口 25 | */ 26 | public interface Metric { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/ClusterAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 感知集群 25 | */ 26 | public interface ClusterAware { 27 | 28 | /** 29 | * 设置集群 30 | * 31 | * @param cluster 32 | */ 33 | void setCluster(Cluster cluster); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/MetricHandler.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.cluster.event.MetricEvent; 24 | import io.joyrpc.event.EventHandler; 25 | import io.joyrpc.extension.Extensible; 26 | 27 | /** 28 | * 指标处理器,用于插件加载 29 | */ 30 | @FunctionalInterface 31 | @Extensible("metricHandler") 32 | public interface MetricHandler extends EventHandler { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/Weighter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 权重 25 | */ 26 | public interface Weighter { 27 | 28 | /** 29 | * 获取权重 30 | * 31 | * @return 32 | */ 33 | int getWeight(); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/discovery/config/ConfigHandler.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.discovery.config; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.cluster.event.ConfigEvent; 24 | import io.joyrpc.event.EventHandler; 25 | 26 | /** 27 | * 配置处理器 28 | */ 29 | @FunctionalInterface 30 | public interface ConfigHandler extends EventHandler { 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/discovery/naming/ClusterHandler.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.discovery.naming; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.cluster.event.ClusterEvent; 24 | import io.joyrpc.event.EventHandler; 25 | 26 | /** 27 | * 集群处理器 28 | */ 29 | public interface ClusterHandler extends EventHandler { 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/distribution/ExceptionPolicy.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.distribution; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 异常策略 25 | */ 26 | public interface ExceptionPolicy extends ExceptionPredication { 27 | 28 | /** 29 | * 异常是否要重试 30 | * 31 | * @param throwable 异常 32 | * @return 重试标识 33 | */ 34 | boolean test(Throwable throwable); 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/distribution/ExceptionPredication.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.distribution; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extensible; 24 | 25 | import java.util.function.Predicate; 26 | 27 | /** 28 | * 异常判断 29 | */ 30 | @Extensible("exceptionPredication") 31 | public interface ExceptionPredication extends Predicate { 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/distribution/loadbalance/adaptive/MetricAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.distribution.loadbalance.adaptive; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 感知指标 25 | */ 26 | public interface MetricAware { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/distribution/selector/method/MethodRouter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.distribution.selector.method; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * 基于方法的条件路由,兼容原有的参数配置 27 | */ 28 | @Extension(value = "methodRouter") 29 | @Deprecated 30 | public class MethodRouter extends MethodSelector { 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/cluster/distribution/selector/tag/TagRouter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cluster.distribution.selector.tag; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | @Extension(value = "tagRouter") 26 | @Deprecated 27 | public class TagRouter extends TagSelector { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/CodecType.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 返回类型 25 | */ 26 | public interface CodecType { 27 | 28 | /** 29 | * 获取类型ID 30 | * 31 | * @return 32 | */ 33 | byte getTypeId(); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/compression/Finishable.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.compression; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | /** 26 | * 完成 27 | */ 28 | public interface Finishable { 29 | 30 | /** 31 | * 完成,但是不关闭输出流 32 | * 33 | * @throws IOException 34 | */ 35 | void finish() throws IOException; 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/Crypto.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 加解密算法 25 | * 用在安全认证场景 26 | */ 27 | public interface Crypto extends Encryptor, Decryptor { 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/hmac/HmacMD5Signature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.hmac; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * HmacMD5加密 27 | */ 28 | @Extension("HmacMD5") 29 | public class HmacMD5Signature extends HmacSignature { 30 | 31 | public HmacMD5Signature() { 32 | super("HmacMD5"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/hmac/HmacSHA1Signature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.hmac; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * HmacSHA1加密 27 | */ 28 | @Extension("HmacSHA1") 29 | public class HmacSHA1Signature extends HmacSignature { 30 | 31 | public HmacSHA1Signature() { 32 | super("HmacSHA1"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/hmac/HmacSHA256Signature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.hmac; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * HmacSHA256加密 27 | */ 28 | @Extension("HmacSHA256") 29 | public class HmacSHA256Signature extends HmacSignature { 30 | 31 | public HmacSHA256Signature() { 32 | super("HmacSHA256"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/hmac/HmacSHA384Signature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.hmac; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * HmacSHA384加密 27 | */ 28 | @Extension("HmacSHA384") 29 | public class HmacSHA384Signature extends HmacSignature { 30 | 31 | public HmacSHA384Signature() { 32 | super("HmacSHA384"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/hmac/HmacSHA512Signature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.hmac; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * HmacSHA512加密 27 | */ 28 | @Extension("HmacSHA512") 29 | public class HmacSHA512Signature extends HmacSignature { 30 | 31 | public HmacSHA512Signature() { 32 | super("HmacSHA512"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/MD2WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * MD2WithRSA加密 27 | */ 28 | @Extension("MD2WithRSA") 29 | public class MD2WithRSASignature extends RSASignature { 30 | 31 | public MD2WithRSASignature() { 32 | super("MD2WithRSA"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/MD5WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * MD5WithRSA加密 27 | */ 28 | @Extension("MD5WithRSA") 29 | public class MD5WithRSASignature extends RSASignature { 30 | 31 | public MD5WithRSASignature() { 32 | super("MD5WithRSA"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/SHA1WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * SHA1WithRSA加密 27 | */ 28 | @Extension("SHA1WithRSA") 29 | public class SHA1WithRSASignature extends RSASignature { 30 | 31 | public SHA1WithRSASignature() { 32 | super("SHA1WithRSA"); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/SHA256WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * SHA256WithRSA加密 27 | */ 28 | @Extension("SHA256WithRSA") 29 | public class SHA256WithRSASignature extends RSASignature { 30 | 31 | public SHA256WithRSASignature() { 32 | super("SHA256WithRSA"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/SHA384WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * SHA384WithRSA加密 27 | */ 28 | @Extension("SHA384WithRSA") 29 | public class SHA384WithRSASignature extends RSASignature { 30 | 31 | public SHA384WithRSASignature() { 32 | super("SHA384WithRSA"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/codec/crypto/rsa/SHA512WithRSASignature.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.crypto.rsa; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * SHA512WithRSA加密 27 | */ 28 | @Extension("SHA512WithRSA") 29 | public class SHA512WithRSASignature extends RSASignature { 30 | 31 | public SHA512WithRSASignature() { 32 | super("SHA512WithRSA"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/config/ConfigAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.config; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | /** 6 | * 感知配置 7 | */ 8 | public interface ConfigAware { 9 | 10 | /** 11 | * 构建 12 | * 13 | * @param config 14 | * @return 15 | */ 16 | CompletableFuture setup(AbstractInterfaceConfig config); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/context/ContextSupplier.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.context; 2 | 3 | /** 4 | * 全局上下文提供者 5 | */ 6 | public interface ContextSupplier { 7 | 8 | int CONTEXT_ORDER = 100; 9 | 10 | int SPRING_ORDER = CONTEXT_ORDER + 10; 11 | 12 | /** 13 | * 识别上下文 14 | * 15 | * @param key 16 | * @return 17 | */ 18 | Object recognize(String key); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/context/EnvironmentAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.context; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 环境感知 25 | */ 26 | public interface EnvironmentAware { 27 | 28 | /** 29 | * 设置环境 30 | * 31 | * @param environment 32 | */ 33 | void setup(Environment environment); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/event/Event.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.event; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 统一事件接口 25 | * 26 | * @date: 2019/2/22 27 | */ 28 | public interface Event { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/event/Recipient.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.event; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 指定监听器 25 | */ 26 | public interface Recipient { 27 | 28 | /** 29 | * 返回接收该事件的监听器 30 | * 31 | * @return 32 | */ 33 | Object getTarget(); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/exception/CircuitBreakerException.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.exception; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 熔断异常 25 | */ 26 | public class CircuitBreakerException extends LafException { 27 | 28 | 29 | private static final long serialVersionUID = -4729467364942141774L; 30 | 31 | public CircuitBreakerException(String msg) { 32 | super(msg, null, false, false, null, false); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/exception/ReconnectException.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.exception; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 重连异常,超过了重试次数 25 | */ 26 | public class ReconnectException extends ConnectionException { 27 | 28 | public ReconnectException() { 29 | super(null, null, false, false, null, false); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/expression/Expression.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.expression; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.util.Map; 24 | 25 | /** 26 | * 表达式接口 27 | */ 28 | public interface Expression { 29 | 30 | /** 31 | * 表达式计算 32 | * 33 | * @param context 上下文 34 | * @return 计算结果 35 | */ 36 | Object evaluate(Map context); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/filter/AbstractConsumerFilter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 抽象的消费者 25 | */ 26 | public abstract class AbstractConsumerFilter extends AbstractFilter implements ConsumerFilter { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/filter/AbstractProviderFilter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 抽象的服务提供者过滤器 25 | */ 26 | public abstract class AbstractProviderFilter extends AbstractFilter implements ProviderFilter { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/invoker/event/ExporterEvent.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.invoker.event; 2 | 3 | import io.joyrpc.event.Event; 4 | import io.joyrpc.invoker.Exporter; 5 | 6 | /** 7 | * 事件 8 | */ 9 | public class ExporterEvent implements Event { 10 | /** 11 | * 事件类型 12 | */ 13 | protected EventType type; 14 | /** 15 | * 名称 16 | */ 17 | protected String name; 18 | /** 19 | * 调用器 20 | */ 21 | protected Exporter exporter; 22 | 23 | public ExporterEvent(EventType type, String name, Exporter exporter) { 24 | this.type = type; 25 | this.name = name; 26 | this.exporter = exporter; 27 | } 28 | 29 | public EventType getType() { 30 | return type; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public Exporter getExporter() { 38 | return exporter; 39 | } 40 | 41 | /** 42 | * 事件类型 43 | */ 44 | public enum EventType { 45 | INITIAL, 46 | OPEN, 47 | CLOSE 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/invoker/injection/RetryInjection.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.invoker.injection; 2 | 3 | import io.joyrpc.cluster.Node; 4 | import io.joyrpc.invoker.injection.NodeReqInjection; 5 | import io.joyrpc.extension.Extension; 6 | import io.joyrpc.protocol.message.Invocation; 7 | import io.joyrpc.protocol.message.RequestMessage; 8 | 9 | import static io.joyrpc.constants.Constants.INTERNAL_KEY_RETRY_TIMES; 10 | 11 | /** 12 | * 重试次数注入 13 | */ 14 | @Extension("retry") 15 | public class RetryInjection implements NodeReqInjection { 16 | @Override 17 | public boolean test() { 18 | return true; 19 | } 20 | 21 | @Override 22 | public void inject(final RequestMessage request, final Node node) { 23 | int retryTimes = request.getRetryTimes(); 24 | if (retryTimes > 0) { 25 | Invocation invocation = request.getPayLoad(); 26 | invocation.addAttachment(INTERNAL_KEY_RETRY_TIMES, retryTimes); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/permission/BlackWhiteList.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.permission; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 黑白名单接口 25 | */ 26 | public interface BlackWhiteList extends BlackList, WhiteList { 27 | 28 | /** 29 | * 是否有效 30 | * 31 | * @return 32 | */ 33 | boolean isValid(T target); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/MessageHandler.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.protocol.message.Message; 24 | 25 | /** 26 | * 消息处理器 27 | */ 28 | public interface MessageHandler extends io.joyrpc.transport.MessageHandler { 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/message/HeartbeatAware.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.message; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 感知心跳,心跳应答实现该接口,会对外进行广播。适用于心跳带有业务逻辑的情况 25 | */ 26 | public interface HeartbeatAware { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/message/Message.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.message; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 消息接口 25 | * 26 | * @param 27 | */ 28 | public interface Message extends io.joyrpc.transport.message.Message { 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/message/Request.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.message; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * 请求对象 27 | */ 28 | public interface Request extends Serializable { 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/message/Response.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.message; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * 响应 27 | */ 28 | public interface Response extends Serializable { 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/protocol/message/session/Sessionbeat.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.message.session; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.protocol.message.Request; 24 | 25 | /** 26 | * 会话心跳 27 | */ 28 | public class Sessionbeat implements Request { 29 | private static final long serialVersionUID = 5405048481403366627L; 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transaction/TransactionContext.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transaction; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 事务上下文 25 | */ 26 | public interface TransactionContext { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transaction/TransactionFactory.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transaction; 2 | 3 | import io.joyrpc.extension.Extensible; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | /** 8 | * 事务提供者 9 | */ 10 | @Extensible("transaction") 11 | public interface TransactionFactory { 12 | 13 | /** 14 | * 构建事务选项 15 | * 16 | * @param clazz 类 17 | * @param method 方法 18 | * @return 事务选项 19 | */ 20 | TransactionOption create(final Class clazz, final Method method); 21 | } 22 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transaction/TransactionOption.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transaction; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 事务选项 25 | */ 26 | public interface TransactionOption { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/Client.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | /** 25 | * 客户端 26 | */ 27 | public interface Client extends TransportClient { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/Server.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 服务接口 25 | */ 26 | public interface Server extends TransportServer { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/channel/ChannelOperator.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.channel; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 连接通道操作 25 | */ 26 | public interface ChannelOperator extends ChannelReader, ChannelWriter { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/codec/Codec.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.codec; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 编解码 25 | */ 26 | public interface Codec extends Decoder, Encoder { 27 | 28 | /** 29 | * 管道工程,用于绑定具体的编解码到网络框架 30 | * 31 | * @return 绑定器名称 32 | */ 33 | default String pipeline() { 34 | return "default"; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/codec/DecodeContext.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.codec; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | /** 25 | * 解码上下文 26 | */ 27 | public interface DecodeContext extends CodecContext { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/codec/EncodeContext.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.codec; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | /** 25 | * 编码上下文 26 | */ 27 | public interface EncodeContext extends CodecContext { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/codec/FixedLengthCodec.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.codec; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 固定长度编解码 25 | */ 26 | public interface FixedLengthCodec extends Codec { 27 | 28 | /** 29 | * 获取一条消息数据的长度 30 | * 31 | * @return 32 | */ 33 | int getLength(); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/event/TransportEvent.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.event; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.event.Event; 24 | 25 | /** 26 | * @date: 2019/2/22 27 | */ 28 | public interface TransportEvent extends Event { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/heartbeat/HeartbeatTrigger.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.heartbeat; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 心跳触发器 25 | */ 26 | public interface HeartbeatTrigger extends Runnable { 27 | 28 | /** 29 | * 返回心跳策略 30 | * 31 | * @return 32 | */ 33 | HeartbeatStrategy strategy(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/http/HttpMessage.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.http; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * http消息 25 | */ 26 | public interface HttpMessage { 27 | 28 | HttpHeaders headers(); 29 | 30 | //TODO 为啥使用Buffer来进行读取 31 | byte[] content(); 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/http/HttpMethod.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.http; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * http方法 25 | */ 26 | public enum HttpMethod { 27 | OPTIONS, 28 | GET, 29 | HEAD, 30 | POST, 31 | PUT, 32 | DELETE, 33 | TRACE, 34 | CONNECT, 35 | PATCH, 36 | OTHER 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/http2/Http2RequestMessage.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.http2; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * http2请求消息 25 | */ 26 | public interface Http2RequestMessage extends Http2Message { 27 | 28 | /** 29 | * 设置流ID 30 | * 31 | * @param streamId 流ID 32 | */ 33 | void setStreamId(int streamId); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/transport/http2/Http2ResponseMessage.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.transport.http2; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * http2应答消息 25 | */ 26 | public interface Http2ResponseMessage extends Http2Message { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/util/IDLConversion.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.util; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 接口描述语言参数转换接口 25 | */ 26 | public interface IDLConversion { 27 | 28 | /** 29 | * 把字段转换成参数数组 30 | * 31 | * @return 方法参数 32 | */ 33 | Object[] toArgs(); 34 | 35 | /** 36 | * 根据参数设置字段 37 | * 38 | * @param args 参数 39 | */ 40 | void toFields(Object[] args); 41 | } 42 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/java/io/joyrpc/util/network/IpType.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.util.network; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * IP类型 25 | */ 26 | public enum IpType { 27 | /** 28 | * IPV6地址 29 | */ 30 | IPV6, 31 | /** 32 | * IPV4地址 33 | */ 34 | IPV4, 35 | /** 36 | * 混合模式 37 | */ 38 | MIXER 39 | } 40 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.GroupInvoker: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.group.ParameterGroupInvoker 2 | io.joyrpc.invoker.group.FailoverGroupInvoker -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.apm.metric.DashboardFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.apm.metric.mc.McDashboardFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cache.CacheFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.map.MapCacheFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cache.CacheKeyGenerator: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.json.JSONCacheKeyGenerator -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.candidate.Candidature: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.candidate.all.AllCandidature 2 | io.joyrpc.cluster.candidate.region.RegionCandidature 3 | io.joyrpc.cluster.candidate.single.SingleCandidature -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.fix.FixRegistryFactory 2 | io.joyrpc.cluster.discovery.registry.memory.MemoryRegistryFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.FailoverSelector: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.router.failover.simple.SimpleFailoverSelector -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.LoadBalance: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.loadbalance.adaptive.AdaptiveLoadBalance 2 | io.joyrpc.cluster.distribution.loadbalance.randomweight.RandomWeightLoadBalance 3 | io.joyrpc.cluster.distribution.loadbalance.roundrobin.RoundRobinLoadBalance -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.NodeSelector: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.selector.method.MethodSelector 2 | io.joyrpc.cluster.distribution.selector.method.MethodRouter 3 | io.joyrpc.cluster.distribution.selector.tag.TagSelector 4 | io.joyrpc.cluster.distribution.selector.tag.TagRouter 5 | io.joyrpc.cluster.distribution.selector.simple.SimpleSelector 6 | io.joyrpc.cluster.distribution.selector.none.NoneSelector -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.RateLimiter: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.limiter.LeakyBucketRateLimiter -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.Router: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.router.failfast.FailfastRouter 2 | io.joyrpc.cluster.distribution.router.failover.FailoverRouter 3 | io.joyrpc.cluster.distribution.router.pinpoint.PinPointRouter 4 | io.joyrpc.cluster.distribution.router.broadcast.BroadcastRouter 5 | io.joyrpc.cluster.distribution.router.forking.ForkingRouter -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.loadbalance.adaptive.Arbiter: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.loadbalance.adaptive.arbiter.OverallArbiter 2 | io.joyrpc.cluster.distribution.loadbalance.adaptive.arbiter.WeightArbiter -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.loadbalance.adaptive.Election: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.loadbalance.adaptive.election.RandomWeightElection -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.distribution.loadbalance.adaptive.Judge: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.distribution.loadbalance.adaptive.judge.ConcurrencyLimitJudge 2 | io.joyrpc.cluster.distribution.loadbalance.adaptive.judge.QpsLimitJudge 3 | io.joyrpc.cluster.distribution.loadbalance.adaptive.judge.ServerStatusJudge 4 | io.joyrpc.cluster.distribution.loadbalance.adaptive.judge.TpLimitJudge 5 | io.joyrpc.cluster.distribution.loadbalance.adaptive.judge.ZoneAwareJudge -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.cluster.filter.NodeFilter: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.filter.ProtocolFilter 2 | io.joyrpc.cluster.filter.SslFilter -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.checksum.Checksum: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.checksum.crc32.NativeCrc32Checksum 2 | io.joyrpc.codec.checksum.crc32.Crc32CChecksum 3 | io.joyrpc.codec.checksum.none.NoneChecksum -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.compression.Compression: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.compression.zlib.ZlibCompression 2 | io.joyrpc.codec.compression.gzip.GzipCompression 3 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.crypto.Decryptor: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.crypto.aes.AesCrypto 2 | io.joyrpc.codec.crypto.des.DesCrypto 3 | io.joyrpc.codec.crypto.tripledes.TripleDesCrypto -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.crypto.Encryptor: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.crypto.aes.AesCrypto 2 | io.joyrpc.codec.crypto.des.DesCrypto 3 | io.joyrpc.codec.crypto.tripledes.TripleDesCrypto 4 | io.joyrpc.codec.crypto.hmac.HmacSignature 5 | io.joyrpc.codec.crypto.hmac.HmacMD5Signature 6 | io.joyrpc.codec.crypto.hmac.HmacSHA1Signature 7 | io.joyrpc.codec.crypto.hmac.HmacSHA256Signature 8 | io.joyrpc.codec.crypto.hmac.HmacSHA384Signature 9 | io.joyrpc.codec.crypto.hmac.HmacSHA512Signature 10 | io.joyrpc.codec.crypto.rsa.MD2WithRSASignature 11 | io.joyrpc.codec.crypto.rsa.MD5andSHA1WithRSASignature 12 | io.joyrpc.codec.crypto.rsa.MD5WithRSASignature 13 | io.joyrpc.codec.crypto.rsa.NONEWithRSASignature 14 | io.joyrpc.codec.crypto.rsa.RSASignature 15 | io.joyrpc.codec.crypto.rsa.SHA1WithRSASignature 16 | io.joyrpc.codec.crypto.rsa.SHA256WithRSASignature 17 | io.joyrpc.codec.crypto.rsa.SHA384WithRSASignature 18 | io.joyrpc.codec.crypto.rsa.SHA512WithRSASignature -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.crypto.Signature: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.crypto.hmac.HmacSignature 2 | io.joyrpc.codec.crypto.hmac.HmacMD5Signature 3 | io.joyrpc.codec.crypto.hmac.HmacSHA1Signature 4 | io.joyrpc.codec.crypto.hmac.HmacSHA256Signature 5 | io.joyrpc.codec.crypto.hmac.HmacSHA384Signature 6 | io.joyrpc.codec.crypto.hmac.HmacSHA512Signature 7 | io.joyrpc.codec.crypto.rsa.MD2WithRSASignature 8 | io.joyrpc.codec.crypto.rsa.MD5andSHA1WithRSASignature 9 | io.joyrpc.codec.crypto.rsa.MD5WithRSASignature 10 | io.joyrpc.codec.crypto.rsa.NONEWithRSASignature 11 | io.joyrpc.codec.crypto.rsa.RSASignature 12 | io.joyrpc.codec.crypto.rsa.SHA1WithRSASignature 13 | io.joyrpc.codec.crypto.rsa.SHA256WithRSASignature 14 | io.joyrpc.codec.crypto.rsa.SHA384WithRSASignature 15 | io.joyrpc.codec.crypto.rsa.SHA512WithRSASignature -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.digester.Digester: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.digester.md5.Md5Digester -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.GenericSerializer: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.generic.JsonGenericSerializer 2 | io.joyrpc.codec.serialization.generic.StandardGenericSerializer -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.java.JavaSerialization 2 | io.joyrpc.codec.serialization.java.AdvanceJavaSerialization 3 | io.joyrpc.codec.serialization.jaxb.JaxbSerialization -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.config.Warmup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jd-opensource/joyrpc/ff7bbce76a5ba2542935707c0147a4c0008e3965/joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.config.Warmup -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.config.validator.InterfaceValidator: -------------------------------------------------------------------------------- 1 | io.joyrpc.config.validator.standard.StandardValidator -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.context.ConfigEventHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.context.adaptive.AdaptiveConfigHandler 2 | io.joyrpc.context.auth.IPPermissionConfigHandler 3 | io.joyrpc.context.circuitbreaker.BreakerConfigHandler 4 | io.joyrpc.context.global.GlobalConfigHandler 5 | io.joyrpc.context.limiter.LimiterConfigHandler 6 | io.joyrpc.context.mock.MockConfigHandler 7 | io.joyrpc.context.router.GroupRouterConfigHandler 8 | io.joyrpc.context.router.SelectorConfigHandler 9 | io.joyrpc.context.circuit.CircuitConfigHandler 10 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.context.ContextSupplier: -------------------------------------------------------------------------------- 1 | io.joyrpc.context.EnvironmentContextSupplier -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.context.Environment: -------------------------------------------------------------------------------- 1 | io.joyrpc.context.env.Global -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.context.EnvironmentSupplier: -------------------------------------------------------------------------------- 1 | io.joyrpc.context.env.system.SystemSupplier 2 | io.joyrpc.context.env.command.CommandSupplier -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.event.EventBus: -------------------------------------------------------------------------------- 1 | io.joyrpc.event.jbus.JEventBus -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.filter.ConsumerFilter: -------------------------------------------------------------------------------- 1 | io.joyrpc.filter.consumer.CacheFilter 2 | io.joyrpc.filter.consumer.ConcurrencyFilter 3 | io.joyrpc.filter.consumer.GenericFilter 4 | io.joyrpc.filter.consumer.MockFilter 5 | io.joyrpc.filter.consumer.ValidationFilter 6 | io.joyrpc.filter.consumer.TraceFilter 7 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.filter.ProviderFilter: -------------------------------------------------------------------------------- 1 | io.joyrpc.filter.provider.CacheFilter 2 | io.joyrpc.filter.provider.ConcurrencyFilter 3 | io.joyrpc.filter.provider.ExceptionFilter 4 | io.joyrpc.filter.provider.GenericFilter 5 | io.joyrpc.filter.provider.IPPermissionFilter 6 | io.joyrpc.filter.provider.LimiterFilter 7 | io.joyrpc.filter.provider.MethodBlackWhiteListFilter 8 | io.joyrpc.filter.provider.AuthorizationFilter 9 | io.joyrpc.filter.provider.TimeoutFilter 10 | io.joyrpc.filter.provider.ValidationFilter 11 | io.joyrpc.filter.provider.TraceFilter 12 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.invoker.chain.FilterChainFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.chain.DefaultFilterChainFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.invoker.exception.ExceptionHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.exception.SystemExceptionHandler -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.invoker.injection.NodeReqInjection: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.injection.AliasInjection 2 | io.joyrpc.invoker.injection.ProtocolInjection 3 | io.joyrpc.invoker.injection.RetryInjection -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.invoker.injection.Transmit: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.injection.ContextTransmit 2 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.invoker.option.InterfaceOptionFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.invoker.option.inner.InnerInterfaceOptionFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.permission.Authentication: -------------------------------------------------------------------------------- 1 | io.joyrpc.permission.token.TokenAuthentication -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.permission.Authorization: -------------------------------------------------------------------------------- 1 | io.joyrpc.permission.token.TokenAuthorization -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.permission.Identification: -------------------------------------------------------------------------------- 1 | io.joyrpc.permission.token.TokenIdentification -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.protocol.ClientProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.joy.JoyClientProtocol 2 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.protocol.MessageHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.handler.AuthenticationReceiver 2 | io.joyrpc.protocol.handler.CallbackReceiver 3 | io.joyrpc.protocol.handler.HeartbeatReceiver 4 | io.joyrpc.protocol.handler.NegotiationReceiver 5 | io.joyrpc.protocol.handler.ShakeHandReceiver 6 | io.joyrpc.protocol.handler.BizReceiver 7 | io.joyrpc.protocol.handler.SessionbeatReceiver 8 | io.joyrpc.protocol.handler.OfflineReceiver -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.protocol.ServerProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.joy.JoyServerProtocol 2 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.protocol.http.HeaderInjection: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.http.injection.DefaultHeaderInjection -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.proxy.IDLFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.jdk.JdkIDLFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.proxy.JCompiler: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.jdk.JdkCompiler -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.proxy.ProxyFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.jdk.JdkProxyFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.transport.EndpointFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.DefaultEndpointFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.transport.channel.ChannelManagerFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.channel.SharedChannelManagerFactory 2 | io.joyrpc.transport.channel.UnsharedChannelManagerFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.transport.http.HttpClient: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.http.jdk.JdkHttpClient -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.transport.telnet.TelnetHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.telnet.handler.ClearTelnetHandler 2 | io.joyrpc.protocol.telnet.handler.EchoTelnetHandler 3 | io.joyrpc.protocol.telnet.handler.ExitTelnetHandler 4 | io.joyrpc.protocol.telnet.handler.HelpTelnetHandler -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/services/io.joyrpc.util.thread.ThreadPoolFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.util.thread.adaptive.AdaptiveThreadPoolFactory -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/system_context: -------------------------------------------------------------------------------- 1 | #系统内置的上下文 2 | #支持引用外部环境变量,或进行重命名。如[key]=[value],表示从环境变量获取"value"的值 3 | # 4 | #注册中心 5 | [registry.protocol] 6 | [registry.address] 7 | #启动属性 8 | [java.version] 9 | [host.cpucores] 10 | [host.memory] 11 | [pid] 12 | [start.time] 13 | [os.type] 14 | #应用信息 15 | [appPath]=[appPath] 16 | [appId]=[appId] 17 | [appName]=[appName] 18 | [appInsId]=[appInsId] 19 | [appGroup]=[appGroup] 20 | #全局的应用服务名称 21 | [appService]=[appService] 22 | 23 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/system_env: -------------------------------------------------------------------------------- 1 | #环境变量重命名 2 | #应用名称 3 | appName=spring.application.name 4 | appService=spring.application.service -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/system_http_header: -------------------------------------------------------------------------------- 1 | .*=.* 2 | X-HIDDEN-*=.* 3 | X-TRANS-*=* -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/system_network_error: -------------------------------------------------------------------------------- 1 | #内部做了小写处理 2 | 拒绝连接 3 | connection refused 4 | 没有到主机的路由 5 | no route to host 6 | 连接超时 7 | connection timed out 8 | -------------------------------------------------------------------------------- /joyrpc-core/src/main/resources/META-INF/system_standard_type: -------------------------------------------------------------------------------- 1 | #### java 2 | ## 3 | int 4 | byte 5 | short 6 | long 7 | float 8 | double 9 | boolean 10 | char 11 | void 12 | java.lang.Integer 13 | java.lang.Byte 14 | java.lang.Short 15 | java.lang.Long 16 | java.lang.Float 17 | java.lang.Double 18 | java.lang.Boolean 19 | java.lang.Character 20 | java.lang.String 21 | java.lang.Void 22 | java.math.BigDecimal 23 | java.util.Currency 24 | java.util.Date 25 | java.util.Collection 26 | java.util.List 27 | java.util.Map 28 | java.util.Set 29 | java.util.Queue 30 | java.util.concurrent.CompletableFuture -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-api/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ###set log levels### 2 | log4j.rootLogger=info, stdout 3 | ###output to the console### 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.Target=System.out 6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 7 | log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/java/io/joyrpc/example/service/AsyncTraceService.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | import io.joyrpc.annotation.Alias; 25 | 26 | import java.util.concurrent.CompletableFuture; 27 | 28 | @Alias("io.joyrpc.example.service.TraceService") 29 | public interface AsyncTraceService { 30 | 31 | CompletableFuture sayHello(String str); 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application-async-client.properties: -------------------------------------------------------------------------------- 1 | ## registry 2 | rpc.registry.registry=fix 3 | rpc.registry.address=localhost 4 | # registry 5 | rpc.consumers[0].interfaceClazz=io.joyrpc.example.service.AsyncTraceService 6 | rpc.consumers[0].loadbalance=adaptive 7 | rpc.consumers[0].alias=2.0-Boot 8 | rpc.consumers[0].serviceName=myProvider -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application-generic.properties: -------------------------------------------------------------------------------- 1 | ## registry 2 | rpc.registry.registry=fix 3 | rpc.registry.address=dubbo://localhost:22000 4 | # registry 5 | rpc.consumers[0].interfaceClazz=io.joyrpc.example.service.DemoService 6 | rpc.consumers[0].generic=true 7 | rpc.consumers[0].alias=2.0-Boot 8 | rpc.consumers[0].timeout=120000 9 | #rpc.consumers[0].serialization=json -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application-group-client.properties: -------------------------------------------------------------------------------- 1 | #registry 2 | rpc.registry.registry=fix 3 | rpc.registry.address=localhost 4 | #消费者 5 | rpc.groups[0].interfaceClazz=io.joyrpc.example.service.DemoService 6 | rpc.groups[0].loadbalance=adaptive 7 | rpc.groups[0].alias=2.0-Boot 8 | #rpc.consumers[0].node-selector=methodRouter 9 | #rpc.consumers[0].concurrency=2 10 | #rpc.consumers[0].methods[0].cache=true 11 | #rpc.consumers[0].methods[0].name=sayHello 12 | #rpc.consumers[0].methods[0].cacheKeyGenerator=jexl 13 | #rpc.consumers[0].methods[0].cacheKeyExpression=args[0] 14 | #rpc.consumers[0].parameters[.token]=12344 15 | #rpc.consumers[0].parameters[identification]=token 16 | #消费者开启验证 17 | #rpc.consumers[0].validation=true 18 | #消费者开启缓存 19 | #rpc.consumers[0].cache=true 20 | spring.application.name=joyrpc-example-client 21 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application-javassist-client.properties: -------------------------------------------------------------------------------- 1 | #registry 2 | rpc.registry.registry=fix 3 | rpc.registry.address=localhost 4 | #消费者 5 | rpc.consumers[0].interfaceClazz=io.joyrpc.example.service.DemoService 6 | rpc.consumers[0].loadbalance=adaptive 7 | rpc.consumers[0].proxy=javassist 8 | rpc.consumers[0].alias=2.0-Boot 9 | #消费者开启验证 10 | #rpc.consumers[0].validation=true 11 | #消费者开启缓存 12 | #rpc.consumers[0].cache=true 13 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application-rest.properties: -------------------------------------------------------------------------------- 1 | # server 2 | rpc.servers[0].id=server-rest 3 | rpc.servers[0].port=9900 4 | rpc.servers[0].host=127.0.0.1 5 | rpc.servers[0].endpointFactory=resteasy 6 | # registries 7 | rpc.registry.registry=memory 8 | # packages 9 | rpc.packages[0]=io.joyrpc.example.service 10 | # provider 11 | rpc.providers[0].name=provider-demoService 12 | rpc.providers[0].warmupName=warmup 13 | rpc.providers[0].serverName=server-rest 14 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-boot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/java/io/joyrpc/example/dubbo/provider/DubboServer.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.dubbo.provider; 2 | 3 | import org.apache.dubbo.config.spring.context.annotation.DubboComponentScan; 4 | import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.boot.SpringApplication; 8 | import org.springframework.boot.autoconfigure.SpringBootApplication; 9 | 10 | @SpringBootApplication 11 | @DubboComponentScan(basePackages="io.joyrpc.example.service.impl") 12 | @EnableDubboConfig 13 | public class DubboServer { 14 | 15 | private static final Logger logger = LoggerFactory.getLogger(DubboServer.class); 16 | 17 | public static void main(String[] args) throws InterruptedException { 18 | 19 | System.setProperty("spring.profiles.active", "server"); 20 | SpringApplication.run(DubboServer.class, args); 21 | Thread.currentThread().join(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/java/io/joyrpc/example/service/vo/EchoData.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoData { 4 | 5 | private int code; 6 | 7 | private String message; 8 | 9 | public EchoData() { 10 | } 11 | 12 | public EchoData(int code, String message) { 13 | this.code = code; 14 | this.message = message; 15 | } 16 | 17 | public int getCode() { 18 | return code; 19 | } 20 | 21 | public void setCode(int code) { 22 | this.code = code; 23 | } 24 | 25 | public String getMessage() { 26 | return message; 27 | } 28 | 29 | public void setMessage(String message) { 30 | this.message = message; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/java/io/joyrpc/example/service/vo/EchoHeader.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class EchoHeader { 7 | 8 | private Map attrs = new HashMap<>(); 9 | 10 | public EchoHeader() { 11 | } 12 | 13 | public EchoHeader(Map attrs) { 14 | this.attrs = attrs; 15 | } 16 | 17 | public Map getAttrs() { 18 | return attrs; 19 | } 20 | 21 | public void setAttrs(Map attrs) { 22 | this.attrs = attrs; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/java/io/joyrpc/example/service/vo/EchoRequest.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoRequest { 4 | 5 | private EchoHeader header; 6 | 7 | private T body; 8 | 9 | public EchoRequest() { 10 | } 11 | 12 | public EchoRequest(EchoHeader header) { 13 | this.header = header; 14 | } 15 | 16 | public EchoRequest(EchoHeader header, T body) { 17 | this.header = header; 18 | this.body = body; 19 | } 20 | 21 | public EchoHeader getHeader() { 22 | return header; 23 | } 24 | 25 | public void setHeader(EchoHeader header) { 26 | this.header = header; 27 | } 28 | 29 | public T getBody() { 30 | return body; 31 | } 32 | 33 | public void setBody(T body) { 34 | this.body = body; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/java/io/joyrpc/example/service/vo/EchoResponse.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoResponse { 4 | 5 | private EchoHeader header; 6 | 7 | private T body; 8 | 9 | public EchoResponse() { 10 | } 11 | 12 | public EchoResponse(EchoHeader header) { 13 | this.header = header; 14 | } 15 | 16 | public EchoResponse(EchoHeader header, T body) { 17 | this.header = header; 18 | this.body = body; 19 | } 20 | 21 | public EchoHeader getHeader() { 22 | return header; 23 | } 24 | 25 | public void setHeader(EchoHeader header) { 26 | this.header = header; 27 | } 28 | 29 | public T getBody() { 30 | return body; 31 | } 32 | 33 | public void setBody(T body) { 34 | this.body = body; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/resources/application-client.properties: -------------------------------------------------------------------------------- 1 | # registry 2 | dubbo.registry.id=my-registry 3 | dubbo.registry.address=N/A 4 | # 序列化 5 | #dubbo.application.parameters[serialization]=kryo 6 | #dubbo.application.parameters[serialization]=fst 7 | #dubbo.application.parameters[serialization]=protostuff 8 | # appliaction 9 | dubbo.application.name=joyrpc-example-dubbo-client 10 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/resources/application-generic.properties: -------------------------------------------------------------------------------- 1 | # registry 2 | dubbo.registry.id=my-registry 3 | dubbo.registry.address=N/A 4 | # appliaction 5 | dubbo.application.name=joyrpc-example-dubbo-client 6 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/resources/application-server.properties: -------------------------------------------------------------------------------- 1 | # packages 2 | dubbo.scan.basePackages=io.joyrpc.example.dubbo.service.impl 3 | # registry 4 | dubbo.registry.id=my-registry 5 | dubbo.registry.address=nacos://127.0.0.1:8848 6 | # protocol 7 | dubbo.protocol.name=dubbo 8 | dubbo.protocol.port=22000 9 | # application 10 | dubbo.application.name=joyrpc-example-dubbo-server 11 | # dubbo.application.parameters[serialization]=java -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-dubbo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-grpc/src/main/java/io/joyrpc/example/service/HelloRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: grpc.proto 3 | 4 | package io.joyrpc.example.service; 5 | 6 | public interface HelloRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:io.joyrpc.example.service.HelloRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * optional string name = 1; 12 | */ 13 | String getName(); 14 | /** 15 | * optional string name = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getNameBytes(); 19 | } 20 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-grpc/src/main/java/io/joyrpc/example/service/HelloResponseOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: grpc.proto 3 | 4 | package io.joyrpc.example.service; 5 | 6 | public interface HelloResponseOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:io.joyrpc.example.service.HelloResponse) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * optional string message = 1; 12 | */ 13 | String getMessage(); 14 | /** 15 | * optional string message = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getMessageBytes(); 19 | } 20 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-grpc/src/main/proto/grpc.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_outer_classname = "HelloProto"; 5 | 6 | package io.joyrpc.example.service; 7 | 8 | //定义服务 9 | service DemoService { 10 | //注意:这里是returns 不是return 11 | rpc sayHello (HelloRequest) returns (HelloResponse) { 12 | } 13 | } 14 | //定义消息类型 15 | message HelloRequest { 16 | string name = 1; 17 | } 18 | message HelloResponse { 19 | string message = 1; 20 | } 21 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-grpc/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/CallbackService.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service; 2 | 3 | import io.joyrpc.Callback; 4 | import io.joyrpc.annotation.CallbackArg; 5 | import io.joyrpc.example.service.vo.*; 6 | 7 | public interface CallbackService { 8 | 9 | boolean echoGenericCallback(Callback callback); 10 | 11 | boolean echoRequestCallback(Callback, EchoResponse> callback); 12 | 13 | boolean echoGenericRequestCallback(Callback callback); 14 | 15 | boolean echoDataRequestCallback(Callback callback); 16 | 17 | boolean echoGenericListener(@CallbackArg Listener listener); 18 | 19 | boolean echoRequestListener(@CallbackArg Listener, EchoResponse> listener); 20 | 21 | interface Listener { 22 | S notify(Q result); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoData.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoData { 4 | 5 | private int code; 6 | 7 | private String message; 8 | 9 | public EchoData() { 10 | } 11 | 12 | public EchoData(int code, String message) { 13 | this.code = code; 14 | this.message = message; 15 | } 16 | 17 | public int getCode() { 18 | return code; 19 | } 20 | 21 | public void setCode(int code) { 22 | this.code = code; 23 | } 24 | 25 | public String getMessage() { 26 | return message; 27 | } 28 | 29 | public void setMessage(String message) { 30 | this.message = message; 31 | } 32 | 33 | 34 | @Override 35 | public String toString() { 36 | return "EchoData{" + 37 | "code=" + code + 38 | ", message='" + message + '\'' + 39 | '}'; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoDataRequest.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | 4 | public class EchoDataRequest extends EchoRequest{ 5 | 6 | public EchoDataRequest() { 7 | } 8 | 9 | public EchoDataRequest(EchoHeader header) { 10 | super(header); 11 | } 12 | 13 | public EchoDataRequest(EchoHeader header, EchoData body) { 14 | super(header, body); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoDataResponse.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoDataResponse extends EchoResponse { 4 | 5 | public EchoDataResponse() { 6 | } 7 | 8 | public EchoDataResponse(EchoHeader header) { 9 | super(header); 10 | } 11 | 12 | public EchoDataResponse(EchoHeader header, EchoData body) { 13 | super(header, body); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoHeader.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class EchoHeader { 7 | 8 | private Map attrs = new HashMap<>(); 9 | 10 | public EchoHeader() { 11 | } 12 | 13 | public EchoHeader(Map attrs) { 14 | this.attrs = attrs; 15 | } 16 | 17 | public Map getAttrs() { 18 | return attrs; 19 | } 20 | 21 | public void setAttrs(Map attrs) { 22 | this.attrs = attrs; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return "EchoHeader{" + 28 | "attrs=" + attrs + 29 | '}'; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoRequest.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoRequest { 4 | 5 | private EchoHeader header; 6 | 7 | private T body; 8 | 9 | public EchoRequest() { 10 | } 11 | 12 | public EchoRequest(EchoHeader header) { 13 | this.header = header; 14 | } 15 | 16 | public EchoRequest(EchoHeader header, T body) { 17 | this.header = header; 18 | this.body = body; 19 | } 20 | 21 | public EchoHeader getHeader() { 22 | return header; 23 | } 24 | 25 | public void setHeader(EchoHeader header) { 26 | this.header = header; 27 | } 28 | 29 | public T getBody() { 30 | return body; 31 | } 32 | 33 | public void setBody(T body) { 34 | this.body = body; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "EchoRequest{" + 40 | "header=" + header + 41 | ", body=" + body + 42 | '}'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-interface/src/main/java/io/joyrpc/example/service/vo/EchoResponse.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service.vo; 2 | 3 | public class EchoResponse { 4 | 5 | private EchoHeader header; 6 | 7 | private T body; 8 | 9 | public EchoResponse() { 10 | } 11 | 12 | public EchoResponse(EchoHeader header) { 13 | this.header = header; 14 | } 15 | 16 | public EchoResponse(EchoHeader header, T body) { 17 | this.header = header; 18 | this.body = body; 19 | } 20 | 21 | public EchoHeader getHeader() { 22 | return header; 23 | } 24 | 25 | public void setHeader(EchoHeader header) { 26 | this.header = header; 27 | } 28 | 29 | public T getBody() { 30 | return body; 31 | } 32 | 33 | public void setBody(T body) { 34 | this.body = body; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "EchoResponse{" + 40 | "header=" + header + 41 | ", body=" + body + 42 | '}'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-spring/src/test/resources/spring/joyrpc-consumer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /joyrpc-example/joyrpc-example-spring/src/test/resources/spring/joyrpc-provider.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-extension 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | ../pom.xml 10 | 11 | 4.0.0 12 | 13 | joyrpc-extension-core 14 | jar 15 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/Classify.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 分类算法 25 | */ 26 | public interface Classify { 27 | 28 | /** 29 | * 获取类型 30 | * 31 | * @param obj 扩展对象 32 | * @param name 扩展点元数据名称 33 | * @return 类型 34 | */ 35 | M type(T obj, Name name); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/Ordered.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 排序 25 | */ 26 | public interface Ordered { 27 | 28 | /** 29 | * 默认顺序 30 | */ 31 | int ORDER = Short.MAX_VALUE; 32 | 33 | /** 34 | * 排序顺序,按照优先级升序排序 35 | * 36 | * @return 37 | */ 38 | int order(); 39 | } 40 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/Prototype.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 多态,非单例 25 | */ 26 | public interface Prototype { 27 | } 28 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/Type.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 类型 25 | */ 26 | public interface Type { 27 | 28 | /** 29 | * 类型 30 | * 31 | * @return 类型 32 | */ 33 | T type(); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/URLKey.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 返回键名称 25 | */ 26 | public interface URLKey { 27 | 28 | /** 29 | * 获取名称 30 | * 31 | * @return 32 | */ 33 | String getName(); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/condition/Conditional.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.condition; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.lang.annotation.*; 24 | 25 | @Target({ElementType.TYPE}) 26 | @Retention(RetentionPolicy.RUNTIME) 27 | @Documented 28 | public @interface Conditional { 29 | 30 | /** 31 | * 条件匹配 32 | */ 33 | Class[] value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/listener/ExtensionEvent.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.listener; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.util.EventObject; 24 | 25 | /** 26 | * 扩展点事件 27 | */ 28 | public class ExtensionEvent extends EventObject { 29 | 30 | public ExtensionEvent(Object source) { 31 | super(source); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/listener/ExtensionListener.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.listener; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import java.util.EventListener; 24 | 25 | /** 26 | * 事件监听器 27 | */ 28 | public interface ExtensionListener extends EventListener { 29 | 30 | /** 31 | * 加载器发生变化 32 | */ 33 | void onEvent(ExtensionEvent event); 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-core/src/main/java/io/joyrpc/extension/listener/LoaderEvent.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.listener; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 加载器发生变化 25 | */ 26 | public class LoaderEvent extends ExtensionEvent { 27 | 28 | public LoaderEvent(Object source) { 29 | super(source); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-spring/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-extension 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-extension-spring 13 | jar 14 | 15 | 16 | io.joyrpc 17 | joyrpc-extension-core 18 | ${project.version} 19 | 20 | 21 | 22 | org.springframework 23 | spring-context 24 | provided 25 | 26 | 27 | -------------------------------------------------------------------------------- /joyrpc-extension/joyrpc-extension-springboot/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | io.joyrpc.extension.spring.boot.SpringLoaderAutoConfiguration -------------------------------------------------------------------------------- /joyrpc-extension/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-extension 13 | pom 14 | 15 | joyrpc-extension-core 16 | joyrpc-extension-spring 17 | joyrpc-extension-springboot 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-cache2k/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-cache 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-cache-cache2k 13 | jar 14 | 15 | 16 | org.cache2k 17 | cache2k-core 18 | ${cache2k.version} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-cache2k/src/main/resources/META-INF/services/io.joyrpc.cache.CacheFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.cache2k.Cache2kCacheFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-caffeine/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-cache 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-cache-caffeine 13 | jar 14 | 15 | 16 | com.github.ben-manes.caffeine 17 | caffeine 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-caffeine/src/main/resources/META-INF/services/io.joyrpc.cache.CacheFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.caffeine.CaffeineCacheFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-guava/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-cache 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-cache-guava 13 | jar 14 | 15 | 16 | 17 | com.google.guava 18 | guava 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/joyrpc-cache-guava/src/main/resources/META-INF/services/io.joyrpc.cache.CacheFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.guava.GuavaCacheFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-cache/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-cache 13 | pom 14 | 15 | joyrpc-cache-guava 16 | joyrpc-cache-caffeine 17 | joyrpc-cache-cache2k 18 | 19 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-lz4/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-compression-lz4 13 | 14 | 15 | 16 | org.apache.commons 17 | commons-compress 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-lz4/src/main/resources/META-INF/services/io.joyrpc.codec.compression.Compression: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.compression.lz4.Lz4Compression 2 | io.joyrpc.codec.compression.lz4.Lz4FrameCompression -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-lzma/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-compression-lzma 13 | 14 | 15 | 1.8 16 | 17 | 18 | 19 | 20 | org.tukaani 21 | xz 22 | ${xz.version} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-lzma/src/main/resources/META-INF/services/io.joyrpc.codec.compression.Compression: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.compression.lzma.LzmaCompression -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-snappy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-compression-snappy 13 | 14 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-compression-snappy/src/main/resources/META-INF/services/io.joyrpc.codec.compression.Compression: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.compression.snappy.SnappyFrameCompression 2 | io.joyrpc.codec.compression.snappy.SnappyCompression -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fastjson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-serialization-fastjson 13 | 14 | 15 | 16 | com.alibaba 17 | fastjson 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fastjson/src/main/java/io/joyrpc/codec/serialization/fastjson/ResponsePayloadCodec.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.serialization.fastjson; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 应答序列化 25 | */ 26 | public class ResponsePayloadCodec extends AbstractResponsePayloadCodec { 27 | 28 | public static final ResponsePayloadCodec INSTANCE = new ResponsePayloadCodec(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fastjson/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Json: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.fastjson.JsonSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fastjson/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.fastjson.JsonSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fst/src/main/java/org/nustaq/serialization/AutowiredObjectSerializer.java: -------------------------------------------------------------------------------- 1 | package org.nustaq.serialization; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 自动注册自定义序列化器 25 | */ 26 | public interface AutowiredObjectSerializer extends FSTObjectSerializer { 27 | 28 | /** 29 | * 字段注册的类型 30 | * 31 | * @return 类型 32 | */ 33 | Class getType(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-fst/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.fst.FSTSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-hessian/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-serialization-hessian 13 | 14 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-hessian/src/main/java/io/joyrpc/com/caucho/hessian/io/AutowiredObjectSerializer.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.com.caucho.hessian.io; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * 自动注册序列化 25 | */ 26 | public interface AutowiredObjectSerializer extends Serializer { 27 | 28 | 29 | 30 | /** 31 | * 注册的类型 32 | * 33 | * @return 类型 34 | */ 35 | Class getType(); 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-hessian/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.hessian2.Hessian2Serialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-jackson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-serialization-jackson 13 | 14 | 15 | 16 | com.fasterxml.jackson.core 17 | jackson-databind 18 | 19 | 20 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-jackson/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Json: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.jackson.JacksonSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-jackson/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.jackson.JacksonSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-kryo/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.kryo.KryoSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-protostuff/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-codec 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-serialization-protostuff 13 | 14 | 15 | 16 | io.protostuff 17 | protostuff-core 18 | 19 | 20 | io.protostuff 21 | protostuff-runtime 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-codec/joyrpc-serialization-protostuff/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.codec.serialization.protostuff.ProtostuffSerialization 2 | io.joyrpc.codec.serialization.protostuff.ProtobufSerialization 3 | io.joyrpc.codec.serialization.protostuff.ProtoSerialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-expression/joyrpc-expression-jexl/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-expression 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-expression-jexl 13 | jar 14 | 15 | 16 | org.apache.commons 17 | commons-jexl3 18 | 19 | 20 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-expression/joyrpc-expression-jexl/src/main/java/io/joyrpc/cache/jexl/JexlCacheKeyGenerator.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.cache.jexl; 2 | 3 | import io.joyrpc.cache.AbstractExpressionCacheKeyGenerator; 4 | import io.joyrpc.extension.Extension; 5 | import io.joyrpc.extension.condition.ConditionalOnClass; 6 | 7 | import static io.joyrpc.cache.CacheKeyGenerator.JEXL_ORDER; 8 | 9 | /** 10 | * JEXL3表达式缓存键生成器 11 | */ 12 | @Extension(value = "jexl", order = JEXL_ORDER) 13 | @ConditionalOnClass({"org.apache.commons.jexl3.JexlBuilder"}) 14 | public class JexlCacheKeyGenerator extends AbstractExpressionCacheKeyGenerator { 15 | 16 | public JexlCacheKeyGenerator() { 17 | super("jexl"); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-expression/joyrpc-expression-jexl/src/main/resources/META-INF/services/io.joyrpc.cache.CacheKeyGenerator: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.jexl.JexlCacheKeyGenerator -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-expression/joyrpc-expression-jexl/src/main/resources/META-INF/services/io.joyrpc.expression.ExpressionProvider: -------------------------------------------------------------------------------- 1 | io.joyrpc.expression.jexl.JexlProvider -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-expression/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-expression 13 | pom 14 | 15 | 16 | joyrpc-expression-jexl 17 | 18 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-dubbo/src/main/resources/META-INF/services/io.joyrpc.codec.serialization.Serialization: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.dubbo.serialization.protostuff.DubboProtostuffSerialization 2 | io.joyrpc.protocol.dubbo.serialization.hessian2.DubboHessian2Serialization -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-dubbo/src/main/resources/META-INF/services/io.joyrpc.protocol.ClientProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.dubbo.DubboClientProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-dubbo/src/main/resources/META-INF/services/io.joyrpc.protocol.ServerProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.dubbo.DubboServerProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-grpc/src/main/java/io/joyrpc/protocol/grpc/exception/GrpcBizException.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.grpc.exception; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.exception.RpcException; 24 | 25 | /** 26 | * @date: 2019/8/22 27 | */ 28 | public class GrpcBizException extends RpcException { 29 | 30 | public GrpcBizException(String message) { 31 | super(message); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-grpc/src/main/resources/META-INF/services/io.joyrpc.protocol.ClientProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.grpc.GrpcClientProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-grpc/src/main/resources/META-INF/services/io.joyrpc.protocol.ServerProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.grpc.GrpcServerProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-protocol 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-protocol-http 13 | jar 14 | 15 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/src/main/java/io/joyrpc/protocol/http/ContentTypeHandler.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.http; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extensible; 24 | 25 | /** 26 | * 内容格式处理器 27 | */ 28 | @Extensible("contentTypeHandler") 29 | public interface ContentTypeHandler extends HttpController { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/src/main/java/io/joyrpc/protocol/http/HttpResponse.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.http; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.transport.http.HttpResponseMessage; 24 | 25 | /** 26 | * HTTP应答转换 27 | */ 28 | public interface HttpResponse { 29 | 30 | /** 31 | * 转换成Http应答消息 32 | * 33 | * @return 应答消息 34 | */ 35 | HttpResponseMessage apply(); 36 | } 37 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/src/main/resources/META-INF/services/io.joyrpc.protocol.ServerProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.http.HttpServerProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/src/main/resources/META-INF/services/io.joyrpc.protocol.http.HttpController: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.http.controller.FaviconController 2 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-http/src/main/resources/META-INF/services/io.joyrpc.protocol.http.URLBinding: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.http.binding.DefaultBinding -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-jsonrpc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-protocol 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-protocol-jsonrpc 13 | 14 | 15 | 16 | io.joyrpc 17 | joyrpc-protocol-http 18 | ${project.version} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-jsonrpc/src/main/java/io/joyrpc/protocol/jsonrpc/controller/JsonRpc0Controller.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.protocol.jsonrpc.controller; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | 25 | /** 26 | * JsonRpc调用处理,处理以/jsonrpc/开头的调用 27 | */ 28 | @Extension("jsonrpc") 29 | public class JsonRpc0Controller extends JsonRpcController { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-jsonrpc/src/main/resources/META-INF/permission/serialization.whitelist: -------------------------------------------------------------------------------- 1 | ## 2 | #### json-rpc 3 | ## 4 | io.joyrpc.protocol.jsonrpc.message.JsonRpcError 5 | io.joyrpc.protocol.jsonrpc.message.JsonRpcRequest 6 | io.joyrpc.protocol.jsonrpc.message.JsonRpcResponse -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-jsonrpc/src/main/resources/META-INF/services/io.joyrpc.protocol.http.ContentTypeHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.jsonrpc.controller.JsonRpcController -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-jsonrpc/src/main/resources/META-INF/services/io.joyrpc.protocol.http.HttpController: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.jsonrpc.controller.JsonRpc0Controller -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-telnet/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-protocol 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-protocol-telnet 13 | jar 14 | 15 | 16 | commons-cli 17 | commons-cli 18 | 1.4 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-telnet/src/main/resources/META-INF/services/io.joyrpc.protocol.ServerProtocol: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.telnet.TelnetServerProtocol -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/joyrpc-protocol-telnet/src/main/resources/META-INF/services/io.joyrpc.transport.telnet.TelnetHandler: -------------------------------------------------------------------------------- 1 | io.joyrpc.protocol.telnet.handler.CheckTelnetHandler 2 | io.joyrpc.protocol.telnet.handler.BizThreadTelnetHandler 3 | io.joyrpc.protocol.telnet.handler.ConfigTelnetHandler 4 | io.joyrpc.protocol.telnet.handler.InvokeTelnetHandler 5 | io.joyrpc.protocol.telnet.handler.JVMStatusTelnetHandler 6 | io.joyrpc.protocol.telnet.handler.ListTelnetHandler 7 | io.joyrpc.protocol.telnet.handler.PortTelnetHandler 8 | io.joyrpc.protocol.telnet.handler.ServiceInfoTelnetHandler 9 | io.joyrpc.protocol.telnet.handler.SudoTelnetHandler 10 | io.joyrpc.protocol.telnet.handler.VersionTelnetHandler 11 | io.joyrpc.protocol.telnet.handler.WhitelistTelnetHandler -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-protocol/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-protocol 13 | pom 14 | 15 | joyrpc-protocol-telnet 16 | joyrpc-protocol-http 17 | joyrpc-protocol-grpc 18 | joyrpc-protocol-dubbo 19 | joyrpc-protocol-jsonrpc 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-bytebuddy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-proxy 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-proxy-bytebuddy 13 | jar 14 | 15 | 16 | net.bytebuddy 17 | byte-buddy 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-bytebuddy/src/main/resources/META-INF/services/io.joyrpc.proxy.IDLFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.bytebuddy.ByteBuddyIDLFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-bytebuddy/src/main/resources/META-INF/services/io.joyrpc.proxy.ProxyFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.bytebuddy.ByteBuddyProxyFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-javassist/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-proxy 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-proxy-javassist 13 | jar 14 | 15 | 16 | org.javassist 17 | javassist 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-javassist/src/main/resources/META-INF/services/io.joyrpc.proxy.IDLFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.javassist.JavassistIDLFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/joyrpc-proxy-javassist/src/main/resources/META-INF/services/io.joyrpc.proxy.ProxyFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.proxy.javassist.JavassistProxyFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-proxy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | joyrpc-proxy 11 | 4.0.0 12 | pom 13 | 14 | 15 | joyrpc-proxy-bytebuddy 16 | joyrpc-proxy-javassist 17 | 18 | 19 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-broadcast/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-registry 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-registry-broadcast 13 | jar 14 | 15 | 16 | com.hazelcast 17 | hazelcast 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-broadcast/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.broadcast.BroadcastRegistryFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-consul/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-registry 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-registry-consul 13 | 14 | 15 | 16 | io.vertx 17 | vertx-consul-client 18 | ${vertx-consul-client} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-consul/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.consul.ConsulRegistryFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-etcd/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.etcd.EtcdRegistryFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-nacos/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.nacos.NacosRegistryFactory 2 | io.joyrpc.cluster.discovery.registry.nacos.dubbo.DubboNacosRegistryFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/joyrpc-registry-zk/src/main/resources/META-INF/services/io.joyrpc.cluster.discovery.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.cluster.discovery.registry.zk.ZKRegistryFactory 2 | io.joyrpc.cluster.discovery.registry.zk.ZookeeperRegistryFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-registry/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-registry 13 | pom 14 | 15 | 16 | joyrpc-registry-etcd 17 | joyrpc-registry-zk 18 | joyrpc-registry-broadcast 19 | joyrpc-registry-consul 20 | joyrpc-registry-nacos 21 | 22 | 23 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-trace/joyrpc-trace-jaeger/src/main/resources/META-INF/services/io.joyrpc.apm.trace.TraceFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.apm.trace.jaeger.JaegerTraceFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-trace/joyrpc-trace-pinpoint/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-trace 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-trace-pinpoint 13 | 14 | 15 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-trace/joyrpc-trace-skywalking/src/main/resources/META-INF/services/io.joyrpc.apm.trace.TraceFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.apm.trace.skywalking.SkywalkingTraceFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-trace/joyrpc-trace-zipkin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-trace 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-trace-zipkin 13 | 14 | 15 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-trace/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-trace 13 | pom 14 | 15 | 16 | joyrpc-trace-skywalking 17 | joyrpc-trace-jaeger 18 | joyrpc-trace-pinpoint 19 | joyrpc-trace-zipkin 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-hmily/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-transaction 7 | io.joyrpc 8 | 1.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-transaction-hmily 13 | 14 | 15 | 16 | org.dromara 17 | hmily-tcc 18 | ${hmily.version} 19 | true 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-hmily/src/main/resources/META-INF/services/io.joyrpc.context.io.joyrpc.invoker.injection.Transmit: -------------------------------------------------------------------------------- 1 | io.joyrpc.transaction.hmily.HmilyTransmit -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-hmily/src/main/resources/META-INF/services/io.joyrpc.transaction.TransactionFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transaction.hmily.HmilyTransactionFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-seata/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-transaction 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-transaction-seata 13 | 14 | 15 | 16 | io.seata 17 | seata-all 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-seata/src/main/resources/META-INF/services/io.joyrpc.context.io.joyrpc.invoker.injection.Transmit: -------------------------------------------------------------------------------- 1 | io.joyrpc.transaction.seata.SeataTransmit -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/joyrpc-transaction-seata/src/main/resources/META-INF/services/io.joyrpc.transaction.TransactionFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transaction.seata.SeataTransactionFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transaction/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-transaction 13 | pom 14 | 15 | 16 | joyrpc-transaction-seata 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/joyrpc-transport-netty4/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-transport 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-transport-netty4 13 | jar 14 | 15 | 16 | io.netty 17 | netty-all 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/joyrpc-transport-netty4/src/main/resources/META-INF/services/io.joyrpc.transport.TransportFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.netty4.transport.NettyFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/joyrpc-transport-netty4/src/main/resources/META-INF/services/io.joyrpc.transport.netty4.pipeline.PipelineFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.netty4.pipeline.DefaultPipelineFactory 2 | io.joyrpc.transport.netty4.pipeline.HttpPipelineFactory 3 | io.joyrpc.transport.netty4.pipeline.LengthFieldFramePipelineFactory 4 | io.joyrpc.transport.netty4.pipeline.Http2PipelineFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/joyrpc-transport-resteasy/src/main/resources/META-INF/services/io.joyrpc.transport.EndpointFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.resteasy.server.RestServerFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/joyrpc-transport-resteasy/src/main/resources/META-INF/services/io.joyrpc.transport.netty4.pipeline.PipelineFactory: -------------------------------------------------------------------------------- 1 | io.joyrpc.transport.resteasy.pipeline.RestEasyPipelineFactory -------------------------------------------------------------------------------- /joyrpc-plugin/joyrpc-transport/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-plugin 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-transport 13 | pom 14 | 15 | 16 | joyrpc-transport-netty4 17 | joyrpc-transport-resteasy 18 | 19 | -------------------------------------------------------------------------------- /joyrpc-spring/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-spring 13 | jar 14 | 15 | 16 | 17 | org.springframework 18 | spring-context 19 | 20 | 21 | 22 | io.joyrpc 23 | joyrpc-core 24 | ${project.version} 25 | 26 | 27 | -------------------------------------------------------------------------------- /joyrpc-spring/src/main/java/io/joyrpc/spring/annotation/Spring.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.spring.annotation; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | 24 | import java.lang.annotation.*; 25 | 26 | import static java.lang.annotation.ElementType.METHOD; 27 | 28 | /** 29 | * Spring注入的方法 30 | */ 31 | @Documented 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target({METHOD}) 34 | @Inherited 35 | public @interface Spring { 36 | 37 | } 38 | -------------------------------------------------------------------------------- /joyrpc-spring/src/main/java/io/joyrpc/spring/event/ProviderDoneEvent.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.spring.event; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import org.springframework.context.ApplicationEvent; 24 | 25 | /** 26 | * 消费者就绪事件 27 | * 28 | * @date 16/6/2019 29 | */ 30 | public class ProviderDoneEvent extends ApplicationEvent { 31 | 32 | public ProviderDoneEvent(Object source) { 33 | super(source); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-spring/src/main/resources/META-INF/services/io.joyrpc.cache.CacheKeyGenerator: -------------------------------------------------------------------------------- 1 | io.joyrpc.cache.spring.SpelCacheKeyGenerator -------------------------------------------------------------------------------- /joyrpc-spring/src/main/resources/META-INF/services/io.joyrpc.expression.ExpressionProvider: -------------------------------------------------------------------------------- 1 | io.joyrpc.expression.spring.SpelProvider -------------------------------------------------------------------------------- /joyrpc-spring/src/main/resources/META-INF/spring.handlers: -------------------------------------------------------------------------------- 1 | http\://joyrpc.io/schema/joyrpc=io.joyrpc.spring.schema.SpringNamespaceHandler -------------------------------------------------------------------------------- /joyrpc-spring/src/main/resources/META-INF/spring.schemas: -------------------------------------------------------------------------------- 1 | http\://joyrpc.io/schema/joyrpc/joyrpc.xsd=META-INF/joyrpc.xsd -------------------------------------------------------------------------------- /joyrpc-springboot/src/main/java/io/joyrpc/spring/boot/Plugin.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.spring.boot; 2 | 3 | import io.joyrpc.extension.ExtensionPoint; 4 | import io.joyrpc.extension.ExtensionPointLazy; 5 | import io.joyrpc.spring.boot.annotation.AnnotationProvider; 6 | 7 | /** 8 | * 扩展点声明 9 | */ 10 | public interface Plugin { 11 | 12 | /** 13 | * 注解提供者 14 | */ 15 | ExtensionPoint ANNOTATION_PROVIDER = new ExtensionPointLazy<>(AnnotationProvider.class); 16 | } 17 | -------------------------------------------------------------------------------- /joyrpc-springboot/src/main/resources/META-INF/services/io.joyrpc.spring.boot.annotation.AnnotationProvider: -------------------------------------------------------------------------------- 1 | io.joyrpc.spring.boot.annotation.DefaultAnnotationProvider -------------------------------------------------------------------------------- /joyrpc-springboot/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | io.joyrpc.spring.boot.RpcAutoConfiguration -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-cluster/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-test 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-test-cluster 13 | 14 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-test 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-test-extension 13 | 14 | 15 | 16 | org.springframework.boot 17 | spring-boot-starter-test 18 | test 19 | 20 | 21 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/api/Consumer.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.api; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extensible; 24 | import io.joyrpc.extension.Ordered; 25 | 26 | @Extensible("consumer") 27 | public interface Consumer extends Ordered { 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/api/Filter.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.api; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extensible; 24 | 25 | @Extensible("filter") 26 | public interface Filter { 27 | 28 | boolean isConsumer(); 29 | 30 | enum FilterType { 31 | PROCEDURE, 32 | CONSUMER 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/api/Producer.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.api; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | public interface Producer { 24 | } 25 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/boot/MyConsumer3.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.boot; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.api.Consumer; 24 | 25 | public class MyConsumer3 implements Consumer { 26 | 27 | @Override 28 | public int order() { 29 | return ORDER; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/boot/MyProducer1.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.boot; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.api.Producer; 24 | 25 | public class MyProducer1 implements Producer { 26 | } 27 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/filter/ConsumerFilter1.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | import io.joyrpc.extension.api.Filter; 25 | 26 | @Extension("filter1") 27 | public class ConsumerFilter1 implements Filter { 28 | @Override 29 | public boolean isConsumer() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/filter/ConsumerFilter2.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | import io.joyrpc.extension.api.Filter; 25 | 26 | @Extension("filter2") 27 | public class ConsumerFilter2 implements Filter { 28 | @Override 29 | public boolean isConsumer() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/filter/ConsumerFilter3.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | import io.joyrpc.extension.api.Filter; 25 | 26 | @Extension("filter3") 27 | public class ConsumerFilter3 implements Filter { 28 | @Override 29 | public boolean isConsumer() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/filter/ConsumerFilter4.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | import io.joyrpc.extension.api.Filter; 25 | 26 | @Extension("filter4") 27 | public class ConsumerFilter4 implements Filter { 28 | @Override 29 | public boolean isConsumer() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/filter/ProcedureFilter1.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.filter; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.api.Filter; 24 | 25 | public class ProcedureFilter1 implements Filter { 26 | @Override 27 | public boolean isConsumer() { 28 | return false; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/java/io/joyrpc/extension/producer/MyProducer.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.extension.producer; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.extension.Extension; 24 | import io.joyrpc.extension.api.Producer; 25 | 26 | @Extension(singleton = false) 27 | public class MyProducer implements Producer { 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/resources/META-INF/services/io.joyrpc.extension.api.Consumer: -------------------------------------------------------------------------------- 1 | io.joyrpc.extension.consumer.MyConsumer 2 | io.joyrpc.extension.consumer.MyConsumer1 3 | io.joyrpc.extension.consumer.MyConsumer2 4 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/resources/META-INF/services/io.joyrpc.extension.api.Filter: -------------------------------------------------------------------------------- 1 | io.joyrpc.extension.filter.ProcedureFilter1 2 | io.joyrpc.extension.filter.ConsumerFilter2 3 | io.joyrpc.extension.filter.ConsumerFilter1 4 | io.joyrpc.extension.filter.ConsumerFilter3 5 | io.joyrpc.extension.filter.ConsumerFilter4 -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/resources/META-INF/services/io.joyrpc.extension.api.Producer: -------------------------------------------------------------------------------- 1 | io.joyrpc.extension.producer.MyProducer -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-extension/src/test/resources/plugin.disable: -------------------------------------------------------------------------------- 1 | filter:filter3@,,,io.joyrpc.extension.filter.ConsumerFilter4 -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-proxy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-test 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-test-proxy 13 | 14 | 15 | 16 | io.joyrpc 17 | joyrpc-proxy-bytebuddy 18 | ${project.version} 19 | 20 | 21 | io.joyrpc 22 | joyrpc-proxy-javassist 23 | ${project.version} 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-proxy/src/test/java/io/joyrpc/proxy/HelloService.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.proxy; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | /** 24 | * @date: 1 /23/2019 25 | */ 26 | public interface HelloService { 27 | 28 | /** 29 | * Say hello string. 30 | * 31 | * @return the string 32 | */ 33 | String[][] sayHello(String hello); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-quickstart/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-test 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-test-quickstart 13 | 14 | 15 | 16 | io.joyrpc 17 | joyrpc-registry-broadcast 18 | ${project.version} 19 | 20 | 21 | io.joyrpc 22 | joyrpc-registry-consul 23 | ${project.version} 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-quickstart/src/test/java/io/joyrpc/example/service/DemoService.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.example.service; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | public interface DemoService { 24 | 25 | String sayHello(String name); 26 | } 27 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-serialization/src/test/java/io/joyrpc/codec/serialization/HelloGrpc.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.serialization; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | import io.joyrpc.codec.serialization.model.PhoneType; 24 | 25 | public interface HelloGrpc { 26 | 27 | void hello(String phone, PhoneType type); 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-serialization/src/test/java/io/joyrpc/codec/serialization/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.serialization.exception; 2 | 3 | public class NotFoundException extends RuntimeException { 4 | 5 | public NotFoundException() { 6 | } 7 | 8 | public NotFoundException(String message) { 9 | super(message); 10 | } 11 | 12 | public NotFoundException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public NotFoundException(Throwable cause) { 17 | super(cause); 18 | } 19 | 20 | public NotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 21 | super(message, cause, enableSuppression, writableStackTrace); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-serialization/src/test/java/io/joyrpc/codec/serialization/model/Animal.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.serialization.model; 2 | 3 | public class Animal { 4 | 5 | private T[] owners; 6 | 7 | public T[] getOwners() { 8 | return owners; 9 | } 10 | 11 | public void setOwners(T[] owners) { 12 | this.owners = owners; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-serialization/src/test/java/io/joyrpc/codec/serialization/model/PhoneType.java: -------------------------------------------------------------------------------- 1 | package io.joyrpc.codec.serialization.model; 2 | 3 | /*- 4 | * #%L 5 | * joyrpc 6 | * %% 7 | * Copyright (C) 2019 joyrpc.io 8 | * %% 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * #L% 21 | */ 22 | 23 | public enum PhoneType { 24 | 25 | MOBILE, 26 | HOME, 27 | WORK; 28 | } 29 | -------------------------------------------------------------------------------- /joyrpc-test/joyrpc-test-util/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | joyrpc-test 7 | io.joyrpc 8 | 1.4.8-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | joyrpc-test-util 13 | 14 | 15 | -------------------------------------------------------------------------------- /license_config/apache_license/header.txt: -------------------------------------------------------------------------------- 1 | Licensed under the Apache License, Version 2.0 (the "License"); 2 | you may not use this file except in compliance with the License. 3 | You may obtain a copy of the License at 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. -------------------------------------------------------------------------------- /license_config/apache_license/license.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /license_config/descriptionTemplate.ftl: -------------------------------------------------------------------------------- 1 | joyrpc -------------------------------------------------------------------------------- /license_config/licenses.properties: -------------------------------------------------------------------------------- 1 | apache_license=The Apache Software License, Version 2.0 --------------------------------------------------------------------------------