Class MockMetadataServerTransport (1.33.4)

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
NameDescription
accessTokenString

Methods

buildRequest(String method, String url)

public LowLevelHttpRequest buildRequest(String method, String url)
Parameters
NameDescription
methodString
urlString
Returns
TypeDescription
com.google.api.client.http.LowLevelHttpRequest
Overrides
com.google.api.client.testing.http.MockHttpTransport.buildRequest(java.lang.String,java.lang.String)
Exceptions
TypeDescription
IOException

setTokenRequestStatusCode(Integer tokenRequestStatusCode)

public void setTokenRequestStatusCode(Integer tokenRequestStatusCode)
Parameter
NameDescription
tokenRequestStatusCodeInteger