Package com.microstrategy.webapi.restApi
Class IServerRestClientCluster
- java.lang.Object
-
- com.microstrategy.webapi.restApi.RestClientBuilder
-
- com.microstrategy.webapi.restApi.IServerRestClientBuilder
-
- com.microstrategy.webapi.restApi.IServerRestClientCluster
-
public class IServerRestClientCluster extends IServerRestClientBuilder
Create a rest client to a specific Intelligence Server in the cluster
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>
projectIds
protected java.util.List<ProjectRequest>
projectRequests
-
Fields inherited from class com.microstrategy.webapi.restApi.IServerRestClientBuilder
I_SERVER_PROJECT_ID_HEADER, I_SERVER_SESSION_HEADER, relativeUrl, sessionId
-
Fields inherited from class com.microstrategy.webapi.restApi.RestClientBuilder
body, connectTimeout, headers, isTLSEnabled, mediaType, methodTypes, readTimeout, responseWrapper, url
-
-
Constructor Summary
Constructors Constructor Description IServerRestClientCluster()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IServerRestClientCluster
addheader(java.lang.String key, java.lang.String value)
REST client cluster should not use add headers to update each client instance, Instead the headers should be defined in build method as it is per client instanceIServerRestClientCluster
body(java.lang.String body)
REST client cluster should not use body to update each client instance, unless each project in request has the same request body.RestClient
build(IDSSXMLSessionId iSessionId)
RestClient
build(IDSSXMLSessionId iSessionId, java.lang.String requestBody)
IServerRestClientCluster
connectTimeout(int connectTimeout)
Set http connect timeoutjava.lang.String
getMasterSessionId()
java.util.List<java.lang.String>
getProjectIds()
java.util.List<ProjectRequest>
getProjectRequests()
IServerRestClientCluster
headers(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
REST client cluster should not use add headers to update each client instance, Instead the headers should be defined in build method as it is per client instanceIServerRestClientCluster
mediaType(MediaTypes mediaType)
Set media type using EnumIServerRestClientCluster
mediaType(java.lang.String mediaType)
Set media type using String valueIServerRestClientCluster
methodTypes(MethodTypes methodTypes)
IServerRestClientCluster
projectIds(java.util.List<java.lang.String> projectIds)
IServerRestClientCluster
projectRequests(java.util.List<ProjectRequest> projectRequests)
IServerRestClientCluster
readTimeout(int readTimeout)
Set http read timeoutIServerRestClientCluster
relativeUrl(java.lang.String relativeUrl)
Provide a relative URLIServerRestClientCluster
sessionId(java.lang.String sessionId)
master session to the cluster of Intelligence ServersIServerRestClientCluster
url(java.lang.String url)
REST client cluster should not use add headers to update each client instance, Instead the url should be defined in build method as it is per client instance-
Methods inherited from class com.microstrategy.webapi.restApi.IServerRestClientBuilder
build, streamBody, toString
-
Methods inherited from class com.microstrategy.webapi.restApi.RestClientBuilder
responseWrapper
-
-
-
-
Field Detail
-
projectIds
protected java.util.List<java.lang.String> projectIds
-
projectRequests
protected java.util.List<ProjectRequest> projectRequests
-
-
Method Detail
-
projectIds
public IServerRestClientCluster projectIds(java.util.List<java.lang.String> projectIds)
-
projectRequests
public IServerRestClientCluster projectRequests(java.util.List<ProjectRequest> projectRequests)
-
sessionId
public IServerRestClientCluster sessionId(java.lang.String sessionId)
master session to the cluster of Intelligence Servers- Overrides:
sessionId
in classIServerRestClientBuilder
- Parameters:
sessionId
-- Returns:
-
relativeUrl
public IServerRestClientCluster relativeUrl(java.lang.String relativeUrl)
Description copied from class:IServerRestClientBuilder
Provide a relative URL- Overrides:
relativeUrl
in classIServerRestClientBuilder
-
url
public IServerRestClientCluster url(java.lang.String url)
REST client cluster should not use add headers to update each client instance, Instead the url should be defined in build method as it is per client instance- Overrides:
url
in classIServerRestClientBuilder
- Parameters:
url
-- Returns:
-
body
public IServerRestClientCluster body(java.lang.String body)
REST client cluster should not use body to update each client instance, unless each project in request has the same request body. If each project in request has different request body, body should be defined in build method with requestbody as input parameter- Overrides:
body
in classIServerRestClientBuilder
- Parameters:
body
-- Returns:
-
methodTypes
public IServerRestClientCluster methodTypes(MethodTypes methodTypes)
- Overrides:
methodTypes
in classIServerRestClientBuilder
- Returns:
-
headers
public IServerRestClientCluster headers(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
REST client cluster should not use add headers to update each client instance, Instead the headers should be defined in build method as it is per client instance- Overrides:
headers
in classIServerRestClientBuilder
- Parameters:
headers
-- Returns:
-
addheader
public IServerRestClientCluster addheader(java.lang.String key, java.lang.String value)
REST client cluster should not use add headers to update each client instance, Instead the headers should be defined in build method as it is per client instance- Overrides:
addheader
in classIServerRestClientBuilder
- Parameters:
key
-value
-- Returns:
-
mediaType
public IServerRestClientCluster mediaType(java.lang.String mediaType)
Description copied from class:RestClientBuilder
Set media type using String value- Overrides:
mediaType
in classIServerRestClientBuilder
- Parameters:
mediaType
- Any valid "accept" header value- Returns:
-
mediaType
public IServerRestClientCluster mediaType(MediaTypes mediaType)
Description copied from class:RestClientBuilder
Set media type using Enum- Overrides:
mediaType
in classIServerRestClientBuilder
- Returns:
-
connectTimeout
public IServerRestClientCluster connectTimeout(int connectTimeout)
Set http connect timeout- Overrides:
connectTimeout
in classIServerRestClientBuilder
- Parameters:
connectTimeout
-- Returns:
-
readTimeout
public IServerRestClientCluster readTimeout(int readTimeout)
Set http read timeout- Overrides:
readTimeout
in classIServerRestClientBuilder
- Parameters:
readTimeout
-- Returns:
-
getProjectIds
public java.util.List<java.lang.String> getProjectIds()
-
getProjectRequests
public java.util.List<ProjectRequest> getProjectRequests()
-
getMasterSessionId
public java.lang.String getMasterSessionId()
-
build
public RestClient build(IDSSXMLSessionId iSessionId) throws MSTRWebAPIException
- Parameters:
iSessionId
- - a configuration session Id or a project session Id targeting to a specific Intelligence Server- Returns:
- RestClient - a object to send the http request to the specific Intelligence Server
- Throws:
MSTRWebAPIException
-
build
public RestClient build(IDSSXMLSessionId iSessionId, java.lang.String requestBody) throws MSTRWebAPIException
- Parameters:
iSessionId
- - a configuration session Id or a project session Id targeting to a specific Intelligence ServerrequestBody
- - the specific request body to the Intelligence Server- Returns:
- RestClient - a object to send the http request to the specific Intelligence Server
- Throws:
MSTRWebAPIException
-
-