Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl Class Reference

List of all members.

Public Member Functions

 HistoryIteratorProxyImpl (TypelessProperty property, NarrowCORBAProxy proxy, int maxElements, long startTime, long stopTime, Request request, RequestCallback rcb) throws RemoteException
int getHistory (Object data, long[] timestamps) throws RemoteException
int exactSize () throws RemoteException
Identifier getIdentifier ()
boolean isDebug ()

Static Public Attributes

final int MAXIMUM_ELEMENTS = 100

Protected Attributes

transient Identifier id
Request request
RequestCallback rcb
Object lvalues
long[] ltimestamps
int current = 0
int iteratorExactSize = 0

Private Member Functions

void initialize (TypelessProperty property, NarrowCORBAProxy proxy, int maxElements, long startTime, long stopTime) throws RemoteException

Detailed Description

This is a proxy interface, used for direct access from modeling layer into pluggable layer, bypassing Abeans Engine, to the transient resource created in response to a "history" query.

For ACS, iterator queries for all (less than MAXIMUM_ELEMENTS and maxElements) history elements, converts the timestamps and filters them using the startTime and stopTime bounds.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@


Constructor & Destructor Documentation

abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::HistoryIteratorProxyImpl TypelessProperty  property,
NarrowCORBAProxy  proxy,
int  maxElements,
long  startTime,
long  stopTime,
Request  request,
RequestCallback  rcb
throws RemoteException [inline]
 

Creates a new instance of proxy implementation.

Parameters:
property property to be queries for history, non-null
proxy property proxy, non-null
maxElements the maximum number of last history entries to be iterated over
startTime all returned history entries will have later time than this
stopTime all returned history entries will have earlier time than this
request the request in response to which this object is being instantiated, non-null
See also:
com.cosylab.datatypes.HistoryConstraints


Member Function Documentation

int abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::exactSize  )  throws RemoteException [inline]
 

Returns the total size of data items in the iterator. The design contract for this method is stronger than for the method of the HistoryIterator from Datatypes: this method returns the exact value.

Returns:
the amount of data in the iterator
Exceptions:
RemoteException if the call is remote and it fails
See also:
abeans.datatypes.HistoryIteratorProxy#exactSize()

int abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::getHistory Object  data,
long[]  timestamps
throws RemoteException [inline]
 

Returns a chunk of history data. The history data is filtered using the HistoryConstraints sent in the request that created this transient proxy object. The implementation of this proxy must fill the data and the timestamps array based on the supplied constraints, up to the capacity of the created arrays. This is an iterator method and will be called repeatedly: the first call returns the most recent data (so that timestamps[0] contains the very last history data element), the next call older data etc).

Parameters:
data data array of the correct (data access) type, non-null
timestamps time stamp array in Java time format, the same length as the data array, non-null
Returns:
the actual number of history elements in the array; useful because the number can be smaller than the preallocated array size
Exceptions:
RemoteException if the data acquisition fails in the remote layer; or if the array parameters do not match in size
See also:
abeans.datatypes.HistoryIteratorProxy#getHistory(java.lang.Object, long[])

Identifier abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::getIdentifier  )  [inline]
 

See also:
abeans.core.Identifiable#getIdentifier()

void abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::initialize TypelessProperty  property,
NarrowCORBAProxy  proxy,
int  maxElements,
long  startTime,
long  stopTime
throws RemoteException [inline, private]
 

Queries property for history elements, converts the timestamps and filters them using the startTime and stopTime bounds.

Parameters:
property property to be queries for history, non-null
proxy property proxy, non-null
maxElements the maximum number of last history entries to be iterated over
startTime all returned history entries will have later time than this
stopTime all returned history entries will have earlier time than this
Exceptions:
RemoteException 

boolean abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::isDebug  )  [inline]
 

See also:
abeans.core.Identifiable#isDebug()


Member Data Documentation

int abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::current = 0 [protected]
 

Iterator index cursor.

transient Identifier abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::id [protected]
 

Identifier.

int abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::iteratorExactSize = 0 [protected]
 

Number of element in the iterator, i.e. elements returned in the last call of getHistory() method.

long [] abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::ltimestamps [protected]
 

Array of history element timestamps.

Object abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::lvalues [protected]
 

Array of history element values.

final int abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::MAXIMUM_ELEMENTS = 100 [static]
 

Maximum history element to be prefetched.

RequestCallback abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::rcb [protected]
 

Request callback.

Request abeans::models::acs::baci::util::async::HistoryIteratorProxyImpl::request [protected]
 

History request to be handled by this iterator.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:43:10 2009 for ACS Java API by doxygen 1.3.8