org.apache.ws.resource
Interface Resource

All Known Subinterfaces:
PropertiesResource, ScheduledResourceTerminationResource

public interface Resource

A WS-Resource.


Method Summary
 void addTerminationListener(ResourceTerminationListener listener)
          Adds a listener to be invoked when the resource has been terminated.
 void destroy()
          Called by the resource home to indicate to a resource that the resource is being taken out of service.
 EndpointReference getEndpointReference()
          Returns the EndpointReference associated with this Resource.
 java.lang.Object getID()
          Returns the unique id of the resource.
 NamespaceVersionHolder getNamespaceSet()
          Returns the set of specification namespaces that this resource implements.
 void init()
          Called by the resource home to indicate to a resource that the resource is being placed into service.
 void setEndpointReference(EndpointReference epr)
          Sets the EndpointReference associated with this Resource.
 void setID(java.lang.Object id)
           
 

Method Detail

setEndpointReference

public void setEndpointReference(EndpointReference epr)
Sets the EndpointReference associated with this Resource.

Parameters:
epr - The EndpointReference for the Resource.

getEndpointReference

public EndpointReference getEndpointReference()
Returns the EndpointReference associated with this Resource.

Returns:
The Resource's EndpointReference

setID

public void setID(java.lang.Object id)
Parameters:
id -
Throws:
java.lang.IllegalArgumentException - if the specified ID is not the of the correct type for this resource
java.lang.IllegalStateException - if this resource's ID has already been set

getID

public java.lang.Object getID()
Returns the unique id of the resource. In most cases, this value should match value returned by ResourceKey#getValue.

Returns:
the id of the resource.

getNamespaceSet

public NamespaceVersionHolder getNamespaceSet()
Returns the set of specification namespaces that this resource implements.

Returns:
the set of specification namespaces that this resource implements

addTerminationListener

public void addTerminationListener(ResourceTerminationListener listener)
Adds a listener to be invoked when the resource has been terminated.

Parameters:
listener -

destroy

public void destroy()
Called by the resource home to indicate to a resource that the resource is being taken out of service.


init

public void init()
Called by the resource home to indicate to a resource that the resource is being placed into service. A resource can use this method to initialize its properties or any other state.



Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.