|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.service.wsrf.resource.DataServiceResourceWrapperHome
A org.globus.wsrf.ResourceHome
for uk.org.ogsadai.service.wsrf.resource.DataServiceResourceWrapper
s.
The key type class is specified in a JNDI configuration file.
The key type name is specified in uk.org.ogsadai.service.wsrf.WSRFConstants#DATA_SERVICE_RESOURCE_KEY
.
ResourceHome
, Initializable
, DataServiceResource
, DataServiceResourceWrapper
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement. |
private static DAILogger |
LOG Logger object for logging in this class |
private java.lang.Class |
mKeyTypeClass Class used for resource keys |
private java.util.Map |
mResources Current DataServiceResourceWrappers indexed by keys of type mKeyTypeClass |
Constructor Summary | |
DataServiceResourceWrapperHome() |
Method Summary | |
void |
add(org.globus.wsrf.ResourceKey key, java.lang.Object resource) Add a wrapped data service resource with the given key to the "home". |
boolean |
contains(org.globus.wsrf.ResourceKey key) Returns whether or a resource already exists with the specified key. |
org.globus.wsrf.ResourceKey |
create(java.lang.Object id, DataResourceAccessor dataResourceAccessor, ActivitiesConfig activitiesConfig, SessionComponentFactory sessionComponentFactory, SecurityContextProvider securityContextProvider, ConcurrencySettings concurrency, AccessAuthorizer authority) Create a new DataServiceResource , wrapped in a DataServiceResourceWrapper , add it to the "home" and return its org.globus.wsrf.ResourceKey . |
org.globus.wsrf.Resource |
find(org.globus.wsrf.ResourceKey key) |
java.lang.Object[] |
getKeys() Return an array of the current keys. |
java.lang.Class |
getKeyTypeClass() |
javax.xml.namespace.QName |
getKeyTypeName() |
void |
initialize() |
void |
remove(org.globus.wsrf.ResourceKey key) |
void |
setResourceKeyType(java.lang.String clazz) Set the class used for resource keys. |
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.Class mKeyTypeClass
private java.util.Map mResources
DataServiceResourceWrappers
indexed by keys of type mKeyTypeClass
Constructor Detail |
public DataServiceResourceWrapperHome()
Method Detail |
public org.globus.wsrf.ResourceKey create(java.lang.Object id, DataResourceAccessor dataResourceAccessor, ActivitiesConfig activitiesConfig, SessionComponentFactory sessionComponentFactory, SecurityContextProvider securityContextProvider, ConcurrencySettings concurrency, AccessAuthorizer authority) throws ResourceCreationException, ResourceKeyInvalidException
DataServiceResource
, wrapped in a DataServiceResourceWrapper
, add it to the "home" and return its org.globus.wsrf.ResourceKey
.
Any existing resource with the same ID is overwritten.
id
- ID of the data service resource - used to construct the ResourceKey
dataResourceAccessor
- The data resource accessor that gives access to any underlying data resource.activitiesConfig
- Configuration details regarding the activity that can be used with the resource.sessionComponentFactory
- A factory to create the session components required by a data service resource.securityContextProvider
- Object that will provide security information for use when accessing resource property values.concurrency
- Default concurrency settings for the resource.authority
- Authorizes access to activities supported by this data service resource.ResourceCreationException
- if the data service resource cannot be created for some reason.ResourceKeyInvalidException
- if the resource key ID is null
.DataServiceResource
, DataServiceResourceWrapper
public void initialize() throws java.lang.Exception
initialize
in interface org.globus.wsrf.jndi.Initializable
java.lang.Exception
public java.lang.Class getKeyTypeClass()
getKeyTypeClass
in interface org.globus.wsrf.ResourceHome
public javax.xml.namespace.QName getKeyTypeName()
getKeyTypeName
in interface org.globus.wsrf.ResourceHome
public void setResourceKeyType(java.lang.String clazz) throws java.lang.ClassNotFoundException
clazz
- Resource key class.java.lang.ClassNotFoundException
- if the class does not exist on the CLASSPATH
.public org.globus.wsrf.Resource find(org.globus.wsrf.ResourceKey key) throws org.globus.wsrf.ResourceException, org.globus.wsrf.NoSuchResourceException, org.globus.wsrf.InvalidResourceKeyException
find
in interface org.globus.wsrf.ResourceHome
org.globus.wsrf.ResourceException
org.globus.wsrf.NoSuchResourceException
org.globus.wsrf.InvalidResourceKeyException
public void remove(org.globus.wsrf.ResourceKey key) throws org.globus.wsrf.ResourceException, org.globus.wsrf.NoSuchResourceException, org.globus.wsrf.InvalidResourceKeyException, org.globus.wsrf.RemoveNotSupportedException
remove
in interface org.globus.wsrf.ResourceHome
org.globus.wsrf.ResourceException
org.globus.wsrf.NoSuchResourceException
org.globus.wsrf.InvalidResourceKeyException
org.globus.wsrf.RemoveNotSupportedException
public void add(org.globus.wsrf.ResourceKey key, java.lang.Object resource) throws org.globus.wsrf.InvalidResourceKeyException, java.lang.IllegalArgumentException
DataServiceResourceWrapper
then it is not added.
Any existing resource with the same ID is overwritte.
key
- Resource key.resource
- A DataServiceResourceWrapper
.org.globus.wsrf.InvalidResourceKeyException
- if key
is null
.java.lang.IllegalArgumentException
- if resource
is null
or not of type DataServiceResourceWrapper
public java.lang.Object[] getKeys()
public boolean contains(org.globus.wsrf.ResourceKey key)
key
- Resource key.true
if the resource exists, false
if it does not.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |