|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EpcisQueryControlInterface
The EPCIS Query Control Interface provides a general framework by which client applications may query EPCIS data. The interface provides both on-demand queries, in which an explicit request from a client causes a query to be executed and results returned in response, and standing queries, in which a client registers ongoing interest in a query and thereafter receives periodic delivery of results via the EPCIS Query Callback Interface without making further requests. These two modes are informally referred to as "pull" and "push", respectively.
Standing queries are made by making one or more subscriptions to a previously
defined query using the
subscribe method. Results will be delivered periodically via the Query
Callback Interface to a specified destination, until the subscription is
canceled using the unsubscribe method. On-demand
queries are made by executing a previously defined query using the
poll method. Each invocation of the
poll method returns a result directly to
the caller. In either case, if the query is parameterized, specific settings
for the parameters may be provided as arguments to
subscribe or poll.
| Method Summary | |
|---|---|
List<String> |
getQueryNames()
Returns a list of all query names available for use with the subscribe and poll methods. |
String |
getStandardVersion()
Returns a string that identifies what version of the specification this implementation complies with. |
List<String> |
getSubscriptionIDs(String queryName)
Returns a list of all subscriptionIDs currently
subscribed to the specified named query. |
String |
getVendorVersion()
Returns a string that identifies what vendor extensions this implementation provides. |
QueryResults |
poll(String queryName,
QueryParams params)
Invokes a previously defined query having the specified name, returning the results. |
void |
subscribe(String queryName,
QueryParams params,
String dest,
SubscriptionControls controls,
String subscriptionID)
Registers a subscriber for a previously defined query having the specified name. |
void |
unsubscribe(String subscriptionID)
Removes a previously registered subscription having the specified subscriptionID. |
| Method Detail |
|---|
void subscribe(String queryName,
QueryParams params,
String dest,
SubscriptionControls controls,
String subscriptionID)
throws NoSuchNameExceptionResponse,
InvalidURIExceptionResponse,
DuplicateSubscriptionExceptionResponse,
QueryParameterExceptionResponse,
QueryTooComplexExceptionResponse,
SubscriptionControlsExceptionResponse,
SubscribeNotPermittedExceptionResponse,
SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
params argument provides the values to
be used for any named parameters defined by the query. The
dest parameter specifies a destination where results from
the query are to be delivered, via the Query Callback Interface. The
dest parameter is a URI that both identifies a specific
binding of the Query Callback Interface to use and specifies addressing
information. The controls parameter controls how the
subscription is to be processed; in particular, it specifies the
conditions under which the query is to be invoked (e.g., specifying a
periodic schedule). The subscriptionID is an arbitrary
string that is copied into every response delivered to the specified
destination, and otherwise not interpreted by the EPCIS service. The
client may use the subscriptionID to identify from which subscription a
given result was generated, especially when several subscriptions are
made to the same destination. The dest argument MAY be
null or empty, in which case results are delivered to a pre-arranged
destination based on the authenticated identity of the caller. If the
EPCIS implementation does not have a destination pre-arranged for the
caller, or does not permit this usage, it SHALL raise an
InvalidURIException.
queryName - The name of a previously defined query for which the
subscriber will be registered.params - Provides the values to be used for any named parameters
defined by the query.dest - Specifies a destination where results from the query are to be
delivered, via the Query Callback Interface. It is a URI that
both identifies a specific binding of the Query Callback
Interface to use and specifies addressing information. May be
null or empty, in which case results are
delivered to a pre-arranged destination based on the
authenticated identity of the caller.controls - Controls how the subscription is to be processed; in
particular, it specifies the conditions under which the query
is to be invoked (e.g., specifying a periodic schedule).subscriptionID - An arbitrary string that is copied into every response
delivered to the specified destination, and otherwise not
interpreted by the EPCIS service. The client may use the
subscriptionID to identify from which subscription a given
result was generated, especially when several subscriptions
are made to the same destination.
InvalidURIException - If the EPCIS implementation does not have a destination
pre-arranged for the caller, or does not permit this usage.
QueryParameterException - Under any of the following circumstances:
NoSuchNameExceptionResponse
InvalidURIExceptionResponse
DuplicateSubscriptionExceptionResponse
QueryParameterExceptionResponse
QueryTooComplexExceptionResponse
SubscriptionControlsExceptionResponse
SubscribeNotPermittedExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
void unsubscribe(String subscriptionID)
throws NoSuchSubscriptionExceptionResponse,
SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
subscriptionID.
subscriptionID - The subscriptionID of a previously registered
subscription.
NoSuchSubscriptionExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
QueryResults poll(String queryName,
QueryParams params)
throws NoSuchNameExceptionResponse,
QueryParameterExceptionResponse,
QueryTooComplexExceptionResponse,
QueryTooLargeExceptionResponse,
SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
params argument provides the values to be
used for any named parameters defined by the query.
queryName - The name of a previously defined query to be invoked.params - Provides the values to be used for any named parameters
defined by the query.
QueryParameterException - Under any of the following circumstances:
NoSuchNameExceptionResponse
QueryParameterExceptionResponse
QueryTooComplexExceptionResponse
QueryTooLargeExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
List<String> getQueryNames()
throws SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
List<String> getSubscriptionIDs(String queryName)
throws NoSuchNameExceptionResponse,
SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
subscriptionIDs currently
subscribed to the specified named query.
queryName - The name of a previously defined query for which the
subscriptionIDs should be returned.
subscriptionIDs currently
subscribed to the specified named query.
NoSuchNameExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
String getStandardVersion()
throws SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
1.0.
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
String getVendorVersion()
throws SecurityExceptionResponse,
ValidationExceptionResponse,
ImplementationExceptionResponse
SecurityExceptionResponse
ValidationExceptionResponse
ImplementationExceptionResponse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||