Class MockMetadataServerTransport (2.7.0)

public class MockMetadataServerTransport extends MockHttpTransport

Beta
Transport that simulates the GCE metadata server for access tokens.

Inheritance

java.lang.Object > com.google.api.client.http.HttpTransport > com.google.api.client.testing.http.MockHttpTransport > MockMetadataServerTransport

Constructors

MockMetadataServerTransport(String accessToken)

public MockMetadataServerTransport(String accessToken)
Parameter
Name Description
accessToken String

Methods

buildRequest(String method, String url)

public LowLevelHttpRequest buildRequest(String method, String url)
Parameters
Name Description
method String
url String
Returns
Type Description
com.google.api.client.http.LowLevelHttpRequest
Overrides
com.google.api.client.testing.http.MockHttpTransport.buildRequest(java.lang.String,java.lang.String)
Exceptions
Type Description
IOException

setTokenRequestStatusCode(Integer tokenRequestStatusCode)

public void setTokenRequestStatusCode(Integer tokenRequestStatusCode)
Parameter
Name Description
tokenRequestStatusCode Integer