com.connecterra.alepc.client
Class AxisALEPCClient

java.lang.Object
  extended bycom.connecterra.alepc.client.AxisALEPCClient
All Implemented Interfaces:
ALEPC

public class AxisALEPCClient
extends java.lang.Object
implements ALEPC

A concrete implementation of the ALEPC interface that accesses a remote RFTagAware Edge server using the SOAP protocol.


Constructor Summary
AxisALEPCClient(java.net.URL alepcServiceURL)
          Constructs a new ALE client stub for accessing a remote edge server having a specified URL for its SOAP interface.
 
Method Summary
 void define(java.lang.String specName, PCSpec spec)
          Defines a new programming cycle specification for use with the poll(java.lang.String) and subscribe(java.lang.String, java.net.URI, com.connecterra.alepc.api.PCSubscriptionControls) methods.
 void defineEPCCache(java.lang.String cacheName, EPCCacheSpec spec, EPCPatterns replenishment)
          Defines an EPC cache that can be used by programming cycles to obtain EPC values for programming operations.
 EPCPatterns depleteEPCCache(java.lang.String cacheName)
          Causes the indicated EPC cache to become depleted (empty).
 PCSpec get(java.lang.String specName)
          Look up and return a previously defined programming cycle specification by name.
 java.lang.String getALEID()
          Gets the ID of this ALE server.
 ALEPCFactory getALEPCFactory()
          Returns an ALEPCFactory instance for use with this client stub.
 EPCCacheSpec getEPCCache(java.lang.String cacheName)
          Look up and return a previously defined EPC cache specification by name.
 EPCCacheSpecInfo getEPCCacheSpecInfo(java.lang.String cacheName, boolean includeCacheContent)
          Returns adminstrative information about an EPC cache.
 PCSubscriptionInfo getEPCCacheSubscriptionInfo(java.lang.String cacheName, java.net.URI subscriber)
          Returns administrative information about an EPC cache subscription.
 PCSpecInfo getPCSpecInfo(java.lang.String specName)
          Returns adminstrative information about a programming cycle specification.
 PCSubscriptionInfo getPCSubscriptionInfo(java.lang.String specName, java.net.URI subscriber)
          Returns administrative information about a programming cycle subscription.
 long getTimeout()
          Returns the network timeout duration (in milliseconds).
 PCWriteReport immediate(PCSpec spec)
          Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report.
 PCWriteReport immediate(PCSpec spec, java.util.Map parameters)
          Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report.
 PCWriteReport immediate(PCSpec spec, java.net.URI epcVal)
          Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report.
 java.util.List listEPCCacheSpecNames()
          Returns a list of the names of all EPC caches currently defined.
 java.util.List listEPCCacheSubscribers(java.lang.String cacheName)
          Returns a list of URIs which are subscribed to asynchronous reports for the specified EPC cache name.
 java.util.List listLogicalReaderNames()
          Returns a list of all logical reader names.
 java.util.List listPCSpecNames()
          Returns a list of the names of all programming cycle specifications currently defined.
 java.util.List listSubscribers(java.lang.String specName)
          Returns a list of URIs which are subscribed to asynchronous reports for the specified PCSpec name.
 PCWriteReport poll(java.lang.String specName)
          Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report.
 PCWriteReport poll(java.lang.String specName, java.util.Map parameters)
          Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report.
 PCWriteReport poll(java.lang.String specName, java.net.URI epcVal)
          Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report.
 void redefine(java.lang.String specName, PCSpec newSpec)
          Replace the PCSpec for a programming cycle with a new PCSpec.
 void redefineEPCCache(java.lang.String cacheName, EPCCacheSpec newSpec)
          Replace the EPCCacheSpec having the specified name with a new EPCCacheSpec.
 void replenishEPCCache(java.lang.String cacheName, EPCPatterns replenishment)
          Appends a set of EPC pattern URIs to the indicated EPC cache.
 void setTimeout(long timeout)
          Sets the network timeout duration (in milliseconds).
 void subscribe(java.lang.String specName, java.net.URI uri, PCSubscriptionControls controls)
          Subscribe to asynchronous report delivery from a programming cycle specification.
 void subscribeEPCCache(java.lang.String cacheName, java.net.URI uri, PCSubscriptionControls controls)
          Subscribe to asynchronous report delivery from an EPC cache.
 void suspend(java.lang.String specName)
          Suspend the named programming cycle specification.
 void undefine(java.lang.String specName)
          Undefine a programming cycle specification.
 EPCPatterns undefineEPCCache(java.lang.String cacheName)
          Undefines an EPC cache.
 void unsubscribe(java.lang.String specName, java.net.URI uri)
          Unsubscribe a specified destination from receving asynchronous delivery of reports from a specified programming cycle specification.
 void unsubscribeEPCCache(java.lang.String cacheName, java.net.URI uri)
          Unsubscribe a specified destination from receving asynchronous delivery of reports from a specified EPC cache.
 void unsuspend(java.lang.String specName)
          Return a suspended programming cycle specification to its normal state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisALEPCClient

public AxisALEPCClient(java.net.URL alepcServiceURL)
                throws java.rmi.RemoteException
Constructs a new ALE client stub for accessing a remote edge server having a specified URL for its SOAP interface.

Parameters:
alepcServiceURL - The ALEPC Service URL (e.g., http://localhost:6060/axis/services/ALEPCService) for the remote edge server to be contacted.
Throws:
java.rmi.RemoteException - A remote error occurred while communicating with the ALE EPC Programming Service.
Method Detail

setTimeout

public void setTimeout(long timeout)
Sets the network timeout duration (in milliseconds). After this time elapses, the API calls will return a RemoteException.


getTimeout

public long getTimeout()
Returns the network timeout duration (in milliseconds).


getALEPCFactory

public ALEPCFactory getALEPCFactory()
Returns an ALEPCFactory instance for use with this client stub.


getALEID

public java.lang.String getALEID()
                          throws java.rmi.RemoteException,
                                 EngineException
Description copied from interface: ALEPC
Gets the ID of this ALE server.

Specified by:
getALEID in interface ALEPC
Returns:
The ID of the server.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
EngineException - if there is an internal failure within the ALE implementation

define

public void define(java.lang.String specName,
                   PCSpec spec)
            throws DuplicateNameException,
                   PCSpecValidationException,
                   NoSuchCacheException,
                   java.rmi.RemoteException,
                   EngineException
Description copied from interface: ALEPC
Defines a new programming cycle specification for use with the ALEPC.poll(java.lang.String, java.util.Map) and ALEPC.subscribe(java.lang.String, java.net.URI, com.connecterra.alepc.api.PCSubscriptionControls) methods.

Specified by:
define in interface ALEPC
Parameters:
specName - The name of the specification.
spec - The specification to define.
Throws:
EngineException - if there is an internal failure within the ALE implementation
NoSuchCacheException - if the PCSpec references an EPC cache that is not defined.
java.rmi.RemoteException - if there is an error communicating with the ALE server.
DuplicateNameException - if a PCSpec having the same name is already defined.
PCSpecValidationException - if the PCSpec is invalid.

redefine

public void redefine(java.lang.String specName,
                     PCSpec newSpec)
              throws NoSuchSpecException,
                     PCSpecValidationException,
                     NoSuchCacheException,
                     java.rmi.RemoteException,
                     EngineException
Description copied from interface: ALEPC
Replace the PCSpec for a programming cycle with a new PCSpec. All subscriptions and other metadata remain unchanged. If the programming cycle is active, it is terminated, and will not begin until the start condition occurs again.

This call is not atomic: there will be a short duration between the tear-down of the old programming cycle and the setup of the new one. If, for instance, a trigger happens during this time, no activation will occur. However, it is guaranteed that when the call completes, either the old or new PCSpec will be in place.

Specified by:
redefine in interface ALEPC
Parameters:
specName - The name of the specification.
newSpec - The specification to replace the existing one.
Throws:
NoSuchSpecException - if there no PCSpec 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 implementation
NoSuchCacheException - if the PCSpec references an EPC cache that is not defined.
PCSpecValidationException - if the PCSpec is invalid.

suspend

public void suspend(java.lang.String specName)
             throws NoSuchSpecException,
                    java.rmi.RemoteException,
                    EngineException
Description copied from interface: ALEPC
Suspend the named programming cycle specification. If the programming cycle specification is active, it is terminated. If ALEPC.poll(java.lang.String, java.util.Map) is called on a suspended programming cycle specification, it will throw an EngineException. If the programming cycle specification is already suspended, this call does nothing.

Specified by:
suspend in interface ALEPC
Parameters:
specName - The name of the specification to suspend.
Throws:
NoSuchSpecException - if there no PCSpec 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 implementation
See Also:
PCSpecInfo.isSuspended()

unsuspend

public void unsuspend(java.lang.String specName)
               throws NoSuchSpecException,
                      java.rmi.RemoteException,
                      EngineException
Description copied from interface: ALEPC
Return a suspended programming cycle specification to its normal state. The programming cycle specification will be activated when its start conditions next occur. If the programming cycle specification is not suspended, this call does nothing.

Specified by:
unsuspend in interface ALEPC
Parameters:
specName - The name of the specification to unsuspend.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation

undefine

public void undefine(java.lang.String specName)
              throws NoSuchSpecException,
                     java.rmi.RemoteException,
                     EngineException
Description copied from interface: ALEPC
Undefine a programming cycle specification. All existing subscriptions will be removed.

Specified by:
undefine in interface ALEPC
Parameters:
specName - The name of the specification to undefine.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation

get

public PCSpec get(java.lang.String specName)
           throws java.rmi.RemoteException,
                  EngineException
Description copied from interface: ALEPC
Look up and return a previously defined programming cycle specification by name.

Specified by:
get in interface ALEPC
Parameters:
specName - The name of the specification to look up.
Returns:
The PCSpec for the specified name, or null if there is no programming cycle specification defined with that name.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
EngineException - if there is an internal failure within the ALE implementation

getPCSpecInfo

public PCSpecInfo getPCSpecInfo(java.lang.String specName)
                         throws NoSuchSpecException,
                                java.rmi.RemoteException,
                                EngineException
Description copied from interface: ALEPC
Returns adminstrative information about a programming cycle specification.

Specified by:
getPCSpecInfo in interface ALEPC
Parameters:
specName - The name of the programming cycle specification
Returns:
A PCSpecInfo instance giving administrative information about the specified programming cycle specification.
Throws:
NoSuchSpecException - if there no PCSpec 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 implementation
See Also:
PCSpecInfo

listPCSpecNames

public java.util.List listPCSpecNames()
                               throws java.rmi.RemoteException,
                                      EngineException
Description copied from interface: ALEPC
Returns a list of the names of all programming cycle specifications currently defined.

Specified by:
listPCSpecNames in interface ALEPC
Returns:
A list of strings naming the currently defined programming cycle specifications.
Throws:
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.

subscribe

public void subscribe(java.lang.String specName,
                      java.net.URI uri,
                      PCSubscriptionControls controls)
               throws NoSuchSpecException,
                      InvalidURIException,
                      java.rmi.RemoteException,
                      EngineException
Description copied from interface: ALEPC
Subscribe to asynchronous report delivery from a programming cycle specification. These subscribers will receive PCWriteReport notifications whenever a programming cycle for the named PCSpec is completed.

The subscription defined by this call lasts until explicitly removed by calling the ALEPC.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.

Specified by:
subscribe in interface ALEPC
Parameters:
specName - 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).
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
EngineException - if there is an internal failure within the ALE implementation
NoSuchSpecException - if there no PCSpec defined having the specified name.
InvalidURIException - if the specified URI cannot be interpreted, or has no notification driver available.

unsubscribe

public void unsubscribe(java.lang.String specName,
                        java.net.URI uri)
                 throws NoSuchSpecException,
                        NoSuchSubscriberException,
                        InvalidURIException,
                        java.rmi.RemoteException,
                        EngineException
Description copied from interface: ALEPC
Unsubscribe a specified destination from receving asynchronous delivery of reports from a specified programming cycle specification.

Specified by:
unsubscribe in interface ALEPC
Parameters:
specName - The name of the specification to unsubscribe from.
uri - The destination that will no longer receive reports.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
InvalidURIException - if the specified URI cannot be interpreted, or has no notification driver available.
NoSuchSpecException - if there no PCSpec defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
NoSuchSubscriberException - if there is no subscription to the specified URI.

listSubscribers

public java.util.List listSubscribers(java.lang.String specName)
                               throws NoSuchSpecException,
                                      java.rmi.RemoteException,
                                      EngineException
Description copied from interface: ALEPC
Returns a list of URIs which are subscribed to asynchronous reports for the specified PCSpec name.

Specified by:
listSubscribers in interface ALEPC
Parameters:
specName - The name of the specification.
Returns:
A List of URI instances, each a subscriber of the specified programming cycle specification.
Throws:
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.
See Also:
PCSpecInfo.getSubscriberCount()

getPCSubscriptionInfo

public PCSubscriptionInfo getPCSubscriptionInfo(java.lang.String specName,
                                                java.net.URI subscriber)
                                         throws NoSuchSpecException,
                                                NoSuchSubscriberException,
                                                InvalidURIException,
                                                java.rmi.RemoteException,
                                                EngineException
Description copied from interface: ALEPC
Returns administrative information about a programming cycle subscription.

Specified by:
getPCSubscriptionInfo in interface ALEPC
Parameters:
specName - The name of the programming cycle specification
Returns:
A PCSubscriptionInfo instance giving administrative information about the specified programming cycle subscription.
Throws:
NoSuchSubscriberException - if the URI specified is not subscribed to the specified PCSpec
EngineException - if there is an internal failure within the ALE implementation
NoSuchSpecException - if there no PCSpec defined having the specified name.
java.rmi.RemoteException - if there is an error communicating with the ALE server.
InvalidURIException
See Also:
PCSubscriptionInfo

poll

public PCWriteReport poll(java.lang.String specName)
                   throws InvalidURIException,
                          java.lang.InterruptedException,
                          NoSuchSpecException,
                          NoSuchCacheException,
                          java.rmi.RemoteException,
                          EngineException
Description copied from interface: ALEPC
Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report. A new activation of the programming cycle is begun immediately or when the start trigger is received (if the programming cycle specification specifies a start trigger).

Specified by:
poll in interface ALEPC
Parameters:
specName - The name of the programming cycle specification to activate.
Returns:
The report generated from the programming cycle.
Throws:
java.lang.InterruptedException - if this method was interrupted by another thread.
InvalidURIException - if the supplied URI is not a valid EPC value.
NoSuchCacheException - if the PCSpec does not contain an EPC cache name, and an epcVal is not supplied.
EngineException - if the programming cycle is suspended or redefined, or if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.

poll

public PCWriteReport poll(java.lang.String specName,
                          java.net.URI epcVal)
                   throws InvalidURIException,
                          java.lang.InterruptedException,
                          NoSuchSpecException,
                          NoSuchCacheException,
                          java.rmi.RemoteException,
                          EngineException
Description copied from interface: ALEPC
Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report. A new activation of the programming cycle is begun immediately or when the start trigger is received (if the programming cycle specification specifies a start trigger).

Specified by:
poll in interface ALEPC
Parameters:
specName - The name of the programming cycle specification to activate.
epcVal - The EPC value to program. May be null, in which case the EPC value to write is obtained from the PCSpec's EPC cache.
Returns:
The report generated from the programming cycle.
Throws:
InvalidURIException - if the supplied URI is not a valid EPC value.
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.
NoSuchCacheException - if the PCSpec does not contain an EPC cache name, and an epcVal is not supplied.
java.lang.InterruptedException - if this method was interrupted by another thread.
EngineException - if the programming cycle is suspended or redefined, or if there is an internal failure within the ALE implementation

poll

public PCWriteReport poll(java.lang.String specName,
                          java.util.Map parameters)
                   throws InvalidURIException,
                          java.lang.InterruptedException,
                          NoSuchSpecException,
                          NoSuchCacheException,
                          java.rmi.RemoteException,
                          EngineException
Description copied from interface: ALEPC
Activates a previously defined programming cycle specification for one programming cycle, synchronously returning a report. A new activation of the programming cycle is begun immediately or when the start trigger is received (if the programming cycle specification specifies a start trigger).

Specified by:
poll in interface ALEPC
Parameters:
specName - The name of the programming cycle specification to activate.
parameters - A Map (String keys to String values) for parameters to be used in processing the PCSpec
Returns:
The report generated from the programming cycle.
Throws:
NoSuchCacheException - if the PCSpec does not contain an EPC cache name, and an epcVal is not supplied.
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchSpecException - if there no PCSpec defined having the specified name.
java.lang.InterruptedException - if this method was interrupted by another thread.
InvalidURIException - if the supplied URI is not a valid EPC value.
EngineException - if the programming cycle is suspended or redefined, or if there is an internal failure within the ALE implementation

immediate

public PCWriteReport immediate(PCSpec spec)
                        throws InvalidURIException,
                               java.lang.InterruptedException,
                               PCSpecValidationException,
                               NoSuchCacheException,
                               java.rmi.RemoteException,
                               EngineException
Description copied from interface: ALEPC
Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report. This is similar to first defining a specification using ALEPC.define(java.lang.String, com.connecterra.alepc.api.PCSpec), activating it for one programming cycle using ALEPC.poll(java.lang.String, java.util.Map), and undefining it using ALEPC.undefine(java.lang.String), except that programming cycle specifications created using this method will not be visible to ALEPC.listPCSpecNames() or ALEPC.getPCSpecInfo(java.lang.String).

Specified by:
immediate in interface ALEPC
Parameters:
spec - The programming cycle specification.
Returns:
The report generated from one activation of the specification.
Throws:
NoSuchCacheException - if the PCSpec references an EPC cache that is not defined, and an epcVal is not supplied.
java.lang.InterruptedException - if this method was interrupted by another thread.
EngineException - if there is an internal failure within the ALE implementation
InvalidURIException - if the supplied URI is not a valid EPC value.
java.rmi.RemoteException - if there is an error communicating with the ALE server.
PCSpecValidationException - if the PCSpec is invalid.

immediate

public PCWriteReport immediate(PCSpec spec,
                               java.net.URI epcVal)
                        throws InvalidURIException,
                               java.lang.InterruptedException,
                               PCSpecValidationException,
                               NoSuchCacheException,
                               java.rmi.RemoteException,
                               EngineException
Description copied from interface: ALEPC
Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report. This is similar to first defining a specification using ALEPC.define(java.lang.String, com.connecterra.alepc.api.PCSpec), activating it for one programming cycle using ALEPC.poll(java.lang.String, java.util.Map), and undefining it using ALEPC.undefine(java.lang.String), except that programming cycle specifications created using this method will not be visible to ALEPC.listPCSpecNames() or ALEPC.getPCSpecInfo(java.lang.String).

Specified by:
immediate in interface ALEPC
Parameters:
spec - The programming cycle specification.
epcVal - The EPC value to program. May be null, in which case the EPC value to write is obtained from the PCSpec's EPC cache.
Returns:
The report generated from one activation of the specification.
Throws:
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.
java.lang.InterruptedException - if this method was interrupted by another thread.
NoSuchCacheException - if the PCSpec references an EPC cache that is not defined, and an epcVal is not supplied.
InvalidURIException - if the supplied URI is not a valid EPC value.
PCSpecValidationException - if the PCSpec is invalid.

immediate

public PCWriteReport immediate(PCSpec spec,
                               java.util.Map parameters)
                        throws InvalidURIException,
                               java.lang.InterruptedException,
                               PCSpecValidationException,
                               NoSuchCacheException,
                               java.rmi.RemoteException,
                               EngineException
Description copied from interface: ALEPC
Immediately define a programming cycle specification and activate it for one programming cycle, synchronously returning a report. This is similar to first defining a specification using ALEPC.define(java.lang.String, com.connecterra.alepc.api.PCSpec), activating it for one programming cycle using ALEPC.poll(java.lang.String, java.util.Map), and undefining it using ALEPC.undefine(java.lang.String), except that programming cycle specifications created using this method will not be visible to ALEPC.listPCSpecNames() or ALEPC.getPCSpecInfo(java.lang.String).

Specified by:
immediate in interface ALEPC
Parameters:
spec - The programming cycle specification.
parameters - A Map (String keys to String values) for parameters to be used in processing the PCSpec
Returns:
The report generated from one activation of the specification.
Throws:
InvalidURIException - if the supplied URI is not a valid EPC value.
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.
PCSpecValidationException - if the PCSpec is invalid.
NoSuchCacheException - if the PCSpec references an EPC cache that is not defined, and an epcVal is not supplied.
java.lang.InterruptedException - if this method was interrupted by another thread.

defineEPCCache

public void defineEPCCache(java.lang.String cacheName,
                           EPCCacheSpec spec,
                           EPCPatterns replenishment)
                    throws DuplicateNameException,
                           CacheSpecValidationException,
                           InvalidPatternsException,
                           java.rmi.RemoteException,
                           EngineException
Description copied from interface: ALEPC
Defines an EPC cache that can be used by programming cycles to obtain EPC values for programming operations.

Specified by:
defineEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache.
spec - The EPC cache specification to define.
replenishment - An optional replenishment for the newly defined EPC cache. May be null or empty, in which case the EPC cache starts off empty.
Throws:
CacheSpecValidationException - if the EPCCacheSpec is invalid.
DuplicateNameException - if a EPC cache having the same name is already defined.
InvalidPatternsException - if the supplied replenishment is invalid. If this exception is thrown, the EPCCache will have been defined, but it will be empty.
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.

redefineEPCCache

public void redefineEPCCache(java.lang.String cacheName,
                             EPCCacheSpec newSpec)
                      throws NoSuchCacheException,
                             CacheSpecValidationException,
                             java.rmi.RemoteException,
                             EngineException
Description copied from interface: ALEPC
Replace the EPCCacheSpec having the specified name with a new EPCCacheSpec. All subscriptions and other metadata remain unchanged, and the cache contents are not altered.

Specified by:
redefineEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache.
newSpec - The specification to replace the existing one.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchCacheException - if there no EPCCacheSpec defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
CacheSpecValidationException - if the EPCCacheSpec is invalid.

undefineEPCCache

public EPCPatterns undefineEPCCache(java.lang.String cacheName)
                             throws NoSuchCacheException,
                                    CacheInUseException,
                                    java.rmi.RemoteException,
                                    EngineException
Description copied from interface: ALEPC
Undefines an EPC cache. All existing subscriptions to this EPC cache are removed.

Specified by:
undefineEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache to undefine.
Returns:
An EPCPatterns containing a sequence of EPC pattern URIs which specify the EPC value(s) that were remaining in the EPC cache immediately prior to the undefine operation.
Throws:
NoSuchCacheException - if there no EPC cache defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
CacheInUseException - if there are any PCSpecs that name this EPC cache.
java.rmi.RemoteException - if there is an error communicating with the ALE server.

getEPCCache

public EPCCacheSpec getEPCCache(java.lang.String cacheName)
                         throws java.rmi.RemoteException,
                                EngineException
Description copied from interface: ALEPC
Look up and return a previously defined EPC cache specification by name.

Specified by:
getEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache specification to look up.
Returns:
The EPCCacheSpec for the specified name, or null if there is no EPC cache specification defined with that name.
Throws:
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.

getEPCCacheSpecInfo

public EPCCacheSpecInfo getEPCCacheSpecInfo(java.lang.String cacheName,
                                            boolean includeCacheContent)
                                     throws NoSuchCacheException,
                                            java.rmi.RemoteException,
                                            EngineException
Description copied from interface: ALEPC
Returns adminstrative information about an EPC cache.

Specified by:
getEPCCacheSpecInfo in interface ALEPC
Parameters:
cacheName - The name of the EPC cache to look up.
includeCacheContent - Indicates whether the EPCCacheSpecInfo.getCacheContent() attribute should be populated.
Returns:
A EPCCacheSpecInfo instance giving administrative information about the specified EPC cache.
Throws:
NoSuchCacheException - if there no EPC cache defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.
See Also:
EPCCacheSpecInfo

listEPCCacheSpecNames

public java.util.List listEPCCacheSpecNames()
                                     throws java.rmi.RemoteException,
                                            EngineException
Description copied from interface: ALEPC
Returns a list of the names of all EPC caches currently defined.

Specified by:
listEPCCacheSpecNames in interface ALEPC
Returns:
A list of strings naming the currently defined EPC caches.
Throws:
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.

replenishEPCCache

public void replenishEPCCache(java.lang.String cacheName,
                              EPCPatterns replenishment)
                       throws NoSuchCacheException,
                              InvalidPatternsException,
                              java.rmi.RemoteException,
                              EngineException
Description copied from interface: ALEPC
Appends a set of EPC pattern URIs to the indicated EPC cache.

Specified by:
replenishEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache.
replenishment - A collection of EPC pattern URIs to be appended to the named EPC cache.
Throws:
InvalidPatternsException - if the supplied EPCPatterns 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 implementation
NoSuchCacheException - if there no EPC cache defined having the specified name.

depleteEPCCache

public EPCPatterns depleteEPCCache(java.lang.String cacheName)
                            throws NoSuchCacheException,
                                   java.rmi.RemoteException,
                                   EngineException
Description copied from interface: ALEPC
Causes the indicated EPC cache to become depleted (empty). Returns the pre-depleted contents of the EPC cache.

This call blocks until any in-progress programming cycles have completed. In this way, a failed programming cycle's EPC value, which gets returned to the EPC cache, will be incorporated into the deplete operation.

Specified by:
depleteEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache to be depleted.
Returns:
A container of EPC pattern URIs which specify the EPC value(s) that were remaining in the EPC cache immediately prior to the deplete operation.
Throws:
NoSuchCacheException - if there no EPC cache defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
java.rmi.RemoteException - if there is an error communicating with the ALE server.

subscribeEPCCache

public void subscribeEPCCache(java.lang.String cacheName,
                              java.net.URI uri,
                              PCSubscriptionControls controls)
                       throws NoSuchCacheException,
                              InvalidURIException,
                              java.rmi.RemoteException,
                              EngineException
Description copied from interface: ALEPC
Subscribe to asynchronous report delivery from an EPC cache. An EPC cache issues EPCCacheReports when its size drops below a specified low-content threshold.

The subscription defined by this call lasts until explicitly removed by calling the ALEPC.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.

Specified by:
subscribeEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache 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).
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchCacheException - if there no EPC cache defined having the specified name.
EngineException - if there is an internal failure within the ALE implementation
InvalidURIException - if the specified URI cannot be interpreted, or has no notification driver available.

unsubscribeEPCCache

public void unsubscribeEPCCache(java.lang.String cacheName,
                                java.net.URI uri)
                         throws NoSuchCacheException,
                                NoSuchSubscriberException,
                                InvalidURIException,
                                java.rmi.RemoteException,
                                EngineException
Description copied from interface: ALEPC
Unsubscribe a specified destination from receving asynchronous delivery of reports from a specified EPC cache.

Specified by:
unsubscribeEPCCache in interface ALEPC
Parameters:
cacheName - The name of the EPC cache to unsubscribe from.
uri - The destination that will no longer receive reports.
Throws:
NoSuchSubscriberException - if there is no subscription to the specified URI.
EngineException - if there is an internal failure within the ALE implementation
NoSuchCacheException - if there no EPC cache defined having the specified name.
InvalidURIException - if the specified URI cannot be interpreted, or has no notification driver available.
java.rmi.RemoteException - if there is an error communicating with the ALE server.

listEPCCacheSubscribers

public java.util.List listEPCCacheSubscribers(java.lang.String cacheName)
                                       throws NoSuchCacheException,
                                              java.rmi.RemoteException,
                                              EngineException
Description copied from interface: ALEPC
Returns a list of URIs which are subscribed to asynchronous reports for the specified EPC cache name.

Specified by:
listEPCCacheSubscribers in interface ALEPC
Parameters:
cacheName - The name of the EPC cache.
Returns:
A List of URI instances, each a subscriber of the specified EPC cache.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
EngineException - if there is an internal failure within the ALE implementation
NoSuchCacheException - if there no EPC cache defined having the specified name.
See Also:
EPCCacheSpecInfo.getSubscriberCount()

getEPCCacheSubscriptionInfo

public PCSubscriptionInfo getEPCCacheSubscriptionInfo(java.lang.String cacheName,
                                                      java.net.URI subscriber)
                                               throws NoSuchCacheException,
                                                      NoSuchSubscriberException,
                                                      java.rmi.RemoteException,
                                                      EngineException
Description copied from interface: ALEPC
Returns administrative information about an EPC cache subscription.

Specified by:
getEPCCacheSubscriptionInfo in interface ALEPC
Parameters:
cacheName - The name of the EPC cache
Returns:
A PCSubscriptionInfo instance giving administrative information about the specified EPC cache subscription.
Throws:
EngineException - if there is an internal failure within the ALE implementation
NoSuchSubscriberException - if the URI specified is not subscribed to the specified EPC cache
java.rmi.RemoteException - if there is an error communicating with the ALE server.
NoSuchCacheException - if there no EPC cache defined having the specified name.
See Also:
PCSubscriptionInfo

listLogicalReaderNames

public java.util.List listLogicalReaderNames()
                                      throws java.rmi.RemoteException,
                                             EngineException
Description copied from interface: ALEPC
Returns a list of all logical reader names. These are the logical readers that are available for use with programming cycle specifications for EPC programming.

Specified by:
listLogicalReaderNames in interface ALEPC
Returns:
A List of strings representing logical reader names, in ascending lexicographic sequence.
Throws:
java.rmi.RemoteException - if there is an error communicating with the ALE server.
EngineException - if there is an internal failure within the ALE implementation