[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625684#comment-16625684
 ] 

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_r219804062
 
 

 ##########
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/ServiceRegistry.java
 ##########
 @@ -59,4 +59,31 @@ MicroserviceInstances findServiceInstances(String appId, 
String microserviceName
   Microservice getRemoteMicroservice(String microserviceId);
 
   Features getFeatures();
+
+  /**
+   * <p>
+   * Register a third party service if not registered before, and add 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>
+   *
+   * @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 registryMicroserviceMapping(String microserviceName, String version, 
Class<?> schemaIntfCls,
+      List<MicroserviceInstance> instances);
+
+  /**
+   * @see #registryMicroserviceMapping(String, String, Class, List)
+   * @param endpoints the endpoints of 3rd party service. Each of endpoints 
will be treated as a separated instance.
 
 Review comment:
   Yes, the example is added in the comment of method 
`registerMicroserviceMappingByEndpoints`

----------------------------------------------------------------
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)

Reply via email to