|
|||||||||||
?PREV CLASS? ?NEXT CLASS | FRAMES ? ?NO FRAMES ? ? | ||||||||||
SUMMARY:?NESTED?|?FIELD?|?CONSTR?|?METHOD | DETAIL:?FIELD?|?CONSTR?|?METHOD |
java.lang.Object | +--uk.org.ogsadai.service.resource.DataServiceResource
A data service resource class.
Manages the interaction between the presentation (service) layer and the core (engine) layer in OGSA-DAI.
A data service resource includes a data resource accessor (used to access any underlying data resource) and an OGSA-DAI engine (as represented by a uk.org.ogsadai.engine.engine
).
Field Summary | |
private static?java.lang.String |
COPYRIGHT_NOTICE ??????????Copyright statement |
private static?DAILogger |
LOG ??????????Logger object for logging in this class |
private ?ActivityFactory |
mActivityFactory ??????????Factory for creating activities supported by the resource |
private ?DataResourceAccessor |
mDataResourceAccessor ??????????Manages access to data resource for the data service resource |
private ?Engine |
mEngine ??????????Request execution engine |
private ?EngineConfiguration |
mEngineConfiguration ??????????Request execution engine configuration |
private ?java.lang.Object |
mID ??????????Data service resource ID |
private ?Properties |
mProperties ??????????Data service resource properties |
private ?RequestFactory |
mRequestFactory ??????????Factory to create requests from perform documents |
private ?SessionCoordinator |
mSessionCoordinator ??????????Manages joining/releasing requests to/from sessions |
private ?SessionStreamManager |
mSessionStreamManager ??????????Session stream manager |
Constructor Summary | |
DataServiceResource(java.lang.Object?id, ActivitiesConfig?activitiesConfig, DataResourceAccessor?dataResourceAccessor, SessionComponentFactory?sessionComponentFactory, ConcurrencySettings?concurrencySettings, AccessAuthorizer?accessAuthorizer) ??????????Create a new data service resource. |
Method Summary | |
private ?void |
addProperties() ??????????Adds all the properties associated with the data resource accessor and activity factory to the properties of the resource. |
?java.lang.Object |
getBlock(SessionStreamID?id) ??????????Get one block of data from an output stream of a session. |
?java.lang.Object |
getFully(SessionStreamID?id) ??????????Get all the data from an output stream of a session. |
?java.lang.Object |
getID() ??????????Gets the resource ID. |
?java.lang.Object |
getNBlocks(SessionStreamID?id, int?numberOfBlocks) ??????????Get a specific number of blocks of data from an output stream of a session. |
?Properties |
getProperties() ??????????Gets the data service resource properties for the resource. |
?SessionStreamManager |
getSessionStreamManager() ??????????Gets the session stream manager for the resource. |
?org.w3c.dom.Document |
perform(org.w3c.dom.Document?performDocument, RequestContext?requestContext) ??????????Execute a perform document. |
?void |
putBlock(SessionStreamID?id, java.lang.Object?data) ??????????Put a block of data onto an input stream of a session. |
?void |
putFully(SessionStreamID?id, java.lang.Object?data) ??????????Put a complete set of data onto an input stream of a session. |
?void |
terminate() ??????????Terminate a current request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private java.lang.Object mID
private Properties mProperties
private final SessionStreamManager mSessionStreamManager
private final ActivityFactory mActivityFactory
private final DataResourceAccessor mDataResourceAccessor
private final SessionCoordinator mSessionCoordinator
private final RequestFactory mRequestFactory
private Engine mEngine
private EngineConfiguration mEngineConfiguration
Constructor Detail |
public DataServiceResource(java.lang.Object?id, ActivitiesConfig?activitiesConfig, DataResourceAccessor?dataResourceAccessor, SessionComponentFactory?sessionComponentFactory, ConcurrencySettings?concurrencySettings, AccessAuthorizer?accessAuthorizer) throws ResourceCreationException
id
- Resource ID.activitiesConfig
- Details of the activities associated with the data service resource.dataResourceAccessor
- The data resource acccessor that gives access to any underlying data resource.sessionComponentFactory
- A factory to create the session components to be used by the data service resource.concurrencySettings
- Default concurrency settings for the resource.accessAuthorizer
- Grants or denies access to activites.java.lang.IllegalArgumentException
- If any of the arguments is null
or the id "".ResourceCreationException
- If the data service resource cannot be created for some reason.Method Detail |
private void addProperties()
public java.lang.Object getID()
public Properties getProperties()
public SessionStreamManager getSessionStreamManager()
public org.w3c.dom.Document perform(org.w3c.dom.Document?performDocument, RequestContext?requestContext) throws ResourceRequestAuthorizationException, ResourceRequestSpecificationException, ResourceRequestExecutionException
performDocument
- The perform document.requestContext
- Information about the client and the request e.g. client security credentials.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unsupported activity or a query expression is has incorrect syntax.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource e.g. a database connection disappears or a file is corrupted.public void terminate() throws ResourceRequestAuthorizationException, ResourceRequestSpecificationException, ResourceRequestExecutionException
ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. the session to which the request belongs does not exist.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.public java.lang.Object getFully(SessionStreamID?id) throws ResourceRequestAuthorizationException, ResourceRequestExecutionException, ResourceRequestSpecificationException
id
- Session and stream identifier.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unknown session or stream.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.SessionStreamManager.getFully(uk.org.ogsadai.sessions.SessionStreamID)
public java.lang.Object getNBlocks(SessionStreamID?id, int?numberOfBlocks) throws ResourceRequestAuthorizationException, ResourceRequestExecutionException, ResourceRequestSpecificationException
id
- Session and stream identifier.numberOfBlocks
- Number of blocks to get.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unknown session or stream.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.SessionStreamManager.getNBlocks(uk.org.ogsadai.sessions.SessionStreamID, int)
public java.lang.Object getBlock(SessionStreamID?id) throws ResourceRequestAuthorizationException, ResourceRequestExecutionException, ResourceRequestSpecificationException
id
- Session and stream identifier.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unknown session or stream.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.SessionStreamManager.getNBlocks(uk.org.ogsadai.sessions.SessionStreamID, int)
public void putBlock(SessionStreamID?id, java.lang.Object?data) throws ResourceRequestAuthorizationException, ResourceRequestExecutionException, ResourceRequestSpecificationException
id
- Session and stream identifier.data
- Single block of data.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unknown session or stream or the stream was closed.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.SessionStreamManager.putBlock(uk.org.ogsadai.sessions.SessionStreamID, java.lang.Object)
public void putFully(SessionStreamID?id, java.lang.Object?data) throws ResourceRequestAuthorizationException, ResourceRequestExecutionException, ResourceRequestSpecificationException
id
- Session and stream identifier.data
- Single block of data.ResourceRequestAuthorizationException
- if the request fails because of an authorization problem.ResourceRequestSpecificationException
- if the request fails to execute due to a problem in the request e.g. it specifies an unknown session or stream or the stream was closed.ResourceRequestExecutionException
- if the request fails to execute due to a problem in the resource.SessionStreamManager.putFully(uk.org.ogsadai.sessions.SessionStreamID, java.lang.Object)
|
|||||||||||
?PREV CLASS? ?NEXT CLASS | FRAMES ? ?NO FRAMES ? ? | ||||||||||
SUMMARY:?NESTED?|?FIELD?|?CONSTR?|?METHOD | DETAIL:?FIELD?|?CONSTR?|?METHOD |