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

abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl Class Reference

List of all members.

Public Member Functions

 DatabaseProxyImpl (CDBDALPlug plug) throws RemoteException
void submit (Request req) throws RemoteException
void stop (Request req) throws RemoteException
void setRequestResponseFactory (RequestResponseFactory rrf)
void setRequestResponseCallback (RequestCallback cb)
void resume ()
void suspend ()
RequestCallback getRequestCallback ()
RequestResponseFactory getRequestResponseFactory ()
void destroy ()
Identifier getIdentifier ()
void cancelScheduled (RequestTask rt)
void setDebug (boolean value)
boolean isDebug ()

Static Public Attributes

final int NO_ERROR_TYPE = 0
final int NO_ERROR_CODE = 0

Protected Member Functions

boolean checkURI (final URI uri)

Package Functions

RequestTask getTaskForRequest (Request req)

Private Member Functions

void process (Request request) throws RemoteException, RequestException
void processGetQuery (Request request, String path) throws RemoteException, RequestException

Static Private Member Functions

String[] getSubNodes (DAOProxy proxy)

Private Attributes

Identifier id = null
boolean debug = false
String schemeString = null
RequestResponseFactory rrf = null
RequestCallback cb = null
ArrayList timerTasks = new ArrayList(100)

Detailed Description

The database proxy implementation of the CDBDAL plug.

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


Constructor & Destructor Documentation

abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::DatabaseProxyImpl CDBDALPlug  plug  )  throws RemoteException [inline]
 

Creates a new instance of the database implementation. This is called automatically by the plug which passes itself as a parameter.

Parameters:
plug the plug instantiating this instance, non-null


Member Function Documentation

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::cancelScheduled RequestTask  rt  )  [inline]
 

Cancels the existing scheduled task, used when the repeated requests are stopped.

Parameters:
rt the request task to cancel, non-null

boolean abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::checkURI final URI  uri  )  [inline, protected]
 

Checks the protocol prefix in URI syntax., taking into account the value

Returns:
true if the protocol prefix of the given plug is supported, otherwise false

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::destroy  )  [inline]
 

First cancels all request tasks being scheduled, then delegates to super destroy.

Identifier abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::getIdentifier  )  [inline]
 

Returns identifier for this class.

Returns:
the identifier object for this instance
See also:
abeans.core.Identifiable#getIdentifier()

RequestCallback abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::getRequestCallback  )  [inline]
 

Returns the request callback through which the simulated objects may inform the Abeans Engine about the new responses or the change of status of the request.

Returns:
the Abeans Engine database

RequestResponseFactory abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::getRequestResponseFactory  )  [inline]
 

Returns the factory for producing new responses.

Returns:
response factory used by simulated entities to generate responses

String [] abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::getSubNodes DAOProxy  proxy  )  [inline, static, private]
 

Get all subnodes of the current proxy.

Parameters:
proxy proxy whose subnodes to return.
Returns:
array of subnodes.

RequestTask abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::getTaskForRequest Request  req  )  [inline, package]
 

Returns a request that caused a request task to be scheduled in the database proxy implementation. Non-blocking repeated requests will usually cause such tasks to be generated.

Parameters:
req the request for which the task is to be searched for, non-null
Returns:
the task currently in the scheduler

boolean abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::isDebug  )  [inline]
 

Returns the value of debug flag.

Returns:
true
See also:
setDebug

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::process Request  request  )  throws RemoteException, RequestException [inline, private]
 

Processes the request. The database cannot process any request directly, all requests must be directed either to the query child of the database or to the container child. The processing starts by resolving the target contained within the request. If the resolution succeeds, the request is forwarded to the resolved simulated entity. Otherwise the processing fails.

Parameters:
request the request to process, non-null
Exceptions:
RemoteException if the name resolution fails
RequestException if the request is malformed

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::processGetQuery Request  request,
String  path
throws RemoteException, RequestException [inline, private]
 

Processes the get quey request. The request is first started, the context producer is checked. The request is then checked for correctness. A new response is created with the type defined by the type of property to which this query belongs. The result is inserted into the response, which is submitted back to the database. Because the request is single, this completes the request.

Parameters:
request the request to process, non-null
path path to be read from CDB, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::resume  )  [inline]
 

See also:
abeans.pluggable.DatabaseProxy#resume()

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::setDebug boolean  value  )  [inline]
 

Sets the debug attribute for this instance. If true, all received requests will be sent to the message log.

Parameters:
debug value of the debug flag

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::setRequestResponseCallback RequestCallback  cb  )  [inline]
 

This method is invoked by the plug to set the request callback for this database implementation.

Parameters:
cb the new callback to be used, non-null
See also:
abeans.pluggable.DatabaseProxy#setRequestResponseCallback(RequestCallback)

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::setRequestResponseFactory RequestResponseFactory  rrf  )  [inline]
 

This method is invoked by the plug to set the request-response factory for this database implementation.

Parameters:
rrf the factory to use, non-null
See also:
abeans.pluggable.DatabaseProxy#setRequestResponseFactory(RequestResponseFactory)

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::stop Request  req  )  throws RemoteException [inline]
 

Stops a repeated request. The list of active requests that have scheduled tasks is first searched for the request; when found, the corresponding request task is cencelled.

Parameters:
req the request to stop, non-null
Exceptions:
RemoteException if the stop operation fails
See also:
abeans.pluggable.DatabaseProxy#stop(Request)

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::submit Request  req  )  throws RemoteException [inline]
 

This method delegates directly to the process() method.

Parameters:
req the request that is submitted and will be processed, non-null
Exceptions:
RemoteException if the processing fails
See also:
abeans.pluggable.DatabaseProxy#submit(Request)

void abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::suspend  )  [inline]
 

See also:
abeans.pluggable.DatabaseProxy#suspend()


Member Data Documentation

RequestCallback abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::cb = null [private]
 

boolean abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::debug = false [private]
 

Identifier abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::id = null [private]
 

final int abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::NO_ERROR_CODE = 0 [static]
 

Completion code that indicates absence of errors.

final int abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::NO_ERROR_TYPE = 0 [static]
 

Completion type that indicates absence of errors.

RequestResponseFactory abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::rrf = null [private]
 

String abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::schemeString = null [private]
 

ArrayList abeans::pluggable::acs::cdb::dal::DatabaseProxyImpl::timerTasks = new ArrayList(100) [private]
 


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