Programming with the
BEA WebLogic RFID Edge
Mobile SDK APIs
BEA WebLogic RFID Edge Mobile SDK APIs
The following sections describe the BEA WebLogic RFID Edge Mobile SDK API programming components that you use to read tags and send EPCIS event messages to configured destinations.
This package contains the classes and interfaces representing the physical and logical reader for the mobile device. The PhysicalReader interface represents the physical device, whereas the LogicalReader represents an antenna on the device. Currently, RFID handhelds are comprised of one antenna, but this API is designed to support multiple antennas for future scalability. The LogicalReader can subscribe and unsubscribe to various event types (represented by the EventType class) and process events accordingly. The EventType class resides in the com.bea.mobile.rfid.eventhandler package.
Implementations for the PhysicalReader and LogicalReader for the Symbol MC9000 RFID handheld are provided in the SDK.
As the trigger is pressed on the mobile device, the LogicalReader stores tag read data in its ReadBuffer. The ReadBuffer contains a TagReport for each EPC read.
The ReaderManager class allows the developer to create, initialize, register, and unregister a PhysicalReader.
Figure 3-1 illustrates the relationships among the classes and interfaces.
unregister(name:String) : void // Unregisters the physical reader with
// the specified name
getRegisteredPhysicalReader(name:String) : PhysicalReader // Returns the
// PhysicalReader instance registered with
// the specified name
com.bea.mobile.rfid.readertypes Package
This package contains the implementation classes for the physical and logical readers. The SymbolMC9000PhysicalReader class provides the concrete implementation of the PhysicalReader interface for the Symbol MC9000 RFID handheld. The SymbolMC9000LogicalReader class provides the concrete implementation of the LogicalReader interface.
Figure 3-2 illustrates the relationships among the classes and interfaces
Figure 3-2 Symbol Tag Reading API UML Diagram
com.bea.mobile.rfid.readertypes.SymbolMC9000PhysicalReader Class
The SymbolMC9000PhysicalReader class implements the PhysicalReader interface and provides concrete method implementations for all methods documented in "PhysicalReader" on page 3-3.
com.bea.mobile.rfid.readertypes.SymbolMC9000LogicalReader Class
The SymbolMC9000LogicalReader class implements the LogicalReader interface and provides concrete method implementations for all methods documented in "LogicalReader" on page 3-5.
In addition to the interface methods, the class contains the following methods:
SymbolMC9000LogicalReader - Additional Methods
onReadEvent(sender:Object, eventArgs:EventArgs) : void // Processes the
toString() : String // Returns the string representation of the
// the event
Workflow API
The Workflow API consists of the com.bea.mobile.rfid.workflow package.
com.bea.mobile.rfid.workflow Package
This package contains the classes and interfaces representing the workflow framework for the mobile device. The WorkflowFactory interface provides the ability to create a Workflow instance.
The AbstractWorkflow class provides an abstract implementation of the Workflow interface.
The WorkflowEventArgs class contains the event type and event info for workflow processing.
com.bea.mobile.rfid.workflow.WorkflowFactory Class
com.bea.rfid.workflow.WorkflowFactoryImpl Class
\
The WorkflowFactoryImpl class implements the WorkflowFactory interface and provides concrete method implementations for all methods documented in WorkflowFactory.
In addition to the interface methods, the class contains the following methods:
WorkflowFactoryImpl - Additional Methods
getInstance() : WorkflowFactory // Returns the WorkflowFactory singleton
// instance
com.bea.mobile.rfid.workflow.Workflow Interface
The Workflow interface represents a workflow within a mobile device application. This interface contains the following methods:
Workflow
getName() : String // Returns the workflow name
getWorkflowName() : String // Returns the workflow class name
initialize(configMgr:ConfigManager) : void // Performs initialization of
// the workflow based on the specified
// configuration manager
start() : void // Starts the workflow
stop() : void // Stops the workflow
shutdown() : void // Shuts down the workflow
reset() : void // Resets the workflow
handleEvent(sender:Object, eventArgs:EventArgs) : void // Processes the
// specified event
com.bea.mobile.rfid.workflow.AbstractWorkflow Class
The AbstractWorkflow class is an abstract class that implements the Workflow interface. The interfacde represents a factory for creating workflow objects. This class contains the following implementation methods:
AbstractWorkflow - Implementation Methods
getName() : String // Returns the workflow name
getWorkflowName() : String // Returns the workflow class name
initialize(configMgr:ConfigManager) : void // Performs initialization of
// the workflow based on the specified
// configuration manager
The class contains the following abstract methods:
AbstractWorkflow - Abstract Methods
start() : void // Starts the workflow
stop() : void // Stops the workflow
shutdown() : void // Shuts down the workflow
reset() : void // Resets the workflow
handleEvent(sender:Object, eventArgs:EventArgs) : void // Processes the
// specified event
com.bea.mobile.rfid.workflow.WorkflowEventArgs Class
The WorkflowEventArgs class provides workflow-specific event data during event handling. This class contains the following methods:
WorkflowEventArgs
getEventType() : EventType // Returns the event type object
getEventDataMap() : Map // Returns the event data map of event names
// to event values
com.bea.mobile.rfid.workflow.WorkflowException Class
The WorkflowException class represents an error during workflow processing. This class contains the following methods:
WorkflowException
WorkflowException() : void // Default constructor
WorkflowException(errorMessage:String) : void // Constructor with error
WorkflowException(cause:Exception) : void // Constructor with cause
// exception parameter
Filter API
The Filter API consists of two packages:
com.bea.mobile.rfid.filter
com.bea.mobile.rfid.filtertypes
com.bea.mobile.rfid.filter Package
This package contains the classes and interfaces representing the filters for a workflow to apply on tag reads. The Filter interface provides the ability to refine the reported tag reads based on specific criteria.
Figure 3-4 illustrates the relationships among the classes and interfaces
Figure 3-4 Filter API UML Diagram
com.bea.mobile.rfid.filter.Filter Interface
The Filter interface represents a workflow filter and contains the following methods:
Filter
initialize(configMgr:ConfigManager, persistenceMgr:PersistenceManager, epcisCapture:EPCISCapture) : void // Initializes the filter with the
// specified objects
execute(epcisEvents:List) : List // Applies the filter to the specified
// list of EPCISEvent objects and returns the
// filtered list of EPCISEvent objects
com.bea.mobile.rfid.filter.FilterException Class
The FilterException class represents an error during filter processing. This class contains the following methods:
FilterException
FilterException() : void // Default constructor
FilterException(errorMessage:String) : void // Constructor with error
com.bea.mobile.rfid.filtertypes.UniqueEPCReadPointFilter Class
The UniqueEPCReadPointFilter class extends the UniqueEPCFilter class and overrrides the isDuplicateEPC() method to filter on EPC and read point. This class contains the following methods:
com.bea.mobile.rfid.filtertypes.UniqueEPCBusinessLocationFilter Class
The UniqueEPCBusinessLocationFilter class extends the UniqueEPCFilter class and overrrides the isDuplicateEPC() method to filter on EPC and business location. This class contains the following methods:
com.bea.mobile.rfid.filtertypes.UniqueEPCReadPtBizLocFilter Class
The UniqueEPCReadPtBizLocFilter class extends the UniqueEPCFilter class and overrrides the isDuplicateEPC() method to filter on EPC, read point, and business location. This class contains the following methods:
The Configuration API consists of the com.bea.mobile.rfid.config package.
com.bea.mobile.rfid.config Package
This package contains the classes and interfaces for supporting configuration management on the mobile device. The Configuration API provides central management of reader, workflow, EPCIS event, and persistence configuration data.
Figure 3-6 illustrates the relationships among the classes and interfaces
The ConfigManager interface provides centralized configuration management for the mobile device application. This interface contains the following methods:
ConfigManager
loadConfig(appName:String) : void // Loads a configuration file based on
getAppConfig : Map // Returns a map of configuration property
// names to values
getValue(key:String) : String // Returns a value for the specified
// configuration property name
com.bea.rfid.config.ConfigManagerImpl Class
The ConfigManagerImpl class implements the ConfigManager interface and provides concrete method implementations for all methods documented in Table ConfigManager.
In addition to the interface methods, the class contains the following methods:
ConfigManagerImpl - Additional Methods
getInstance() : ConfigManagerImpl // Returns the ConfigManagerImpl
// singleton instance
getWorkflowConfig() : WorkflowConfig // Returns the WorkflowConfig
// instance
getEPCISCaptureConfig() : EPCISCaptureConfig // Returns the
// EPCISCaptureConfig instance
getPersistenceConfig() : PersistenceConfig // Returns the
// PersistenceConfig instance
getReaderConfig() : ReaderConfig // Returns the ReaderConfig
// instance
updateConfig(key:String, value:String) : void // Updates the
// configuration with the specified
// key/value pair
com.bea.mobile.rfid.config.ReaderConfig Class
The ReaderConfig class manages the configuration data for the readers. This class contains the following methods:
ReaderConfig
getPhysicalReaderNames() : List // Returns the list of configured
// physical reader names
getReaderConfigData(physicalReaderName:String) : ReaderConfig.ReaderConfigData // Returns the ReaderConfigData struct for
// the specified physical reader name
createPhysicalReaderClassInstance(physicalReaderClassName:String) : PhysicalReader // Returns an instance of the specified
The WorkflowConfigData struct contains the configuration data for a workflow. This struct contains the following attributes:
WorkflowConfigData
m_workflowName : String // The workflow name
m_workflowClassName : String // The workflow class name
m_isImmediateSend : boolean // Indicates whether or not the workflow is
// to immediately send the tag read as an
// EPCIS event to the configured destination
m_filterClassNames : List // The list of configured filter class names
com.bea.mobile.rfid.config.PersistenceConfig Class
The PersistenceConfig class manages the configuration data for the persistence store. This class contains the following methods:
PersistenceConfig
getPersistenceStoreDir() : String // Returns the persistence storage
// directory
getPersistenceStoreFilename() : String // Returns the persistence
// storage filename
getMaxNumPersistence() : int // Returns the maximum number of data
// objects to store
getAbsoluteFilename() : String // Returns the absolute filename
// for the persistence storage file
com.bea.mobile.rfid.config.EPCISCaptureConfig Class
The EPCISCaptureConfig class represents the configuration data associated with EPCIS event messages sent from the mobile device. This class supports reading the configuration data as well as updating/adding configuration data. This class contains the following methods:
EPCISCaptureConfig
getReadPointURIs() : List // Returns the list of available read point
// URI objects from which the user chooses
setReadPointURIs(uris:List) : void // Sets the specified list of
// available read point URI objects from
// which the user chooses
getBusinessLocationURIs() : List // Returns the list of available
// business location URI objects from which
// the user chooses
setBusinessLocationURIs(uris:List) : void // Sets the specified list of
// available business location URI objects
// from which the user chooses
getBusinessStepURIs() : List // Returns the list of available
// business step URI objects from which
// the user chooses
setBusinessStepURIs(uris:List) : void // Sets the specified list of
// available business step URI objects
// from which the user chooses
getDispositionURIs() : List // Returns the list of available
// disposition URI objects from which
// the user chooses
setDispositionURIs(uris:List) : void // Sets the specified list of
// available disposition URI objects
// from which the user chooses
getBusinessTransactions() : List // Returns the list of available
// business transaction objects from which
// the user chooses
setBusinessTransactions(uris:List) : void // Sets the specified list of
// available business transaction objects
// from which the user chooses
getDestinationURIs() : List // Returns the list of available
// destination URI objects from which
// the user chooses
setDestinationURIs(uris:List) : void // Sets the specified list of
// available destination URI objects
// from which the user chooses
getAction() : EPCISAction // Returns the EPCISAction object indicating
// the EPCIS event action (ADD,
// OBSERVE, DELETE)
setAction(action:EPCISAction) : void // Sets the specified EPCISAction
// object indicating the EPCIS event action
getTransport() : EPCISTransport // Returns the EPCISTransport object
// indicating the transport (HTTP_POST,
// SOAP) to deliver the EPCIS message
setTransport(transport:EPCISTransport) : void // Sets the specified
// EPCISTransport object indicating the
// transport to deliver the EPCIS message
getSocketTimeout() : long // Returns the socket timeout value for
// the HTTP POST transport
setSocketTimeout(timeout:long) : void // Sets the specified socket
// timeout value for the HTTP POST transport
getCurrentReadPointURI() : URI // Returns the current read point
// URI chosen by the user
setCurrentReadPointURI(uri:URI) : void // Sets the specified read point
// URI as the current read point URI chosen
// by the user
addReadPointURI(uri:URI) : void // Adds the specified read point
// URI to the list of available read point
// URI objects
deleteReadPointURI(uri:URI) : void // Deletes the specified read point
// URI from the list of available read point
// URI objects
getCurrentBusinessLocationURI() : URI // Returns the current business
// location URI chosen by the user
setCurrentBusinessLocationURI(uri:URI) : void // Sets the specified
// business location URI as the current
// business location URI chosen by the user
addBusinessLocationURI(uri:URI) : void // Adds the specified business
// location URI to the list of available
// business location URI objects
deleteBusinessLocationURI(uri:URI) : void // Deletes the specified
// business location URI from the list of
// available business location URI objects
getCurrentBusinessStepURI() : URI // Returns the current business
// step URI chosen by the user
setCurrentBusinessStepURI(uri:URI) : void // Sets the specified
// business step URI as the current business
// step URI chosen by the user
addBusinessStepURI(uri:URI) : void // Adds the specified business
// step URI to the list of available
// business step URI objects
deleteBusinessStepURI(uri:URI) : void // Deletes the specified
// business step URI from the list of
// available business step URI objects
getCurrentDispositionURI() : URI // Returns the current disposition
// URI chosen by the user
setCurrentDispositionURI(uri:URI) : void // Sets the specified
// disposition URI as the current
// disposition URI chosen by the user
addDispositionURI(uri:URI) : void // Adds the specified disposition
// URI to the list of available
// disposition URI objects
deleteDispositionURI(uri:URI) : void // Deletes the specified
// disposition URI from the list of
// available disposition URI objects
getCurrentBusinessTransaction() : BusinessTransaction // Returns the
// current business transaction chosen by the
// user
setCurrentBusinessTransaction(bt:BusinessTransaction) : void // Sets the
// specified business transaction as the
// current business transaction chosen by the
// user
addBusinessTransaction(bt:BusinessTransaction) : void // Adds the
// specified business transaction to the list
// of available business transaction objects
deleteBusinessTransaction(bt:BusinessTransaction) : void // Deletes the
// specified business transaction from the
// list of available business transaction
// objects
getCurrentDestinationURI() : URI // Returns the current destination
// URI chosen by the user
setCurrentDestinationURI(uri:URI) : void // Sets the specified
// destination URI as the current
// destination URI chosen by the user
addDestinationURI(uri:URI) : void // Adds the specified destination
// URI to the list of available
// destination URI objects
deleteDestinationURI(uri:URI) : void // Deletes the specified
// destination URI from the list of
// available destination URI objects
com.bea.mobile.rfid.config.ConfigException Class
The ConfigException class represents an error during configuration processing. This class contains the following methods:
ConfigException
ConfigException() : void // Default constructor
ConfigException(errorMessage:String) : void // Constructor with
ConfigException(cause:Exception) : void // Constructor with cause
// exception parameter
Persistence API
The Persistence API consists of the com.bea.mobile.rfid.persistence package.
com.bea.mobile.rfid.persistence Package
This package contains the classes and interfaces for supporting the persistence of tag reads onto the filesystem of the mobile device. Note that location data and EPCIS event data will be persisted for each tag read.
Figure 3-7 illustrates the relationships among the classes and interfaces
PersistenceException(cause:Exception) : void // Constructor with cause
// exception parameter
EPCIS Capture API
The EPCIS Capture API consists of the com.bea.mobile.rfid.epcis package.
com.bea.mobile.rfid.epcis Package
This package contains the classes and interfaces for creating, serializing/deserializing, and sending EPCIS events.
Figure 3-8 illustrates the relationships among the classes and interfaces
Figure 3-8 EPCIS Capture API UML Diagram
com.bea.mobile.rfid.epcis.EPCISCapture Interface
The EPCISCapture interface is utilized to create an EPCIS event object and to send it to configured destinations. This interface contains the following methods:
The BusinessTransaction interface represents the business transaction (order ID) of an EPCIS event. This interface contains the following methods:
BusinessTransaction
getBusinessTransactionURI() : URI // Returns the business transaction URI
getTypeID() : URI // Returns the type ID
toString() : String // Returns the string representation of the
// business transaction
com.bea.mobile.rfid.epcis.BusinessTransactionImpl Class
The BusinessTransactionImpl class provides the concrete implementation of the BusinessTransaction interface.
com.bea.mobile.rfid.epcis.EPCISAction Class
The EPCISAction class is a type-safe enumeration class and represents the action of an EPCIS event (ADD, OBSERVE, DELETE). This class contains the following attributes and methods:
The EPCISTransport class is a type-safe enumeration class and represents the transport for sending an EPCIS event (HTTP_POST, SOAP). This class contains the following attributes and methods:
EPCISTransport
HTTP_POST : EPCISTransport // Attribute representing HTTP POST transport
SOAP : EPCISTransport // Attribute representing SOAP transport
toString() : String // Returns string representation of EPCIS
The EPC class is a base abstract class for all EPC derivations. This class contains the following methods:
EPC
createInstance(uri:URI) : EPC // Returns an EPC object for the specified
// URI
createInstance(high:long, low:long) : EPC // Returns an EPC object for
// the specified high and low long values
getScheme() : Scheme // Returns the Scheme object for this EPC
getTypeString() : String // Returns the type string of this EPC
getBitSize() : int // Returns the bit size of this EPC
getHeader() : int // Returns the bit size of this EPC
getURI() : URI // Returns the URI of this EPC
getHex() : String // Returns the hex string of this EPC
getTagURI() : URI // Returns the tag URI of this EPC
getCanonicalURI() : URI // Returns the canonical URI of this EPC
getPureIdentityURI() : URI // Returns the pure identity URI of this EPC
getRawHexURI() : URI // Returns the raw hex URI of this EPC
getRawDecimalURI() : URI // Returns the raw decimal URI of this EPC
getLongArray() : long[] // Returns the long array for this EPC
getHighValue() : long // Returns the high long value of this EPC
getLowValue() : long // Returns the low long value of this EPC
setTDSVersion(version:String) : void // Sets the specified TDS (Tag Data
// Standard) version
getTDSVersion() : TDSVersion // Returns the TDS version
dump() : String // Returns a dump of this EPC object
toString() : String // Returns a string representation of this EPC
hashCode() : int // Returns the hashcode for this EPC
equals(object:Object) : boolean // Indicates whether or not the specified
// object equals this EPC
EPC Derivation Classes
For details on the EPC derivation classes, see the API references listed in Related Documentation.
com.connecterra.ale.epchelpers Package
This package contains the helper classes used with EPC processing.
Figure 3-10 illustrates the relationships among the classes and interfaces
Figure 3-10 EPC Helper API UML Diagram
com.connecterra.ale.epchelpers.EPCIndexTableLoader Class
The EPCIndexTableLoader class provides the ability to load EPC index entries into the company prefix table. This class contains the following methods:
EPCIndexTableLoader
loadFromURLs(urls:List) // Loads EPC index entries from the specified
// list of URLs
com.connecterra.ale.epchelpers.CompanyPrefixTable Class
The CompanyPrefixTable class provides the ability to get and add company prefix table entries from the company prefix table. This class contains the following methods:
CompanyPrefixTable
getCompanyPrefix(index:int) : TableEntry // Returns the company prefix
// table entry for the specified index
getCompanyPrefix(value:String) : TableEntry // Returns the company
// prefix table entry for the specified value
addEntry(index:int, val:String) : void // Adds the specified value at the