public class PubSubConnection extends Object implements com.mulesoft.connectors.commons.template.connection.ConnectorConnection
| Constructor and Description |
|---|
PubSubConnection(com.google.cloud.pubsub.v1.stub.PublisherStubSettings pubSettings,
com.google.cloud.pubsub.v1.stub.SubscriberStubSettings subSettings,
com.google.api.gax.core.FixedCredentialsProvider credentialsProvider,
org.mule.runtime.api.scheduler.Scheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
Snapshot |
createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest createSnapshotRequest) |
void |
deleteSnapshot(com.google.pubsub.v1.DeleteSnapshotRequest deleteSnapshotRequest) |
void |
disconnect() |
static Snapshot |
fromPubSubSnapshot(com.google.pubsub.v1.Snapshot pubSubSnapshot)
Method for translating Google Pub Sub library snapshot to connector's API model
|
com.google.api.gax.core.CredentialsProvider |
getCredentialsProvider() |
org.mule.runtime.api.scheduler.Scheduler |
getIoScheduler() |
com.google.pubsub.v1.Schema |
getSchema(String schema) |
Snapshot |
getSnapshot(com.google.pubsub.v1.GetSnapshotRequest getSnapshotRequest) |
com.google.pubsub.v1.ListSnapshotsResponse |
getSnapshotsListResponse(com.google.pubsub.v1.ListSnapshotsRequest listSnapshotsRequest) |
com.google.pubsub.v1.Subscription |
getSubscription(String subscriptionId) |
com.google.pubsub.v1.Subscription |
getSubscription(String projectId,
String subscriptionName) |
com.google.pubsub.v1.Topic |
getTopic(String topicId) |
com.google.pubsub.v1.Topic |
getTopic(String projectId,
String topicName) |
List<String> |
listSnapshots(String topic) |
List<String> |
listSubscriptions(String topic) |
List<com.google.pubsub.v1.Topic> |
listTopics(String projectId) |
Snapshot |
patchSnapshot(InputStream snapshotRequest,
String updateMask) |
com.google.api.core.ApiFuture<com.google.pubsub.v1.PublishResponse> |
publishMessage(com.google.pubsub.v1.PublishRequest publishRequest) |
void |
seekMessages(com.google.pubsub.v1.SeekRequest seekRequest) |
void |
validate() |
public PubSubConnection(com.google.cloud.pubsub.v1.stub.PublisherStubSettings pubSettings,
com.google.cloud.pubsub.v1.stub.SubscriberStubSettings subSettings,
com.google.api.gax.core.FixedCredentialsProvider credentialsProvider,
org.mule.runtime.api.scheduler.Scheduler scheduler)
throws IOException
IOExceptionpublic Snapshot createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest createSnapshotRequest)
public Snapshot patchSnapshot(InputStream snapshotRequest, String updateMask) throws IOException
IOExceptionpublic void deleteSnapshot(com.google.pubsub.v1.DeleteSnapshotRequest deleteSnapshotRequest)
public Snapshot getSnapshot(com.google.pubsub.v1.GetSnapshotRequest getSnapshotRequest)
public com.google.pubsub.v1.ListSnapshotsResponse getSnapshotsListResponse(com.google.pubsub.v1.ListSnapshotsRequest listSnapshotsRequest)
public com.google.api.core.ApiFuture<com.google.pubsub.v1.PublishResponse> publishMessage(com.google.pubsub.v1.PublishRequest publishRequest)
public void seekMessages(com.google.pubsub.v1.SeekRequest seekRequest)
public com.google.pubsub.v1.Topic getTopic(String topicId)
public com.google.pubsub.v1.Subscription getSubscription(String subscriptionId)
public com.google.pubsub.v1.Subscription getSubscription(String projectId, String subscriptionName)
public com.google.pubsub.v1.Schema getSchema(String schema)
public void disconnect()
disconnect in interface com.mulesoft.connectors.commons.template.connection.ConnectorConnectionpublic void validate()
validate in interface com.mulesoft.connectors.commons.template.connection.ConnectorConnectionpublic com.google.api.gax.core.CredentialsProvider getCredentialsProvider()
public static Snapshot fromPubSubSnapshot(com.google.pubsub.v1.Snapshot pubSubSnapshot)
pubSubSnapshot - Google Pub Sub library snapshotpublic org.mule.runtime.api.scheduler.Scheduler getIoScheduler()
Copyright © 2021 MuleSoft, Inc.. All rights reserved.