public final class ServerNode extends JsonNode
ServerNode
class is responsible for knowing how to create a URL for a server, create a URL to obtain a
server's repositories, and parse a JSON response into repository
objects.Constructor and Description |
---|
ServerNode(Server server) |
Modifier and Type | Method and Description |
---|---|
URL |
getFindRepositoriesUrl() |
Collection<Repository> |
getRepositories(String jsonResponse) |
URL |
getUrl()
The URL will NOT end in '/'.
|
children, getContent, getId, properties, toString, withChild, withMixin, withPrimaryType, withProperty
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, write
public ServerNode(Server server)
server
- the server containing the repositories (never null
)public URL getUrl() throws Exception
The URL will NOT end in '/'.
getUrl
in class JsonNode
Exception
- if there is a problem constructing the URLJsonNode.getUrl()
public URL getFindRepositoriesUrl() throws Exception
null
)Exception
- if there is a problem obtaining the repositoriespublic Collection<Repository> getRepositories(String jsonResponse) throws Exception
jsonResponse
- the HTTP connection JSON response (never null
) containing the repositoriesnull
)Exception
- if there is a problem obtaining the repositoriesCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.