org.globus.wsrf.impl
Class SimpleResourceHome
java.lang.Object
|
+--org.globus.wsrf.impl.SimpleResourceHome
- All Implemented Interfaces:
- Initializable, ResourceHome
- Direct Known Subclasses:
- ResolverHome, SecurityContextHome, SimpleNotificationConsumerHome, SimpleSubscriptionHome
- public abstract class SimpleResourceHome
- extends Object
- implements ResourceHome, Initializable
A simple in-memory implementation of a resource home.
Configuration options:
Note: Must be deployed with
org.globus.wsrf.tools.jndi.BeanFactory in JNDI or user must
first call initialize() method. Also when overriding
the initialize() method make sure to call
super.initialize();.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resources
protected Map resources
keyTypeName
protected QName keyTypeName
SimpleResourceHome
public SimpleResourceHome()
setSweeperDelay
public void setSweeperDelay(long delay)
getSweeperDelay
public long getSweeperDelay()
initialize
public void initialize()
throws Exception
- Specified by:
initialize in interface Initializable
find
public Object find(ResourceKey key)
throws ResourceException
- Description copied from interface:
ResourceHome
- Retrives a resource.
Note: This function must not return null. It must return the
resource object or throw an exception if there is no resource with the
specified key.
- Specified by:
find in interface ResourceHome
- Following copied from interface:
org.globus.wsrf.ResourceHome
- Returns:
- non-null resource object.
- Throws:
NoSuchResourceException - if no resource exists with the given keyInvalidResourceKeyException - if the resource key is invalid.ResourceException - if any other error occurs.
getKeyTypeClass
public Class getKeyTypeClass()
- Description copied from interface:
ResourceHome
- The resource key type. The
ResourceKey used or
passed to this ResourceHome must have match this type
(corresponds to ResourceKey.getValue()).
- Specified by:
getKeyTypeClass in interface ResourceHome
- Following copied from interface:
org.globus.wsrf.ResourceHome
- Returns:
- the type of the key.
getKeyTypeName
public QName getKeyTypeName()
- Description copied from interface:
ResourceHome
- The name of the resource key. The
ResourceKey used or
passed to this ResourceHome must have match this name
(corresponds to ResourceKey.getName()).
- Specified by:
getKeyTypeName in interface ResourceHome
- Following copied from interface:
org.globus.wsrf.ResourceHome
- Returns:
- the name of the key.
remove
public void remove(ResourceKey key)
throws ResourceException
- Description copied from interface:
ResourceHome
- Removes a resource.
If the resource implements the
RemoveCallback
interface, the implementation must invoke this the remove operation
on the resource.
- Specified by:
remove in interface ResourceHome
- Following copied from interface:
org.globus.wsrf.ResourceHome
- Throws:
NoSuchResourceException - if no resource exists with the given keyInvalidResourceKeyException - if the resource key is invalid.RemoveNotSupportedException - if remove operation is not
supported.ResourceException - if any other error occurs.
Copyright © 1999-2003 University of Chicago and The University of Southern California. All rights reserved.