@Deprecated
public interface ProspectiveSearchService
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LEASE_DURATION_SEC
Deprecated.
The default lease duration value of zero means no expiration.
|
static int |
DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS
Deprecated.
Set to the backend service default batch size.
|
static int |
DEFAULT_LIST_TOPICS_MAX_RESULTS
Deprecated.
Set to the backend service default batch size.
|
static int |
DEFAULT_RESULT_BATCH_SIZE
Deprecated.
Set to a small size of 100 to allow quick processing in a
TaskQueue task.
|
static java.lang.String |
DEFAULT_RESULT_RELATIVE_URL
Deprecated.
The default URI path to which matches will be POSTed.
|
static java.lang.String |
DEFAULT_RESULT_TASK_QUEUE_NAME
Deprecated.
Uses the default task queue.
|
Modifier and Type | Method and Description |
---|---|
Entity |
getDocument(HttpServletRequest matchCallbackPost)
Deprecated.
Decodes document from
match(Entity, String, String,
String, String, int, boolean) result POST request. |
Subscription |
getSubscription(java.lang.String topic,
java.lang.String subId)
Deprecated.
Get the
Subscription with the given topic and id. |
java.util.List<Subscription> |
listSubscriptions(java.lang.String topic)
Deprecated.
Equivalent to:
|
java.util.List<Subscription> |
listSubscriptions(java.lang.String topic,
java.lang.String subIdStart,
int maxResults,
long expiresBefore)
Deprecated.
The listSubscriptions call lists subscriptions that are currently
active.
|
java.util.List<java.lang.String> |
listTopics(java.lang.String topicStart,
long maxResults)
Deprecated.
List topics in lexicographic order.
|
void |
match(Entity document,
java.lang.String topic)
Deprecated.
Equivalent to:
|
void |
match(Entity document,
java.lang.String topic,
java.lang.String resultKey)
Deprecated.
Equivalent to:
|
void |
match(Entity document,
java.lang.String topic,
java.lang.String resultKey,
java.lang.String resultRelativeUrl,
java.lang.String resultTaskQueueName,
int resultBatchSize,
boolean resultReturnDocument)
Deprecated.
The match call is used to present a document for matching against
all registered subscriptions of the same topic.
|
void |
subscribe(java.lang.String topic,
java.lang.String subId,
long leaseDurationSeconds,
java.lang.String query,
java.util.Map<java.lang.String,FieldType> schema)
Deprecated.
The subscribe call is used to register subscriptions, which
comprise of a subscription id and a query.
|
void |
unsubscribe(java.lang.String topic,
java.lang.String subId)
Deprecated.
Subscriptions are removed from the system using the unsubscribe
call.
|
static final int DEFAULT_LEASE_DURATION_SEC
static final int DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS
static final int DEFAULT_LIST_TOPICS_MAX_RESULTS
static final int DEFAULT_RESULT_BATCH_SIZE
static final java.lang.String DEFAULT_RESULT_RELATIVE_URL
static final java.lang.String DEFAULT_RESULT_TASK_QUEUE_NAME
com.google.appengine.api.taskqueue.QueueFactory.getDefaultQueue().getQueueName()
void subscribe(java.lang.String topic, java.lang.String subId, long leaseDurationSeconds, java.lang.String query, java.util.Map<java.lang.String,FieldType> schema)
topic
- the subscription group to which this subscription
will be added. Only match(com.google.appengine.api.datastore.Entity, java.lang.String)
calls with the same topic
will match this subscriptionsubId
- the unique string for this subscription; subscribe
will overwrite subscriptions with the same subIdquery
- the query in simple query formatleaseDurationSeconds
- time before the subscription is
automatically removed or a value of 0 for no expirationschema
- the map of field names to their corresponding
typesQuerySyntaxException
- if the query is invalid or does not
match schemaApiProxy.ApplicationException
- if the backend call failed.
See the message detail for the reasonvoid unsubscribe(java.lang.String topic, java.lang.String subId)
topic
- the subscription group of the subscriptionsubId
- the id of the subscription to remove, as specified
during subscribe(java.lang.String, java.lang.String, long, java.lang.String, java.util.Map<java.lang.String, com.google.appengine.api.prospectivesearch.FieldType>)
java.lang.IllegalArgumentException
- if the given topic does not
exist or has no subscription with the given subIdApiProxy.ApplicationException
- if the backend call failed.
See the message detail for the reasonvoid match(Entity document, java.lang.String topic)
match(entity, topic, "");
match(Entity, String, String)
void match(Entity document, java.lang.String topic, java.lang.String resultKey)
match(entity, topic, resultKey, DEFAULT_RESULT_RELATIVE_URL, DEFAULT_RESULT_TASK_QUEUE_NAME, DEFAULT_RESULT_BATCH_SIZE, true);
void match(Entity document, java.lang.String topic, java.lang.String resultKey, java.lang.String resultRelativeUrl, java.lang.String resultTaskQueueName, int resultBatchSize, boolean resultReturnDocument)
resultRelativeURL
.document
- the document to match against registered subscriptionstopic
- the subscription group to matchresultKey
- a user defined key returned with the results
message that can be used to associate the results message
with this callresultRelativeUrl
- the relative URL to which the results
message will be deliveredresultTaskQueueName
- the name of the TaskQueue to use for
delivering the results messageresultBatchSize
- the maximum number of subscription IDs per
results messageApiProxy.ApplicationException
- if the backend call failed.
See the message detail for the reasonjava.util.List<Subscription> listSubscriptions(java.lang.String topic)
listSubscriptions(topic, "", DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS, 0);
java.util.List<Subscription> listSubscriptions(java.lang.String topic, java.lang.String subIdStart, int maxResults, long expiresBefore)
topic
- the subscription group to listsubIdStart
- subscriptions which are lexicographically
greater or equal to the given value should be returned.
NOTE: The empty string precedes all othersmaxResults
- sets the maximum number of subscriptions that
should be returnedexpiresBefore
- limits the returned subscriptions to those
that expire before the given time in seconds since epoch, or
0 for no expirationApiProxy.ApplicationException
- if the backend call failed.
See the message detail for the reasonSubscription getSubscription(java.lang.String topic, java.lang.String subId)
Subscription
with the given topic and id.topic
- the subscription group to which the subscription
belongssubId
- the id of the subscriptionjava.lang.IllegalArgumentException
- if no such subscription existsApiProxy.ApplicationException
- if the backend call failed. See the
message detail for the reasonjava.util.List<java.lang.String> listTopics(java.lang.String topicStart, long maxResults)
topicStart
- the topic from which to start listing, or the
empty string to start from the beginningmaxResults
- the maximum number of topics to return. A good
default is 1000ApiProxy.ApplicationException
- if the backend call failed.
See the message detail for the reasonEntity getDocument(HttpServletRequest matchCallbackPost)
match(Entity, String, String,
String, String, int, boolean)
result POST request.matchCallbackPost
- the received POST request