org.fosstrak.llrp.client
Interface Repository


public interface Repository

This single access point for Reader Management module to access the message repository. The instance class will be initiated in ResourceCenter.

Version:
1.0
Author:
Haoning Zhang

Field Summary
static int RETRIEVE_ALL
          flag to set the retrieval of messages to all messages in the repo.
 
Method Summary
 void clearAdapter(java.lang.String adapter)
          clear all the items that belong to a given adapter.
 void clearAll()
          Clear all the items in repository.
 void clearReader(java.lang.String adapter, java.lang.String reader)
          clear all the items that belong to a given reader on a given adapter.
 void close()
          How the resource layer (File System, Database, and etc.) close and destroy related resource handlers.
 int count(java.lang.String adaptor, java.lang.String reader)
          returns the number of messages in the repository to a given filter.
 LLRPMessageItem get(java.lang.String aMsgSysId)
          Get the LLRP Message Item from repository according to the unique Message ID.
 java.util.ArrayList<LLRPMessageItem> get(java.lang.String adaptorName, java.lang.String readerName, int num, boolean content)
          returns all the messages from the specified adaptor and the reader limited by num. if you set num to RETRIEVE_ALL all messages get returned.
 void open()
          How the resource layer (File System, Database, and etc.) initiates its resources.
 void put(LLRPMessageItem aMessage)
          Put the LLRP Message Item to the repository
 

Field Detail

RETRIEVE_ALL

static final int RETRIEVE_ALL
flag to set the retrieval of messages to all messages in the repo.

See Also:
Constant Field Values
Method Detail

open

void open()
How the resource layer (File System, Database, and etc.) initiates its resources. This function will be called when the client startup.


close

void close()
How the resource layer (File System, Database, and etc.) close and destroy related resource handlers. This function will be called when the client exits.


get

LLRPMessageItem get(java.lang.String aMsgSysId)
Get the LLRP Message Item from repository according to the unique Message ID.

Parameters:
aMsgSysId - The unique message ID
Returns:
LLRP Message Wrapper Item

put

void put(LLRPMessageItem aMessage)
Put the LLRP Message Item to the repository

Parameters:
aMessage - LLRP Message Wrapper Item

get

java.util.ArrayList<LLRPMessageItem> get(java.lang.String adaptorName,
                                         java.lang.String readerName,
                                         int num,
                                         boolean content)
returns all the messages from the specified adaptor and the reader limited by num. if you set num to RETRIEVE_ALL all messages get returned. if you set readerName to null, all the messages of all the readers with adaptor adaptorName will be returned.

Parameters:
adaptorName - the name of the adaptor.
readerName - the name of the reader.
num - how many messages to retrieve.
content - if true retrieve the message content, false no content.
Returns:
a list of messages.

count

int count(java.lang.String adaptor,
          java.lang.String reader)
returns the number of messages in the repository to a given filter.

Parameters:
adaptor - the name of the adaptor to filter. if null all the messages in the repository get return.
reader - the name of the reader to filter. if null all the messages of the given adaptor will be returned.
Returns:
the number of messages in the repository.

clearAll

void clearAll()
Clear all the items in repository.


clearAdapter

void clearAdapter(java.lang.String adapter)
clear all the items that belong to a given adapter.

Parameters:
adapter - the name of the adapter to clear.

clearReader

void clearReader(java.lang.String adapter,
                 java.lang.String reader)
clear all the items that belong to a given reader on a given adapter.

Parameters:
adapter - the name of the adapter where the reader belongs to.
reader - the name of the reader to clear.


Copyright © 2009. All Rights Reserved.