Package org.codehaus.jackson.map

Examples of org.codehaus.jackson.map.ObjectMapper.readValue()


  {
    D newConfig = null;
  try
  {
    ObjectMapper _jsonMapper = new ObjectMapper();
    Map<?, ?> jsonMap = _jsonMapper.readValue(jsonReader, new TypeReference<Map<?, ?>>(){});
    synchronized (_configBuilder)
      {
        fillBeanFromMap(_configBuilder, jsonMap);
      }
View Full Code Here


      }
      else
      {
        InputStream bodyStream = Channels.newInputStream(_decorated);
        ObjectMapper mapper = new ObjectMapper();
        String scnString = mapper.readValue(bodyStream, String.class);
        LOG.info("targetScn:" + scnString);

        long targetScn = Long.parseLong(scnString);

        _stateReuse.switchToTargetScnSuccess();
View Full Code Here

        }

        InputStream bodyStream = Channels.newInputStream(_decorated);

        ObjectMapper mapper = new ObjectMapper();
        String scnString = mapper.readValue(bodyStream, String.class);

        ServerInfo serverInfo  = null;
        String serverHostPort = _decorated.getMetadata(DbusConstants.SERVER_INFO_HOSTPORT_HEADER_PARAM);
        try
        {
View Full Code Here

        InputStream bodyStream = Channels.newInputStream(_decorated);
        ObjectMapper mapper = new ObjectMapper();

        List<IdNamePair> sources =
            mapper.readValue(bodyStream,
                             new TypeReference<List<IdNamePair>>()
                                 {});
       _stateReuse.switchToSourcesSuccess(sources, hostHdr, svcHdr);
      }
    }
View Full Code Here

        }

        if (registerResponseVersion == 4// DDSDBUS-2009
        {
          HashMap<String, List<Object>> responseMap =
              mapper.readValue(bodyStream, new TypeReference<HashMap<String, List<Object>>>() {});

          // Look for mandatory SOURCE_SCHEMAS_KEY.
          Map<Long, List<RegisterResponseEntry>> sourcesSchemasMap = RegisterResponseEntry.createFromResponse(responseMap,
                                                                                                              RegisterResponseEntry.SOURCE_SCHEMAS_KEY,
                                                                                                              false);
View Full Code Here

          _stateReuse.switchToRegisterSuccess(sourcesSchemasMap, keysSchemasMap, metadataSchemasList);
        }
        else // version 2 or 3
        {
          List<RegisterResponseEntry> schemasList =
              mapper.readValue(bodyStream, new TypeReference<List<RegisterResponseEntry>>() {});

          Map<Long, List<RegisterResponseEntry>> sourcesSchemasMap = RegisterResponseEntry.convertSchemaListToMap(schemasList);

          _stateReuse.switchToRegisterSuccess(sourcesSchemasMap, null, null);
        }
View Full Code Here

    KeyFilterConfigHolder configHolder = new KeyFilterConfigHolder();
        configHolder.setPartitionType(PartitionType.valueOf(type));
        KeyFilterConfig conf = null;
    if (PartitionType.MOD == configHolder.getPartitionType())
    {
       conf = mapper.readValue(configStr,KeyModFilterConfig.class);
    } else if (PartitionType.RANGE == configHolder.getPartitionType()) {
       conf = mapper.readValue(configStr,KeyRangeFilterConfig.class);
    }
    configHolder.setFilterConfig(conf);
   
View Full Code Here

        KeyFilterConfig conf = null;
    if (PartitionType.MOD == configHolder.getPartitionType())
    {
       conf = mapper.readValue(configStr,KeyModFilterConfig.class);
    } else if (PartitionType.RANGE == configHolder.getPartitionType()) {
       conf = mapper.readValue(configStr,KeyRangeFilterConfig.class);
    }
    configHolder.setFilterConfig(conf);
   
    System.out.println("Holder2 is :" + configHolder.toString());
     
View Full Code Here

     */
    home = this.searchConfigRetriever.getHome();
    //
    ObjectMapper mapper = new ObjectMapper();
    try {
      this.imageRequest = mapper.readValue(URLDecoder.decode(imageRequest, "UTF-8"), ImageRequest.class);
    } catch (Exception e){
      e.printStackTrace();
    }
    this.isLocallyAuthenticated = ogpUserContext.isAuthenticatedLocally();

View Full Code Here

   * @throws IOException
   */
  public void readConfigFile() throws IOException{
    if (configContents == null){
      ObjectMapper mapper = new ObjectMapper();
      JsonNode rootNode = mapper.readValue(this.loadConfigFile(), JsonNode.class);     
      JsonNode jsonResponse = rootNode.path("config");
      this.configContents = jsonResponse;
    }
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.