StringBuffer backupTransportParams = new StringBuffer();
for (Pair<TransportConfiguration, TransportConfiguration> pair : pairs)
{
if (pair.a != null)
{
TransportConfiguration live = pair.a;
if(liveTransportClassNames.length() > 0)
{
liveTransportClassNames.append(",");
}
liveTransportClassNames.append(live.getFactoryClassName());
Map<String, Object> params = live.getParams();
liveTransportParams.append("{");
for (Map.Entry<String, Object> stringObjectEntry : params.entrySet())
{
if(liveTransportParams.length() > 1)
{
liveTransportParams.append(",");
}
liveTransportParams.append(stringObjectEntry.getKey()).append("=").append(stringObjectEntry.getValue());
}
liveTransportParams.append("}");
}
if (pair.b != null)
{
TransportConfiguration backUp = pair.b;
if(backupTransportClassNames.length() > 0)
{
backupTransportClassNames.append(",");
}
backupTransportClassNames.append(backUp.getFactoryClassName());
Map<String, Object> params = backUp.getParams();
backupTransportParams.append("{");
for (Map.Entry<String, Object> stringObjectEntry : params.entrySet())
{
if(backupTransportParams.length() > 1)
{