public class HostService extends BaseService
DATA_TYPE_INT, DATA_TYPE_STRING, DEFAULT_FROM, DEFAULT_PAGE_SIZE, FIELDS_SEPARATOR, MEDIA_TYPE_TEXT_CSV_TYPE, MSG_CLUSTER_NOT_FOUND, MSG_CLUSTER_OR_HOST_NOT_FOUND, MSG_INVALID_ARGUMENTS, MSG_INVALID_REQUEST, MSG_NOT_AUTHENTICATED, MSG_PERMISSION_DENIED, MSG_REQUEST_ACCEPTED, MSG_RESOURCE_ALREADY_EXISTS, MSG_RESOURCE_NOT_FOUND, MSG_SERVER_ERROR, MSG_SUCCESSFUL_OPERATION, MSG_VIEW_NOT_FOUND, PARAM_TYPE_BODY, PARAM_TYPE_QUERY, QUERY_FIELDS, QUERY_FILTER_DESCRIPTION, QUERY_FROM, QUERY_FROM_DESCRIPTION, QUERY_FROM_VALUES, QUERY_PAGE_SIZE, QUERY_PAGE_SIZE_DESCRIPTION, QUERY_PREDICATE, QUERY_PREDICATE_DESCRIPTION, QUERY_SORT, QUERY_SORT_DESCRIPTION, QUERY_TO, QUERY_TO_DESCRIPTION, QUERY_TO_TYPE, QUERY_TO_VALUES, requestAuditLogger, RESPONSE_CONTAINER_LIST
Constructor and Description |
---|
HostService()
Constructor.
|
HostService(String clusterName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createHost(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui,
String hostName)
Handles POST /clusters/{clusterID}/hosts/{hostID}
Create a specific host.
|
protected ResourceInstance |
createHostResource(String clusterName,
String hostName)
Create a service resource instance.
|
javax.ws.rs.core.Response |
createHosts(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui)
Handles POST /clusters/{clusterID}/hosts
Create hosts by specifying an array of hosts in the http body.
|
javax.ws.rs.core.Response |
deleteHost(javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui,
String hostName)
Handles DELETE /clusters/{clusterID}/hosts/{hostID}
Deletes a specific host.
|
javax.ws.rs.core.Response |
deleteHosts(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui) |
AlertService |
getAlertHandler(String hostName)
Get the alerts sub-resource.
|
AlertHistoryService |
getAlertHistoryService(javax.ws.rs.core.Request request,
String hostName)
Gets the alert history service
|
javax.ws.rs.core.Response |
getHost(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui,
String hostName)
Handles GET /clusters/{clusterID}/hosts/{hostID} and /hosts/{hostID}
Get a specific host.
|
HostComponentService |
getHostComponentHandler(String hostName)
Get the host_components sub-resource.
|
HostKerberosIdentityService |
getHostKerberosIdentityHandler(String hostName)
Get the kerberos_identities sub-resource.
|
javax.ws.rs.core.Response |
getHosts(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui)
Handles GET /clusters/{clusterID}/hosts and /hosts
Get all hosts for a cluster.
|
HostStackVersionService |
getHostStackVersionService(javax.ws.rs.core.Request request,
String hostName)
Gets the host stack versions service.
|
javax.ws.rs.core.Response |
updateHost(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui,
String hostName)
Handles PUT /clusters/{clusterID}/hosts/{hostID}
Updates a specific host.
|
javax.ws.rs.core.Response |
updateHosts(String body,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo ui)
Handles PUT /clusters/{clusterID}/hosts
Updates multiple hosts.
|
createResource, getBodyParser, getResultSerializer, getResultSerializer, handleRequest, handleRequest, init
public HostService()
public HostService(String clusterName)
clusterName
- cluster idpublic javax.ws.rs.core.Response getHost(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui, String hostName)
headers
- http headersui
- uri infohostName
- host namepublic javax.ws.rs.core.Response getHosts(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui)
headers
- http headersui
- uri infopublic javax.ws.rs.core.Response createHosts(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui)
body
- http bodyheaders
- http headersui
- uri infopublic javax.ws.rs.core.Response createHost(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui, String hostName)
body
- http bodyheaders
- http headersui
- uri infohostName
- host namepublic javax.ws.rs.core.Response updateHost(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui, String hostName)
body
- http bodyheaders
- http headersui
- uri infohostName
- host namepublic javax.ws.rs.core.Response updateHosts(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui)
body
- http bodyheaders
- http headersui
- uri infopublic javax.ws.rs.core.Response deleteHost(@Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui, String hostName)
headers
- http headersui
- uri infohostName
- host namepublic javax.ws.rs.core.Response deleteHosts(String body, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo ui)
public HostComponentService getHostComponentHandler(String hostName)
hostName
- host namepublic HostKerberosIdentityService getHostKerberosIdentityHandler(String hostName)
hostName
- host namepublic AlertService getAlertHandler(String hostName)
hostName
- host namepublic AlertHistoryService getAlertHistoryService(@Context javax.ws.rs.core.Request request, String hostName)
request
- the requesthostName
- the host namepublic HostStackVersionService getHostStackVersionService(@Context javax.ws.rs.core.Request request, String hostName)
request
- the requesthostName
- the host nameprotected ResourceInstance createHostResource(String clusterName, String hostName)
clusterName
- clusterhostName
- host nameCopyright © 2022 Apache Software Foundation. All rights reserved.