RequestContext Class

  • java.lang.Object
    • com.microsoft.store.partnercenter.requestcontext.RequestContext

Implements

public class RequestContext implements IRequestContext

Request context implementation.

Constructor Summary

Constructor Description
RequestContext()

Initializes a new instance of the RequestContext class.

RequestContext(String locale)

Initializes a new instance of the RequestContext class with provided locale.

RequestContext(UUID correlationId)

Initializes a new instance of the RequestContext class with a correlation Id.

RequestContext(UUID correlationId, String locale)

Initializes a new instance of the RequestContext class with a correlation Id and the provided locale.

RequestContext(UUID correlationId, UUID requestId, String locale)

Initializes a new instance of the RequestContext class with the given correlation, request identifier and locale.

Method Summary

Modifier and Type Method and Description
java.util.UUID getCorrelationId()

Gets the correlation identifier.

java.lang.String getLocale()

Gets the locale.

java.util.UUID getRequestId()

Gets the request identifier.

void setCorrelationId(UUID value)

Sets the correlation identifier.

void setLocale(String value)

Sets the locale.

void setRequestId(UUID value)

Sets the request identifier.

java.lang.String toString()

Returns a string representation of the request context.

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) 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(long) java.lang.Object.wait(long,int)

Constructor Details

RequestContext

public RequestContext()

Initializes a new instance of the RequestContext class. Correlation Id will be generated. The request Id will be automatically generated for each service API call.

RequestContext

public RequestContext(String locale)

Initializes a new instance of the RequestContext class with provided locale. Correlation Id will be generated. The request Id will be automatically generated for each service API call.

Parameters:

locale - The locale.

RequestContext

public RequestContext(UUID correlationId)

Initializes a new instance of the RequestContext class with a correlation Id. The request Id will be automatically generated and a default Locale is set for each service API call.

Parameters:

correlationId - The correlation Id. This Id is used to group logical operations together.

RequestContext

public RequestContext(UUID correlationId, String locale)

Initializes a new instance of the RequestContext class with a correlation Id and the provided locale. The request Id will be automatically generated for each service API call.

Parameters:

correlationId - The correlation Id. This Id is used to group logical operations together.
locale - The locale.

RequestContext

public RequestContext(UUID correlationId, UUID requestId, String locale)

Initializes a new instance of the RequestContext class with the given correlation, request identifier and locale.

Parameters:

correlationId - The correlation Id. This Id is used to group logical operations together.
requestId - The request Id. Uniquely identifies the operation.
locale - The locale.

Method Details

getCorrelationId

public UUID getCorrelationId()

Gets the correlation identifier. This identifier is used to group logical operations together.

getLocale

public String getLocale()

Gets the locale.

Returns:

The locale.

getRequestId

public UUID getRequestId()

Gets the request identifier. Uniquely identifies the operation.

Returns:

the request identifier.

setCorrelationId

public void setCorrelationId(UUID value)

Sets the correlation identifier.

Parameters:

value - The correlation identifier.

setLocale

public void setLocale(String value)

Sets the locale.

Parameters:

value - The locale.

setRequestId

public void setRequestId(UUID value)

Sets the request identifier.

Parameters:

value - The request identifier.

toString

public String toString()

Returns a string representation of the request context.

Overrides:

RequestContext.toString()

Returns:

A string representation of the request context.

Applies to