@ConnectionManagement(friendlyName="JSON Service Account", configElementName="config-json-service-account") public class GoogleCloudStorageConnectionStrategy extends Object
Modifier and Type | Field and Description |
---|---|
protected org.mule.api.MuleContext |
muleContext |
Constructor and Description |
---|
GoogleCloudStorageConnectionStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
connect(String jsonServiceAccountFileLocation,
String projectId)
Create a Storage Instance used for interaction with the google cloud storage.
|
String |
connectionId() |
void |
disconnect() |
com.google.cloud.storage.Storage |
getStorageInstance() |
boolean |
isConnected() |
void |
setMuleContext(org.mule.api.MuleContext muleContext) |
public GoogleCloudStorageConnectionStrategy()
public com.google.cloud.storage.Storage getStorageInstance()
public void setMuleContext(org.mule.api.MuleContext muleContext)
@Connect @TestConnectivity public void connect(@FriendlyName(value="JSON Service Account File Location") @Path String jsonServiceAccountFileLocation, @FriendlyName(value="Project ID") @ConnectionKey String projectId) throws org.mule.api.ConnectionException
jsonServiceAccountFileLocation
- The location of the JSON file for the Service Account authentication. This file will be first looked for in the classpath and then in the file system.projectId
- The Id of the Projectorg.mule.api.ConnectionException
- if the Service Account Json File could not be load or is invalid@Disconnect public void disconnect()
@ValidateConnection public boolean isConnected()
@ConnectionIdentifier public String connectionId()
Copyright © 2010–2018. All rights reserved.