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

abeans::pluggable::acs::maci::DatabaseProxyImpl Class Reference

Collaboration diagram for abeans::pluggable::acs::maci::DatabaseProxyImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DatabaseProxyImpl (ACSPlug 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 ()
Identifier getIdentifier ()
void setDebug (boolean value)
boolean isDebug ()

Static Public Member Functions

String mapCharacteristicName (String characteristic)
void handleCompletion (Identifiable verifier, Request request, Completion completion, Response response)

Static Public Attributes

final int NO_ERROR_TYPE = 0
final int NO_ERROR_CODE = 0
final String NAME_HISTORY = "history"
final String NAME_CHARACTERISTICS = "find_characteristic"
final String NAME_GET_CHARACTERISTIC = "get_characteristic_by_name"

Protected Member Functions

boolean checkURI (final URI uri)

Private Member Functions

void process (Request request) throws RemoteException, RequestException
void processPropertyRequest (Request request, NarrowCORBAProxy proxy, String path, String query) throws RemoteException, RequestException
void processMonitorQuery (Request request, NarrowCORBAProxy proxy, TypelessProperty property) throws RemoteException, RequestException
void processHistoryQuery (Request request, NarrowCORBAProxy proxy, TypelessProperty property) throws RemoteException, RequestException
void processGetCharacteristicQuery (Request request, NarrowCORBAProxy proxy, TypelessProperty property, String path, String query) throws RemoteException, RequestException
void processGetCharacteristicsQuery (Request request, NarrowCORBAProxy proxy, String path) throws RemoteException, RequestException
void processGetQuery (Request request, NarrowCORBAProxy proxy, String path, String query, TypelessProperty property) throws RemoteException, RequestException
void processSetQuery (Request request, NarrowCORBAProxy proxy, String path, String query, TypelessProperty property) throws RemoteException, RequestException
void processInternal (Request request, NarrowCORBAProxy proxy, String path, String query) throws RemoteException, RequestException

Static Private Member Functions

Object extractAny (Any value)

Private Attributes

ACSPlug plug = null
Identifier id = null
boolean debug = false
String schemeString = null
RequestResponseFactory rrf = null
RequestCallback cb = null

Static Private Attributes

final String GET_SYNC = "get_sync"
final String SET_SYNC = "set_sync"
final long MONITOR_TIMEOUT_MULTIPLIER = 2

Detailed Description

The BACI-aware database proxy implementation of the MACI plug.

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


Constructor & Destructor Documentation

abeans::pluggable::acs::maci::DatabaseProxyImpl::DatabaseProxyImpl ACSPlug  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

boolean abeans::pluggable::acs::maci::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

Object abeans::pluggable::acs::maci::DatabaseProxyImpl::extractAny Any  value  )  [inline, static, private]
 

Extract Java primitive from org.omg.CORBA.Any.

Parameters:
value CORBA Any, non-null
Returns:
extracted Java primitive from value object

Identifier abeans::pluggable::acs::maci::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::maci::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::maci::DatabaseProxyImpl::getRequestResponseFactory  )  [inline]
 

Returns the factory for producing new responses.

Returns:
response factory used by simulated entities to generate responses

void abeans::pluggable::acs::maci::DatabaseProxyImpl::handleCompletion Identifiable  verifier,
Request  request,
Completion  completion,
Response  response
[inline, static]
 

Check completion for error condition, if found error condition with full stack trace is set.

Parameters:
verifier object issuing this verification.
request request generating the completion.
completion completion ADT to be checked. @//throws CompletionException thrown if error condition is found.

boolean abeans::pluggable::acs::maci::DatabaseProxyImpl::isDebug  )  [inline]
 

Returns the value of debug flag.

Returns:
true
See also:
setDebug

String abeans::pluggable::acs::maci::DatabaseProxyImpl::mapCharacteristicName String  characteristic  )  [inline, static]
 

Maps Abeans to ACS characteristic name

Parameters:
characteristic Abeans characteristic name.
Returns:
ACS characteristic name, null if characteristic is unknown

void abeans::pluggable::acs::maci::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::maci::DatabaseProxyImpl::processGetCharacteristicQuery Request  request,
NarrowCORBAProxy  proxy,
TypelessProperty  property,
String  path,
String  query
throws RemoteException, RequestException [inline, private]
 

Processes the get characteristic query 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
proxy narrow CORBA proxy, non-null
path path to be read, non-null
query query (method to be invoked) on object, non-null
property Abeans property model implementation to property, if query is requested on non-property it equals null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processGetCharacteristicsQuery Request  request,
NarrowCORBAProxy  proxy,
String  path
throws RemoteException, RequestException [inline, private]
 

Processes the get characteristics query request (queries for all the characteristics names of the object). 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
proxy narrow CORBA proxy, non-null
path path to be read, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processGetQuery Request  request,
NarrowCORBAProxy  proxy,
String  path,
String  query,
TypelessProperty  property
throws RemoteException, RequestException [inline, private]
 

Processes the get characteristic query 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
proxy narrow CORBA proxy, non-null
path path to be read (property or characteristic), non-null
query query (method to be invoked) on object, non-null
property Abeans property model implementation, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processHistoryQuery Request  request,
NarrowCORBAProxy  proxy,
TypelessProperty  property
throws RemoteException, RequestException [inline, private]
 

Processes the history query request.

Parameters:
request the request to process, non-null
proxy narrow CORBA proxy, non-null
property Abeans property model implementation to query for history, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processInternal Request  request,
NarrowCORBAProxy  proxy,
String  path,
String  query
throws RemoteException, RequestException [inline, private]
 

Processes the 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 object on which to process request, non-null
query query (method to be invoked) on object, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processMonitorQuery Request  request,
NarrowCORBAProxy  proxy,
TypelessProperty  property
throws RemoteException, RequestException [inline, private]
 

Processes the monitor query request.

Parameters:
request the request to process, non-null
proxy narrow CORBA proxy, non-null
property Abeans property model implementation to monitor, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processPropertyRequest Request  request,
NarrowCORBAProxy  proxy,
String  path,
String  query
throws RemoteException, RequestException [inline, private]
 

Processes the property query 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
proxy narrow CORBA proxy, non-null
path path to be read (property or characteristic), non-null
query query (method to be invoked) on object, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::processSetQuery Request  request,
NarrowCORBAProxy  proxy,
String  path,
String  query,
TypelessProperty  property
throws RemoteException, RequestException [inline, private]
 

Processes the set characteristic query 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
proxy narrow CORBA proxy, non-null
path path to be read (property or characteristic), non-null
query query (method to be invoked) on object, non-null
property Abeans property model implementation, non-null
Exceptions:
RemoteException when the get operation on the property fails
RequestException if the request is malformed

void abeans::pluggable::acs::maci::DatabaseProxyImpl::resume  )  [inline]
 

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

void abeans::pluggable::acs::maci::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::maci::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::maci::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::maci::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 cancelled.

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::maci::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::maci::DatabaseProxyImpl::suspend  )  [inline]
 

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


Member Data Documentation

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

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

final String abeans::pluggable::acs::maci::DatabaseProxyImpl::GET_SYNC = "get_sync" [static, private]
 

Synch. get query name.

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

final long abeans::pluggable::acs::maci::DatabaseProxyImpl::MONITOR_TIMEOUT_MULTIPLIER = 2 [static, private]
 

The multiplier with which the monitor request task timer will be multiplied to determine which timeout delta interval, in milliseconds, is to be set in the monitor query request. If this is 0, the monitor query requests will not be timed.

final String abeans::pluggable::acs::maci::DatabaseProxyImpl::NAME_CHARACTERISTICS = "find_characteristic" [static]
 

Characteristics query name.

final String abeans::pluggable::acs::maci::DatabaseProxyImpl::NAME_GET_CHARACTERISTIC = "get_characteristic_by_name" [static]
 

Get characteristic query name.

final String abeans::pluggable::acs::maci::DatabaseProxyImpl::NAME_HISTORY = "history" [static]
 

History query name.

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

Completion code that indicates absence of errors.

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

Completion type that indicates absence of errors.

ACSPlug abeans::pluggable::acs::maci::DatabaseProxyImpl::plug = null [private]
 

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

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

final String abeans::pluggable::acs::maci::DatabaseProxyImpl::SET_SYNC = "set_sync" [static, private]
 

Synch. set query name.


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