[ https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628955#comment-16628955 ]
ASF GitHub Bot commented on SCB-926: ------------------------------------ yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 3rd party service URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r220615252 ########## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/ServiceRegistry.java ########## @@ -59,4 +59,38 @@ MicroserviceInstances findServiceInstances(String appId, String microserviceName Microservice getRemoteMicroservice(String microserviceId); Features getFeatures(); + + /** + * <p> + * Register a third party service if not registered before, and set it's instances into + * {@linkplain org.apache.servicecomb.serviceregistry.consumer.StaticMicroserviceVersions StaticMicroserviceVersions}. + * </p> + * <p> + * The registered third party service has the same {@code appId} and {@code environment} as this microservice instance has, + * and there is only one schema represented by {@code schemaIntfCls}, whose name is the same as {@code microserviceName}. + * </p> + * <em> + * This method is for initializing 3rd party service endpoint config. + * i.e. If this service has not been registered before, this service will be registered and the instances will be set; + * otherwise, NOTHING will happen. + * </em> + * + * @param microserviceName name of the 3rd party service, and this param also specifies the schemaId + * @param version version of this 3rd party service + * @param schemaIntfCls the producer interface of the service. This interface is used to generate swagger schema and + * can also be used for the proxy interface of RPC style invocation. + * @param instances the instances of this 3rd party service. Users only need to specify the endpoint information, other + * necessary information will be generate and set in the implementation of this method. + */ + void registerMicroserviceMapping(String microserviceName, String version, Class<?> schemaIntfCls, Review comment: Fixed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Invoke 3rd party service > ------------------------ > > Key: SCB-926 > URL: https://issues.apache.org/jira/browse/SCB-926 > Project: Apache ServiceComb > Issue Type: New Feature > Affects Versions: java-chassis-1.1.0 > Reporter: YaoHaishi > Assignee: YaoHaishi > Priority: Major > > Provide a interface to let users specify 3rd party services' endpoints and > let users can invoke 3rd party service like invoking the ServiceComb > microservice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)