public class DataCenterAwareMarshallingStrategy extends Object implements com.thoughtworks.xstream.MarshallingStrategy
InstanceInfo
type and can create a more useful DataCenterInfo
for it
after unmarshalling. If the InstanceInfo has a metadataMap containing an
instanceId
, and the DataCenterInfo is not already an AmazonInfo, then the
instanceId is used to create an identifier, but appending it to the existing one. This
is useful when not running Eureka in bare EC2 VMs, so the EC2 metadata is not available
for uniquely identifying the InstanceInfo (the default is to just use the hostname, but
that isn't very useful when sitting behind a proxy).Modifier and Type | Class and Description |
---|---|
static class |
DataCenterAwareMarshallingStrategy.InstanceIdDataCenterInfo |
Constructor and Description |
---|
DataCenterAwareMarshallingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
marshal(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
Object obj,
com.thoughtworks.xstream.converters.ConverterLookup converterLookup,
com.thoughtworks.xstream.mapper.Mapper mapper,
com.thoughtworks.xstream.converters.DataHolder dataHolder) |
Object |
unmarshal(Object root,
com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.DataHolder dataHolder,
com.thoughtworks.xstream.converters.ConverterLookup converterLookup,
com.thoughtworks.xstream.mapper.Mapper mapper) |
public Object unmarshal(Object root, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.DataHolder dataHolder, com.thoughtworks.xstream.converters.ConverterLookup converterLookup, com.thoughtworks.xstream.mapper.Mapper mapper)
unmarshal
in interface com.thoughtworks.xstream.MarshallingStrategy
public void marshal(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, Object obj, com.thoughtworks.xstream.converters.ConverterLookup converterLookup, com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.DataHolder dataHolder)
marshal
in interface com.thoughtworks.xstream.MarshallingStrategy
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.