## com.google.appengine.api.prospectivesearch
Class Subscription

    java.lang.Object
      com.google.appengine.api.prospectivesearch.Subscription

    public final class Subscription

extends java.lang.Object

The Subscription class represents information about a registered subscription.

See Also:
  `ProspectiveSearchService#subscribe(String, String, long, String, Map<String,SchemaField>)`

Nested Class Summary
`static class` `Subscription.State` The state of the subscription in the backend system.

Method Summary
`java.lang.String` `getErrorMessage()`
`long` `getExpirationTime()`
`java.lang.String` `getId()`
`java.lang.String` `getQuery()`
`Subscription.State` `getState()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getId

    public java.lang.String getId()

  Returns:
    The id supplied during subscription.

### getQuery

    public java.lang.String getQuery()

  Returns:
    The query supplied during subscription.

### getExpirationTime

    public long getExpirationTime()

  Returns:
    The expiration time of this subscription, in seconds since January 1, 1970 UTC.

### getState

    public Subscription.State getState()

  Returns:
    The current state of the subscription.

### getErrorMessage

    public java.lang.String getErrorMessage()

  Returns:
    The error message if the current state is ERROR.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A string of the format: %s@%d{id=%s, query=%s, expires=%s, state=%s}, where the first two replacements are the class name and the system identity hashcode, and the date attribute may be "NEVER".