/** * Generate pay load with both JSON and XML formats for all applications. */ private String getPayLoad(Key key, Applications apps) { EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept()); String result; try { result = encoderWrapper.encode(apps); } catch (Exception e) { logger.error("Failed to encode the payload for all apps", e); return ""; } if(logger.isDebugEnabled()) { logger.debug("New application cache entry {} with apps hashcode {}", key.toStringCompact(), apps.getAppsHashCode()); } return result; }
/** * Generate pay load with both JSON and XML formats for a given application. */ private String getPayLoad(Key key, Application app) { if (app == null) { return EMPTY_PAYLOAD; } EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept()); try { return encoderWrapper.encode(app); } catch (Exception e) { logger.error("Failed to encode the payload for application {}", app.getName(), e); return ""; } }
/** * Generate pay load with both JSON and XML formats for all applications. */ private String getPayLoad(Key key, Applications apps) { EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept()); String result; try { result = encoderWrapper.encode(apps); } catch (Exception e) { logger.error("Failed to encode the payload for all apps", e); return ""; } if(logger.isDebugEnabled()) { logger.debug("New application cache entry {} with apps hashcode {}", key.toStringCompact(), apps.getAppsHashCode()); } return result; }
/** * Generate pay load with both JSON and XML formats for a given application. */ private String getPayLoad(Key key, Application app) { if (app == null) { return EMPTY_PAYLOAD; } EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept()); try { return encoderWrapper.encode(app); } catch (Exception e) { logger.error("Failed to encode the payload for application {}", app.getName(), e); return ""; } }