The Diffusion WhoIs API is deprecated and will be removed in a future release.
@Deprecated public interface WhoIsData
There will be a root object which holds the details directly relating to the looked up IP address and this may have child objects which represent further records of data from the WhoIs request.
All data objects have an ordered map of key/value pairs and the first key is
considered to be the object type. Each key and value is free format and
depends upon the nature of the lookup and the WhoIsProvider
in use.
Modifier and Type | Method and Description |
---|---|
void |
addChild(WhoIsData child)
Deprecated.
Adds a child object.
|
void |
addValues(Map<String,String> values)
Deprecated.
Adds values to the object from a given map of values.
|
List<WhoIsData> |
children()
Deprecated.
Returns the list of child objects.
|
List<WhoIsData> |
children(String prefix)
Deprecated.
Returns a list of child objects whose type starts with a specified
prefix.
|
String |
getType()
Deprecated.
Returns the object type.
|
String |
getValue(String key)
Deprecated.
Returns a value for the specified key.
|
List<String> |
getValues(String prefix)
Deprecated.
Returns all values whose key has a given prefix.
|
Set<String> |
keys()
Deprecated.
Returns the set of keys.
|
void |
print(PrintStream out)
Deprecated.
Prints the WhoIs data.
|
void |
setValue(String key,
String value)
Deprecated.
Sets a key/value pair in the data.
|
String getType()
This is considered to be the first key added to the data.
void setValue(String key, String value)
Because the data is ordered the key will be added at the end of any existing data unless it already existed in which case it would be overridden.
key
- the key. Note that is the key already exists it will be
overwritten and therefore where duplicate keys occur the
convention is to suffix all but the first with a number (e.g.
address, address_1 etc).value
- the value.void addValues(Map<String,String> values)
As the values are added in the order of the supplied map iterator, the supplied map should itself be of an ordered type.
values
- the values to add.String getValue(String key)
key
- the keyList<String> getValues(String prefix)
This is useful when duplicates exist (e.g. address lines). The values will be returned in the order they were added.
prefix
- the key prefix.Set<String> keys()
The keys will be returned in the order that the values were added.
void addChild(WhoIsData child)
child
- the child object.List<WhoIsData> children()
List<WhoIsData> children(String prefix)
This is useful for obtaining all children of a known type (e.g. "person").
prefix
- the type prefix.void print(PrintStream out)
The type and name plus all values within the object are printed plus the same for all children.
out
- the print stream to print to.Copyright © 2021 Push Technology Ltd. All Rights Reserved.