Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.connecterra.ale.alevent
Class EngineALEPCImpl

    java.lang.Object
      com.connecterra.ale.alevent.EngineALEPCImpl

All Implemented Interfaces:
  ALEPC, EPCCacheManager

public class EngineALEPCImpl
extends java.lang.Object
implements ALEPC, EPCCacheManager

Constructor Summary
`EngineALEPCImpl(com.connecterra.util.RawConfig rc, com.connecterra.ale.persistence.PersistenceManager pm, NotificationManager nm, com.connecterra.ale.reader.ReaderManager rm, com.connecterra.ale.reader.CompositeReaderManager crm, com.connecterra.ale.trigger.TriggerManager tm, AlarmClock ac, java.util.logging.Logger logger, com.connecterra.ale.subscription.SubscriptionControls msc, com.connecterra.ale.subscription.SubscriptionControls dsc, java.lang.String aleid)`

Method Summary
`void` | `associateCacheWithPCSpec(java.lang.String cacheName, com.connecterra.ale.alevent.EngineALEPCImpl.ProgrammingCycleTableEntry pcte)`
`void` | `completeInitAfterRestore()`
`void` | `define(java.lang.String name, PCSpec spec)` Defines a new programming cycle specification for use with the `poll(java.lang.String, java.net.URI)` 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.
`EPCCacheSpec` | `getEPCCache(java.lang.String cacheName)` Look up and return a previously defined EPC cache specification by name.
`EPCCache` | `getEPCCacheObject(java.lang.String 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 uri)` 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.
`int` | `getProgrammingCyclesCompletedCount()`
`ThreadPoolScheduler` | `getScheduler()`
`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.
`void` | `initialize()`
`boolean` | `isUsingCompositeReader(java.lang.String name)`
`boolean` | `isUsingLogicalReader(com.connecterra.ale.reader.LogicalReader[] lrs)`
`boolean` | `isUsingTrigger(java.lang.String triggerName)`
`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` | `redefinedCompositeReader(java.lang.String name)` Notification method called whenever the ALE Configuration API is used to define, redefine, or undefine composite readers.
`void` | `redefinedLogicalReaders(com.connecterra.ale.reader.LogicalReader[] oldLRs, com.connecterra.ale.reader.LogicalReader[] newLRs)` Notification method called whenever the ALE Configuration API is used to define, redefine, or undefine logical readers (via defining, redefining, or undefining a physical reader).
`void` | `redefinedTrigger(java.lang.String triggerName, com.connecterra.ale.trigger.TriggerDriver oldTD, com.connecterra.ale.trigger.TriggerDriver newTD)`
`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` | `replenishEPCCache(java.lang.String cacheName, java.util.List replenishment)`
`void` | `shutdown()` This is a public, non-ALEPC method used to shutdown ALEPC processing.
`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 name)` 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

### EngineALEPCImpl

    public EngineALEPCImpl(com.connecterra.util.RawConfig rc,
                           com.connecterra.ale.persistence.PersistenceManager pm,
                           NotificationManager nm,
                           com.connecterra.ale.reader.ReaderManager rm,
                           com.connecterra.ale.reader.CompositeReaderManager crm,
                           com.connecterra.ale.trigger.TriggerManager tm,
                           AlarmClock ac,
                           java.util.logging.Logger logger,
                           com.connecterra.ale.subscription.SubscriptionControls msc,
                           com.connecterra.ale.subscription.SubscriptionControls dsc,
                           java.lang.String aleid)
                    throws com.connecterra.util.ConfigValidationException

Method Detail

### getScheduler

    public ThreadPoolScheduler getScheduler()

### getProgrammingCyclesCompletedCount

    public int getProgrammingCyclesCompletedCount()

### initialize

    public void initialize()

### completeInitAfterRestore

    public void completeInitAfterRestore()
                                  throws EngineException

  Throws:
    `EngineException`

### getALEID

    public java.lang.String getALEID()

  Description copied from interface: `ALEPC`
  Gets the ID of this ALE server.

  Specified by:
    `getALEID` in interface `ALEPC`
  Returns:
    The ID of the server.

### define

    public void define(java.lang.String name,
                       PCSpec spec)
                throws DuplicateNameException,
                       PCSpecValidationException,
                       NoSuchCacheException,
                       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:
    `name` - 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.
    `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,
                         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.
    `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,
                        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.
    `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,
                          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:
    `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 name)
                  throws NoSuchSpecException,
                         EngineException

  Description copied from interface: `ALEPC`
  Undefine a programming cycle specification. All existing subscriptions will be removed.

  Specified by:
    `undefine` in interface `ALEPC`
  Parameters:
    `name` - The name of the specification to undefine.
  Throws:
    `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)

  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.

### getPCSpecInfo

    public PCSpecInfo getPCSpecInfo(java.lang.String specName)
                             throws NoSuchSpecException,
                                    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.
    `EngineException` - if there is an internal failure within the ALE implementation
  See Also:
    `PCSpecInfo`

### listPCSpecNames

    public java.util.List listPCSpecNames()

  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.

### subscribe

    public void subscribe(java.lang.String specName,
                          java.net.URI uri,
                          PCSubscriptionControls controls)
                   throws NoSuchSpecException,
                          InvalidURIException,
                          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:
    `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,
                            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:
    `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,
                                          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
    `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,
                                                    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.
    `InvalidURIException`
  See Also:
    `PCSubscriptionInfo`

### 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)
                       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.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,
                                   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)
                            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.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.

### shutdown

    public void shutdown()

  This is a public, non-ALEPC method used to shutdown ALEPC processing. It will hold a lock which will cause other ALEPC methods to block until the suspend is complete, then those methods will return an EngineException.

### defineEPCCache

    public void defineEPCCache(java.lang.String cacheName,
                               EPCCacheSpec spec,
                               EPCPatterns replenishment)
                        throws DuplicateNameException,
                               CacheSpecValidationException,
                               InvalidPatternsException,
                               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

### redefineEPCCache

    public void redefineEPCCache(java.lang.String cacheName,
                                 EPCCacheSpec newSpec)
                          throws NoSuchCacheException,
                                 CacheSpecValidationException,
                                 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:
    `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,
                                        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.

### getEPCCache

    public EPCCacheSpec getEPCCache(java.lang.String cacheName)
                             throws 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

### getEPCCacheSpecInfo

    public EPCCacheSpecInfo getEPCCacheSpecInfo(java.lang.String cacheName,
                                                boolean includeCacheContent)
                                         throws NoSuchCacheException,
                                                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
  See Also:
    `EPCCacheSpecInfo`

### listEPCCacheSpecNames

    public java.util.List listEPCCacheSpecNames()
                                         throws 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

### replenishEPCCache

    public void replenishEPCCache(java.lang.String cacheName,
                                  EPCPatterns replenishment)
                           throws NoSuchCacheException,
                                  InvalidPatternsException,
                                  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.
    `EngineException` - if there is an internal failure within the ALE implementation
    `NoSuchCacheException` - if there no EPC cache defined having the specified name.
  See Also:
    `ALEPC.replenishEPCCache(java.lang.String, com.connecterra.alepc.api.EPCPatterns)`

### replenishEPCCache

    public void replenishEPCCache(java.lang.String cacheName,
                                  java.util.List replenishment)
                           throws NoSuchCacheException,
                                  InvalidPatternsException,
                                  EngineException

  Throws:
    `NoSuchCacheException`
    `InvalidPatternsException`
    `EngineException`

### depleteEPCCache

    public EPCPatterns depleteEPCCache(java.lang.String cacheName)
                                throws NoSuchCacheException,
                                       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

### subscribeEPCCache

    public void subscribeEPCCache(java.lang.String cacheName,
                                  java.net.URI uri,
                                  PCSubscriptionControls controls)
                           throws NoSuchCacheException,
                                  InvalidURIException,
                                  EngineException

  Description copied from interface: `ALEPC`
  Subscribe to asynchronous report delivery from an EPC cache. An EPC cache issues `EPCCacheReport`s 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:
    `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.

### getEPCCacheObject

    public EPCCache getEPCCacheObject(java.lang.String name)
                               throws NoSuchCacheException

  Specified by:
    `getEPCCacheObject` in interface `EPCCacheManager`
  Throws:
    `NoSuchCacheException`

### associateCacheWithPCSpec

    public void associateCacheWithPCSpec(java.lang.String cacheName,
                                         com.connecterra.ale.alevent.EngineALEPCImpl.ProgrammingCycleTableEntry pcte)

### unsubscribeEPCCache

    public void unsubscribeEPCCache(java.lang.String cacheName,
                                    java.net.URI uri)
                             throws NoSuchCacheException,
                                    NoSuchSubscriberException,
                                    InvalidURIException,
                                    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.

### listEPCCacheSubscribers

    public java.util.List listEPCCacheSubscribers(java.lang.String cacheName)
                                           throws NoSuchCacheException,
                                                  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:
    `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 uri)
                                                   throws NoSuchCacheException,
                                                          NoSuchSubscriberException,
                                                          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
    `NoSuchCacheException` - if there no EPC cache defined having the specified name.
  See Also:
    `PCSubscriptionInfo`

### listLogicalReaderNames

    public java.util.List listLogicalReaderNames()

  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.

### isUsingLogicalReader

    public boolean isUsingLogicalReader(com.connecterra.ale.reader.LogicalReader[] lrs)

### redefinedLogicalReaders

    public void redefinedLogicalReaders(com.connecterra.ale.reader.LogicalReader[] oldLRs,
                                        com.connecterra.ale.reader.LogicalReader[] newLRs)

  Notification method called whenever the ALE Configuration API is used to define, redefine, or undefine logical readers (via defining, redefining, or undefining a physical reader).

### isUsingCompositeReader

    public boolean isUsingCompositeReader(java.lang.String name)

### redefinedCompositeReader

    public void redefinedCompositeReader(java.lang.String name)

  Notification method called whenever the ALE Configuration API is used to define, redefine, or undefine composite readers.

### isUsingTrigger

    public boolean isUsingTrigger(java.lang.String triggerName)

### redefinedTrigger

    public void redefinedTrigger(java.lang.String triggerName,
                                 com.connecterra.ale.trigger.TriggerDriver oldTD,
                                 com.connecterra.ale.trigger.TriggerDriver newTD)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD