public final class LocalServerReceiver extends Object implements VerificationCodeReceiver
Implementation is thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
LocalServerReceiver.Builder
Builder.
|
| Constructor and Description |
|---|
LocalServerReceiver()
Constructor that starts the server on
"localhost" selects an unused port. |
| Modifier and Type | Method and Description |
|---|---|
String |
getHost()
Returns the host name to use.
|
int |
getPort()
Returns the port to use or
-1 to select an unused port in getRedirectUri(). |
String |
getRedirectUri() |
void |
stop() |
String |
waitForCode() |
public LocalServerReceiver()
"localhost" selects an unused port.
Use LocalServerReceiver.Builder if you need to specify any of the optional parameters.
public String getRedirectUri() throws IOException
getRedirectUri in interface VerificationCodeReceiverIOExceptionpublic String waitForCode() throws IOException
waitForCode in interface VerificationCodeReceiverIOExceptionpublic void stop()
throws IOException
stop in interface VerificationCodeReceiverIOExceptionpublic String getHost()
public int getPort()
-1 to select an unused port in getRedirectUri().Copyright © 2011-2015 Google. All Rights Reserved.