BaseClient<nativeRequestType> Class

  • java.lang.Object
    • com.microsoft.graph.core.BaseClient<nativeRequestType>

Type Parameters

nativeRequestType

type of a request for the native http client

Implements

IBaseClient<nativeRequestType>

public class BaseClient<nativeRequestType>
implements IBaseClient<nativeRequestType>

A client that communications with an OData service

Field Summary

Modifier and Type Field and Description
static final java.lang.String DEFAULT_GRAPH_ENDPOINT

The default endpoint for the Microsoft Graph Service

Constructor Summary

Modifier Constructor Description
protected BaseClient()

Restricted constructor

Method Summary

Modifier and Type Method and Description
CustomRequestBuilder<T> customRequest(String url, Class<T> responseType)

Send a custom request to Graph

static com.microsoft.graph.core.BaseClient.Builder<nativeClient,nativeRequest> <nativeClient,nativeRequest>builder(Class<nativeClient> nativeClientClass, Class<nativeRequest> nativeRequestClass)

Gets the builder to start configuring the client

BatchRequestBuilder batch()

Get the batch request builder.

static com.microsoft.graph.core.BaseClient.Builder<okhttp3.OkHttpClient,okhttp3.Request> builder()

Gets the builder to start configuring the client

CustomRequestBuilder<com.google.gson.JsonElement> customRequest(String url)

Send a custom request to Graph

IHttpProvider<nativeRequestType> getHttpProvider()

Gets the HTTP provider

ILogger getLogger()

Gets the logger

ISerializer getSerializer()

Gets the serializer

java.lang.String getServiceRoot()

Gets the service root

java.lang.String getServiceSDKVersion()

Gets the service SDK version if the service SDK is in use, null otherwise

protected void setHttpProvider(IHttpProvider<nativeRequestType> httpProvider)

Sets the HTTP provider

protected void setLogger(ILogger logger)

Sets the logger

void setSerializer(ISerializer serializer)

Sets the serializer

void setServiceRoot(String value)

Sets the service root

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

DEFAULT_GRAPH_ENDPOINT

public static final String DEFAULT_GRAPH_ENDPOINT

The default endpoint for the Microsoft Graph Service

Constructor Details

BaseClient

protected BaseClient()

Restricted constructor

Method Details

customRequest

public CustomRequestBuilder customRequest(String url, Class responseType)

Send a custom request to Graph

Parameters:

url - the full URL to make a request with
responseType - the response class to deserialize the response into

Returns:

the instance of this builder

<nativeClient,nativeRequest>builder

public static BaseClient.Builder builder(Class nativeClientClass, Class nativeRequestClass)

Gets the builder to start configuring the client

Parameters:

nativeClientClass - the class of the native http client
nativeRequestClass - the class of the native http request

Returns:

builder to start configuring the client

batch

public BatchRequestBuilder batch()

Get the batch request builder.

Returns:

a request builder to execute a batch.

builder

public static BaseClient.Builder builder()

Gets the builder to start configuring the client

Returns:

builder to start configuring the client

customRequest

public CustomRequestBuilder customRequest(String url)

Send a custom request to Graph

Parameters:

url - the full URL to make a request with

Returns:

the instance of this builder

getHttpProvider

public IHttpProvider getHttpProvider()

Gets the HTTP provider

Returns:

The HTTP provider

getLogger

public ILogger getLogger()

Gets the logger

Returns:

The logger

getSerializer

public ISerializer getSerializer()

Gets the serializer

Returns:

The serializer

getServiceRoot

public String getServiceRoot()

Gets the service root

getServiceSDKVersion

public String getServiceSDKVersion()

Gets the service SDK version if the service SDK is in use, null otherwise

Returns:

the service SDK version if the service SDK is in use, null otherwise

setHttpProvider

protected void setHttpProvider(IHttpProvider httpProvider)

Sets the HTTP provider

Parameters:

httpProvider - The HTTP provider

setLogger

protected void setLogger(ILogger logger)

Sets the logger

Parameters:

logger - The logger

setSerializer

public void setSerializer(ISerializer serializer)

Sets the serializer

Parameters:

serializer - The serializer

setServiceRoot

public void setServiceRoot(String value)

Sets the service root

Parameters:

value

Applies to