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

ASF GitHub Bot commented on SCB-967:
------------------------------------

wujimin commented on a change in pull request #960: [SCB-967] Support configed 
IP send request
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/960#discussion_r226193922
 
 

 ##########
 File path: 
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java
 ##########
 @@ -167,6 +176,23 @@ private void preCheck() {
 
   @Override
   public void handle(Invocation invocation, AsyncResponse asyncResp) throws 
Exception {
+    String endpointUri = 
invocation.getLocalContext(SERVICECOMB_SERVER_ENDPOINT);
+    if (endpointUri != null) {
+      String endpointRule = "[a-z]+://.+";
+      if (!endpointUri.matches(endpointRule)) {
+        throw new InvocationException(Status.BAD_REQUEST,
+            "the endpoint's format of the configuration is incorrect, e.g 
rest://127.0.0.1:8080");
+      }
+      URI formatUri = new URI(endpointUri);
+      Transport transport = 
CseContext.getInstance().getTransportManager().findTransport(formatUri.getScheme());
 
 Review comment:
   do not use CseContext anymore, change to ScbEngine

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


> support configed ip send request
> --------------------------------
>
>                 Key: SCB-967
>                 URL: https://issues.apache.org/jira/browse/SCB-967
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>          Components: Java-Chassis
>            Reporter: WeiChao
>            Assignee: WeiChao
>            Priority: Major
>             Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to