public class LocalPubsubHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static LocalPubsubHelper |
create()
Constructs a new
LocalPubsubHelper. |
io.grpc.ManagedChannel |
createChannel()
Creates a channel for making requests to the in-memory service.
|
PubSubOptions |
options()
Returns a
PubSubOptions instance that sets the host to use the PubSub emulator on
localhost. |
void |
reset()
Reset the internal state of the emulator.
|
void |
start()
Start the local pubsub emulator through gcloud, download the zip file if user does not have
gcloud installed.
|
void |
stop()
Quit the local emulator and related local service.
|
public static LocalPubsubHelper create()
LocalPubsubHelper. The method start() must be called before it
is used.public void start()
throws IOException,
InterruptedException
InterruptedExceptionIOExceptionpublic void reset()
throws IOException
IOExceptionpublic void stop()
throws IOException,
InterruptedException
InterruptedExceptionIOExceptionpublic io.grpc.ManagedChannel createChannel()
public PubSubOptions options()
PubSubOptions instance that sets the host to use the PubSub emulator on
localhost.Copyright © 2016 Google. All rights reserved.