public abstract class AbstractGPlusProvider extends Object implements StreamsProvider
Modifier and Type | Field and Description |
---|---|
protected com.google.api.client.googleapis.auth.oauth2.GoogleCredential |
credential |
protected com.google.api.services.plus.Plus |
plus |
static String |
STREAMS_ID |
Constructor and Description |
---|
AbstractGPlusProvider() |
AbstractGPlusProvider(GPlusConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
protected com.google.api.services.plus.Plus |
createPlusClient() |
GPlusConfiguration |
getConfig() |
protected abstract Runnable |
getDataCollector(org.apache.streams.util.api.requests.backoff.BackOffStrategy strategy,
BlockingQueue<StreamsDatum> queue,
com.google.api.services.plus.Plus plus,
UserInfo userInfo) |
String |
getId() |
boolean |
isRunning() |
void |
prepare(Object configurationObject) |
StreamsResultSet |
readCurrent() |
StreamsResultSet |
readNew(BigInteger sequence) |
StreamsResultSet |
readRange(org.joda.time.DateTime start,
org.joda.time.DateTime end) |
void |
setConfig(GPlusConfiguration config) |
void |
setDefaultAfterDate(org.joda.time.DateTime defaultAfterDate)
Set and overwrite the default after date that was read from teh configuration file.
|
void |
setDefaultBeforeDate(org.joda.time.DateTime defaultBeforeDate)
Set and overwrite the default before date that was read from the configuration file.
|
void |
setUserInfoWithAfterDate(Map<String,org.joda.time.DateTime> usersAndAfterDates)
Set and overwrite user into from the configuration file.
|
void |
setUserInfoWithDefaultDates(Set<String> userIds)
Sets and overwrite the user info from the configuaration file.
|
void |
startStream() |
public static final String STREAMS_ID
protected com.google.api.client.googleapis.auth.oauth2.GoogleCredential credential
protected com.google.api.services.plus.Plus plus
public AbstractGPlusProvider()
public AbstractGPlusProvider(GPlusConfiguration config)
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void startStream()
startStream
in interface StreamsProvider
protected abstract Runnable getDataCollector(org.apache.streams.util.api.requests.backoff.BackOffStrategy strategy, BlockingQueue<StreamsDatum> queue, com.google.api.services.plus.Plus plus, UserInfo userInfo)
public String getId()
getId
in interface StreamsOperation
public StreamsResultSet readCurrent()
readCurrent
in interface StreamsProvider
public StreamsResultSet readNew(BigInteger sequence)
readNew
in interface StreamsProvider
public StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange
in interface StreamsProvider
protected com.google.api.services.plus.Plus createPlusClient() throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public void cleanUp()
cleanUp
in interface StreamsOperation
public GPlusConfiguration getConfig()
public void setConfig(GPlusConfiguration config)
public void setDefaultBeforeDate(org.joda.time.DateTime defaultBeforeDate)
defaultBeforeDate
- defaultBeforeDatepublic void setDefaultAfterDate(org.joda.time.DateTime defaultAfterDate)
defaultAfterDate
- defaultAfterDatepublic void setUserInfoWithDefaultDates(Set<String> userIds)
userIds
- userIdspublic void setUserInfoWithAfterDate(Map<String,org.joda.time.DateTime> usersAndAfterDates)
usersAndAfterDates
- usersAndAfterDatespublic boolean isRunning()
isRunning
in interface StreamsProvider
Copyright © 2017 The Apache Software Foundation. All rights reserved.