|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a basic interface through which resources are discovered and removed. The purpose of
ResourceHome
is to interact with a collection of resources of the same type. Each resource type will
have its own custom implementation the ResourceHome
interface. The implementation is expected to provide
custom methods for creating new resources and optionally methods that act on a set of resource objects.
Method Summary | |
boolean |
add(Resource resource)
Adds the specified resource to this home if it is not already present (optional operation). |
java.lang.Object |
extractResourceIdentifier(EndpointReference epr)
Extracts the Resource identifier from the specified endpoint reference - typically, this is done by deserializing a particular reference parameter that represents the identifier. |
java.lang.Object |
extractResourceIdentifier(ResourceContext context)
Extracts the Resource identifier from the specified resource context - typically, this is done by deserializing a particular SOAP header element that contains the identifier. |
Resource |
find(java.lang.Object resourceId)
Retrieves a resource. |
MetadataConfiguration |
getMetadataConfig()
Returns the MetadataConfigImpl containing any configured Metadata for the Service. |
java.lang.String |
getPortComponentName()
Returns the name of the JSR-109 port component corresponding to this home. |
java.lang.String |
getResourceClassName()
Returns the Class of the Resource Impl. |
java.lang.String |
getResourceIdentifierReferenceParameterName()
Gets the name of the SOAP header element from which this home will extract a resource identifier. |
java.lang.String |
getServiceClassName()
Returns the name of the Service class. |
java.lang.String |
getWsdlTargetNamespace()
Returns the target namespace of the WSDL. |
void |
remove(java.lang.Object resourceId)
Removes a resource. |
void |
setResourceClassName(java.lang.String className)
Sets the classname of the Resource Impl. |
void |
setResourceIdentifierReferenceParameterName(java.lang.String name)
Sets the name of the SOAP header element from which this home will extract a resource identifier. |
void |
setServiceClassName(java.lang.String className)
Sets the Service Impl's .Class |
void |
setWsdlTargetNamespace(java.lang.String targetNamespace)
Sets the target namespace of the WSDL of this home's service. |
Methods inherited from interface org.apache.ws.resource.ResourceCreation |
addResourceCreationListener, removeResourceCreationListener |
Methods inherited from interface org.apache.ws.resource.ResourceDestruction |
addResourceDestructionListener, removeResourceDestructionListener |
Method Detail |
public MetadataConfiguration getMetadataConfig()
public java.lang.String getPortComponentName()
public void setResourceClassName(java.lang.String className)
className
- The class name of the Resource Impl.public java.lang.String getResourceClassName()
public void setResourceIdentifierReferenceParameterName(java.lang.String name)
name
- resource identifier header element name, represented as
a string as defined by QName.toString()
(e.g. "{http://http://ws.apache.org/namespaces/wsrf/}ResourceIdentifier")public java.lang.String getResourceIdentifierReferenceParameterName()
QName.toString()
;
or null if this home manages a singleton resourcepublic void setServiceClassName(java.lang.String className)
className
- String representation of the classpublic java.lang.String getServiceClassName()
public void setWsdlTargetNamespace(java.lang.String targetNamespace)
targetNamespace
- public java.lang.String getWsdlTargetNamespace()
public boolean add(Resource resource) throws IllegalResourceTypeException
resource
, to this home if this home contains no resource
existing
such that
(resource.getID().equals(existing.getID())
.
If this home already contains a resource with the same ID as the
specified resource, the call leaves the home unchanged and returns
false.
This method will also check to see if the EndpointReference (EPR) has been set on
the Resource. If the EPR is null, it will create one and set it on the Resource.
resource
- the resource to be added; must not be null
java.lang.UnsupportedOperationException
- if the add method is not
supported by this home
IllegalResourceTypeException
- if the resource is not of the type
supported by this homepublic java.lang.Object extractResourceIdentifier(ResourceContext context)
context
- a resource context
public java.lang.Object extractResourceIdentifier(EndpointReference epr)
epr
- the endpoint reference of a WS-Resource
public Resource find(java.lang.Object resourceId) throws ResourceUnknownException, ResourceException
resourceId
- a resource identifier
ResourceUnknownException
- if no resource exists with the given key
ResourceException
- if any other error occurs.public void remove(java.lang.Object resourceId) throws ResourceUnknownException, ResourceException
Resource.destroy()
method
prior to removal.
ResourceUnknownException
- if no resource exists with the given key
ResourceException
- if any other error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |