org.fosstrak.llrp.client
Interface ROAccessReportsRepository

All Superinterfaces:
MessageHandler
All Known Implementing Classes:
AbstractSQLROAccessReportsRepository, DerbyROAccessReportsRepository

public interface ROAccessReportsRepository
extends MessageHandler

Common interface for all the implementations providing access to the RO_ACCESS_REPORTS data-base. The actual implementation of the interface is chosen at runtime via the strategy pattern from the respective Context (in this case the implementation of the Repository interface). The interface extends the MessageHandler interface, in order to be able to receive LLRP RO_ACCESS_REPORTS messages.

NOTICE:

The registration at the AdaptorManagement is done automatically for the implementing class. So do this ONLY, if you know exactly what you are planing to do (otherwise messages might get logged twice!!!).

Author:
sawielan

Method Summary
 void clear()
          drop all the messages in the repository.
 java.util.List<ROAccessItem> getAll()
          retrieves all the RO_ACCESS_REPORTS elements in the database.
 void initialize(Repository repository)
          Initializer for the RO_ACCESS_REPORTS repository.
 void setRepository(Repository repository)
          set the repository that "owns" this RO_ACCESS_REPORTS repository.
 
Methods inherited from interface org.fosstrak.llrp.client.MessageHandler
handle
 

Method Detail

setRepository

void setRepository(Repository repository)
set the repository that "owns" this RO_ACCESS_REPORTS repository.

Parameters:
repository - the repository that "owns" this RO_ACCESS_REPORTS repository.

initialize

void initialize(Repository repository)
                throws LLRPRuntimeException
Initializer for the RO_ACCESS_REPORTS repository. NOTICE: if you create an instance of a subclass of this interface, you MUST call this method directly after instantiation.

Parameters:
repository - the repository belonging to this RO_ACCESS_REPORTS DB.
Throws:
when - there is a problem with initialization (eg. missing param).
LLRPRuntimeException

getAll

java.util.List<ROAccessItem> getAll()
                                    throws java.lang.Exception
retrieves all the RO_ACCESS_REPORTS elements in the database.

Returns:
a list of all the entries in the database stored into ROAccessItem.
Throws:
java.lang.Exception - when there is an error of any kind.

clear

void clear()
           throws java.lang.Exception
drop all the messages in the repository.

Throws:
java.lang.Exception - when there is an error of any kind.


Copyright © 2009. All Rights Reserved.