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>projectIdsprotected 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 IServerRestClientClusteraddheader(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 instanceIServerRestClientClusterbody(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.RestClientbuild(IDSSXMLSessionId iSessionId)RestClientbuild(IDSSXMLSessionId iSessionId, java.lang.String requestBody)IServerRestClientClusterconnectTimeout(int connectTimeout)Set http connect timeoutjava.lang.StringgetMasterSessionId()java.util.List<java.lang.String>getProjectIds()java.util.List<ProjectRequest>getProjectRequests()IServerRestClientClusterheaders(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 instanceIServerRestClientClustermediaType(MediaTypes mediaType)Set media type using EnumIServerRestClientClustermediaType(java.lang.String mediaType)Set media type using String valueIServerRestClientClustermethodTypes(MethodTypes methodTypes)IServerRestClientClusterprojectIds(java.util.List<java.lang.String> projectIds)IServerRestClientClusterprojectRequests(java.util.List<ProjectRequest> projectRequests)IServerRestClientClusterreadTimeout(int readTimeout)Set http read timeoutIServerRestClientClusterrelativeUrl(java.lang.String relativeUrl)Provide a relative URLIServerRestClientClustersessionId(java.lang.String sessionId)master session to the cluster of Intelligence ServersIServerRestClientClusterurl(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:
sessionIdin classIServerRestClientBuilder- Parameters:
sessionId-- Returns:
-
relativeUrl
public IServerRestClientCluster relativeUrl(java.lang.String relativeUrl)
Description copied from class:IServerRestClientBuilderProvide a relative URL- Overrides:
relativeUrlin 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:
urlin 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:
bodyin classIServerRestClientBuilder- Parameters:
body-- Returns:
-
methodTypes
public IServerRestClientCluster methodTypes(MethodTypes methodTypes)
- Overrides:
methodTypesin 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:
headersin 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:
addheaderin classIServerRestClientBuilder- Parameters:
key-value-- Returns:
-
mediaType
public IServerRestClientCluster mediaType(java.lang.String mediaType)
Description copied from class:RestClientBuilderSet media type using String value- Overrides:
mediaTypein classIServerRestClientBuilder- Parameters:
mediaType- Any valid "accept" header value- Returns:
-
mediaType
public IServerRestClientCluster mediaType(MediaTypes mediaType)
Description copied from class:RestClientBuilderSet media type using Enum- Overrides:
mediaTypein classIServerRestClientBuilder- Returns:
-
connectTimeout
public IServerRestClientCluster connectTimeout(int connectTimeout)
Set http connect timeout- Overrides:
connectTimeoutin classIServerRestClientBuilder- Parameters:
connectTimeout-- Returns:
-
readTimeout
public IServerRestClientCluster readTimeout(int readTimeout)
Set http read timeout- Overrides:
readTimeoutin 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
-
-