You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/17 01:12:00 UTC

[GitHub] wujimin commented on a change in pull request #874: [SCB-847]Provide a way to decode user's custom error data

wujimin commented on a change in pull request #874: [SCB-847]Provide a way to decode user's custom error data
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/874#discussion_r210783022
 
 

 ##########
 File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestObjectMapperFactory.java
 ##########
 @@ -17,17 +17,40 @@
 
 package org.apache.servicecomb.common.rest.codec;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * Manage RestObjectMapper instances. Give users an option to specify custom mappers.
  */
 public class RestObjectMapperFactory {
+  public static final String KEY_PROVIDER_READ_OR_CONSUMER_READ = "provider.consumer.read";
+
+  public static final String KEY_PROVIDER_WRITE = "provider.write";
+
+  public static final String KEY_CONSUMER_WRITE = "consumer.write";
+
   private static AbstractRestObjectMapper defaultMapper = new RestObjectMapper();
 
+  private static Map<String, AbstractRestObjectMapper> allMappers = new HashMap<>();
 
 Review comment:
   no need to wrap as a map, just two method is enough:
   1.getDefaultMapper
   2.getConsumerWriteMapper

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services