|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Application Level Events (ALE) application programming interface.
Applications obtain concrete implementations of this interface by using constructors provided in other packages.
Updated to support EPCglobal ALE 1.0 specification.
The most commonly used concrete implementations are remote procedure call (RPC) bindings
provided in the com.connecterra.ale.client
package. It is also possible to link
directly with the ALE engine itself, provided by
com.connecterra.ale.alevent.ALEEngine
.
Method Summary | |
void |
define(java.lang.String ecSpecName,
ECSpec spec)
Define a new event cycle specification for use with the poll(java.lang.String) and
subscribe(java.lang.String, java.net.URI, com.connecterra.ale.api.ECSubscriptionControls) methods. |
ECSpec |
get(java.lang.String ecSpecName)
Deprecated. Use getECSpec(java.lang.String) |
ALEFactory |
getALEFactory()
Returns a factory suitable for creating ALE objects to be used with this connection. |
java.lang.String |
getALEID()
Gets the ID of this ALE server. |
ECSpec |
getECSpec(java.lang.String specName)
Look up and return a previously defined event cycle specification by name. |
ECSpecInfo |
getECSpecInfo(java.lang.String ecSpecName)
Returns administrative information about an event cycle specification. |
java.util.List |
getECSpecNames()
Returns a list of the names of all event cycle specifications currently defined. |
ECSubscriptionInfo |
getECSubscriptionInfo(java.lang.String ecSpecName,
java.net.URI subscriber)
Returns administrative information about an event cycle subscriber. |
java.lang.String |
getStandardVersion()
Returns a string that identifies what version of the EPCglobal ALE standard that this implementation complies with. |
java.util.List |
getSubscribers(java.lang.String specName)
Returns a list of URIs which are subscribed to asynchronous reports for the specified ECSpec name. |
java.lang.String |
getVendorVersion()
Returns a string that identifies the vendor and version of the implementation. |
ECReports |
immediate(ECSpec spec)
Immediately define an event cycle specification and activate it for one event cycle, synchronously returning a report. |
java.util.List |
listECSpecNames()
Deprecated. Use getECSpecNames() |
java.util.List |
listLogicalReaderNames()
Returns a list of all logical reader names. |
java.util.List |
listSubscribers(java.lang.String ecSpecName)
Deprecated. Use getSubscribers(java.lang.String) |
ECReports |
poll(java.lang.String ecSpecName)
Activates a previously defined event cycle specification for one event cycle, synchronously returning a report. |
void |
redefine(java.lang.String ecSpecName,
ECSpec newSpec)
Replace the ECSpec having the specified name with a new ECSpec. |
void |
subscribe(java.lang.String ecSpecName,
java.net.URI uri)
Subscribe to asynchronous report delivery from an event cycle specification. |
void |
subscribe(java.lang.String ecSpecName,
java.net.URI uri,
ECSubscriptionControls controls)
Subscribe to asynchronous report delivery from an event cycle specification. |
void |
suspend(java.lang.String ecSpecName)
Suspend the named event cycle specification. |
void |
undefine(java.lang.String ecSpecName)
Undefine an event cycle specification. |
void |
unsubscribe(java.lang.String ecSpecName,
java.net.URI uri)
Unsubscribe a specified destination from receiving asynchronous delivery of reports from a specified event cycle specification. |
void |
unsuspend(java.lang.String ecSpecName)
Return a suspended event cycle specification to its normal state. |
Method Detail |
public java.lang.String getALEID() throws EngineException, java.rmi.RemoteException
This method is an extension to the ALE 1.0 specification.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationpublic void define(java.lang.String ecSpecName, ECSpec spec) throws DuplicateNameException, ECSpecValidationException, java.rmi.RemoteException, EngineException
poll(java.lang.String)
and
subscribe(java.lang.String, java.net.URI, com.connecterra.ale.api.ECSubscriptionControls)
methods.
ecSpecName
- The name of the specification.spec
- The specification to define.
DuplicateNameException
- if an ECSpec having the same name is already defined.
ECSpecValidationException
- if the ECSpec is invalid.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpec
public void redefine(java.lang.String ecSpecName, ECSpec newSpec) throws NoSuchNameException, ECSpecValidationException, java.rmi.RemoteException, EngineException
ecSpecName
- The name of the specification.
NoSuchNameException
- if there no ECSpec defined having the specified name.
ECSpecValidationException
- if the ECSpec is invalid.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpec
public void suspend(java.lang.String ecSpecName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
poll(java.lang.String)
is
called on a suspended event cycle, it will throw an EngineException. If the event cycle
is already suspended, this call does nothing.
This method is an extension to the ALE 1.0 specification.
ecSpecName
- The name of the specification to suspend.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpecInfo.isSuspended()
public void unsuspend(java.lang.String ecSpecName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
This method is an extension to the ALE 1.0 specification.
ecSpecName
- The name of the specification to unsuspend.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationsuspend(String)
public void undefine(java.lang.String ecSpecName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
ecSpecName
- The name of the specification to undefine.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationdefine(String, ECSpec)
public ECSpec get(java.lang.String ecSpecName) throws java.rmi.RemoteException, EngineException
getECSpec(java.lang.String)
ecSpecName
- The name of the specification to look up.
null
if there is no event
cycle specification defined with that name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationpublic ECSpec getECSpec(java.lang.String specName) throws java.rmi.RemoteException, EngineException, NoSuchNameException
null
if there is no event
cycle specification defined with that name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server
EngineException
- if there is an internal failure within the ALE implementation
NoSuchNameException
- if an ECSpec with the specified name does not existECSpec
public java.util.List listECSpecNames() throws java.rmi.RemoteException, EngineException
getECSpecNames()
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationpublic java.util.List getECSpecNames() throws java.rmi.RemoteException, EngineException
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationpublic void subscribe(java.lang.String ecSpecName, java.net.URI uri, ECSubscriptionControls controls) throws NoSuchNameException, InvalidURIException, DuplicateSubscriptionException, java.rmi.RemoteException, EngineException
poll(java.lang.String)
invocations, then the event cycle
specification is activated, causing tag reads to commence. The subscription lasts until
explicitly removed by calling the unsubscribe(java.lang.String, java.net.URI)
method, or when the failure
thresholds specified by controls
are exceeded.
If during report generation, the notification delivery for this subscription fails
controls.getFailureLimitCount()
times in a row with no successes, then the subscription is removed. If zero, the
subscription will not be unsubscribed due to an exceeded count, but may be unsubscribed
due to the interval.
If during report generation, given a previous notification failure at time T, a
notification fails more than controls.getFailureLimitInterval()
milliseconds after time T without an intervening
success, the subscription will be removed. If this is zero, the subscription will not
be unsubscribed due to an exceeded interval, but may be unsubscribed due to the count.
This method is an extension to the ALE 1.0 specification.
ecSpecName
- The name of the specification to subscribe to.uri
- The destination for asynchronously delivered reports. See the RFTagAware Programmer
Guide for documentation of available notification URIs.controls
- Specifies the parameters which describe the behavior if notification
delivery fails. If null, default controls are used (no limit to the failure
count or failure interval).
NoSuchNameException
- if there no ECSpec defined having the specified name.
InvalidURIException
- if the specified URI cannot be interpreted, or has no driver available.
DuplicateSubscriptionException
- if the subscription already exists.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationsubscribe(String, URI)
,
unsubscribe(String, URI)
public void subscribe(java.lang.String ecSpecName, java.net.URI uri) throws NoSuchNameException, InvalidURIException, DuplicateSubscriptionException, java.rmi.RemoteException, EngineException
subscribe(String, URI, ECSubscriptionControls)
, with both the invalidate
count and invalidate interval set to zero.
ecSpecName
- uri
-
NoSuchNameException
- if there no ECSpec defined having the specified name.
DuplicateSubscriptionException
- if the subscription already exists.
InvalidURIException
- if the specified URI cannot be interpreted, or has no driver available.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationsubscribe(String, URI, ECSubscriptionControls)
,
unsubscribe(String, URI)
public void unsubscribe(java.lang.String ecSpecName, java.net.URI uri) throws NoSuchNameException, NoSuchSubscriberException, InvalidURIException, java.rmi.RemoteException, EngineException
poll(java.lang.String)
invocations, then the event cycle specification
is deactivated, ceasing tag reading operations for all readers not otherwise engaged in
servicing other event cycles.
ecSpecName
- The name of the specification to unsubscribe from.uri
- The destination that will no longer receive reports.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
NoSuchNameException
- if there no ECSpec defined having the specified name.
InvalidURIException
- if the specified URI cannot be interpreted, or has no driver available.
NoSuchSubscriberException
- if there is no subscription to the specified URI.
EngineException
- if there is an internal failure within the ALE implementationsubscribe(String, URI)
,
subscribe(String, URI, ECSubscriptionControls)
public java.util.List listSubscribers(java.lang.String ecSpecName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
getSubscribers(java.lang.String)
ecSpecName
- The name of the specification.
URI
instances, each a subscriber of the specified
event cycle specification.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpecInfo.getSubscriberCount()
public java.util.List getSubscribers(java.lang.String specName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
URI
instances, each a subscriber of the specified
event cycle specification.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpecInfo.getSubscriberCount()
public ECSpecInfo getECSpecInfo(java.lang.String ecSpecName) throws NoSuchNameException, java.rmi.RemoteException, EngineException
ecSpecName
- The name of the event cycle specification
ECSpecInfo
instance giving administrative information about the
specified event cycle specification.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECSpecInfo
public ECSubscriptionInfo getECSubscriptionInfo(java.lang.String ecSpecName, java.net.URI subscriber) throws NoSuchNameException, NoSuchSubscriberException, InvalidURIException, java.rmi.RemoteException, EngineException
This method is an extension to the ALE 1.0 specification.
ecSpecName
- The name of the event cycle specification
ECSubscriptionInfo
instance giving administrative information about
the specified event cycle subscription.
NoSuchNameException
- if there no ECSpec defined having the specified name.
NoSuchSubscriberException
- if the URI specified is not subscribed to the specified ECSpec
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementation
InvalidURIException
ECSubscriptionInfo
public ECReports poll(java.lang.String ecSpecName) throws java.lang.InterruptedException, NoSuchNameException, java.rmi.RemoteException, EngineException
poll(java.lang.String)
invocations, then a new activation of the event cycle is begun
immediately or when the start trigger is received (if the event cycle specification
specifies a start trigger). If instead there were previous subscribers or other active
poll(java.lang.String)
invocations, then this method may return reports from an event cycle
already in progress.
This method is an extension to the ALE 1.0 specification.
ecSpecName
- The name of the event cycle specification to activate.
java.lang.InterruptedException
- if this method was interrupted by another thread.
NoSuchNameException
- if there no ECSpec defined having the specified name.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if the event cycle is suspended or redefined, or if there is an internal
failure within the ALE implementationECReports
public ECReports immediate(ECSpec spec) throws java.lang.InterruptedException, ECSpecValidationException, java.rmi.RemoteException, EngineException
define(java.lang.String, com.connecterra.ale.api.ECSpec)
, activating it for one event cycle using poll(java.lang.String)
, and
undefining it using undefine(java.lang.String)
, except that event cycle specifications created
using this method will not be visible to listECSpecNames()
or
getECSpecInfo(java.lang.String)
.
spec
- The event cycle specification.
java.lang.InterruptedException
- if this method was interrupted by another thread.
ECSpecValidationException
- if the ECSpec is invalid.
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationECReports
public java.util.List listLogicalReaderNames() throws java.rmi.RemoteException, EngineException
java.rmi.RemoteException
- if there is an error communicating with the ALE server.
EngineException
- if there is an internal failure within the ALE implementationpublic java.lang.String getStandardVersion() throws java.rmi.RemoteException, EngineException
java.rmi.RemoteException
- if there is an error communicating with the ALE server
EngineException
- if there is an internal failure within the ALE implementationpublic java.lang.String getVendorVersion() throws java.rmi.RemoteException, EngineException
java.rmi.RemoteException
- if there is an error communicating with the ALE server
EngineException
- if there is an internal failure within the ALE implementationpublic ALEFactory getALEFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |