private void addServerIPAndHostEntries() { String hostName = serverConfigurationInformation.getHostName(); String ipAddress = serverConfigurationInformation.getIpAddress(); if (hostName != null && !"".equals(hostName)) { Entry entry = new Entry(SynapseConstants.SERVER_HOST); entry.setValue(hostName); synapseConfiguration.addEntry(SynapseConstants.SERVER_HOST, entry); } if (ipAddress != null && !"".equals(ipAddress)) { Entry entry = new Entry(SynapseConstants.SERVER_IP); entry.setValue(ipAddress); if (synapseConfiguration.getAxisConfiguration().getTransportsIn() != null) { Map<String, TransportInDescription> transportInConfigMap = synapseConfiguration.getAxisConfiguration().getTransportsIn(); if (transportInConfigMap != null) { TransportInDescription transportInDescription = transportInConfigMap.get("http"); if (transportInDescription != null) { Parameter bindAddressParam = transportInDescription.getParameter("bind-address"); if (bindAddressParam != null) { entry.setValue(bindAddressParam.getValue()); } } } } synapseConfiguration.addEntry(SynapseConstants.SERVER_IP, entry); } }
@Override public List<Entry> marshal(Map<String, ? extends Set<String>> map) throws Exception { List<Entry> entryList = new ArrayList<StringSetMapAdapter.Entry>(); for (Map.Entry<String, ? extends Set<String>> mapEntry : map.entrySet()) { for (String value : mapEntry.getValue()) { Entry entry = new Entry(); entry.setKey(mapEntry.getKey()); entry.setValue(value); entryList.add(entry); } } return entryList; }
@Override public V setValue(V value) { return ent.setValue(value); }