org.apache.ws.resource
Interface Resource

All Known Subinterfaces:
PersistentResource, PropertiesResource, ScheduledResourceTerminationResource

public interface Resource

A marker interface for a resource. All resource objects must implement this interface.


Method Summary
 void addTerminationListener(ResourceTerminationListener listener)
          Adds a listener to be invoked when the resource has been terminated.
 void destroy()
          The WS-RF runtime system ends the lifecycle of a Resource object by invoking this method.
 EndpointReference getEndpointReference()
          Returns the EndpointReference associated with this Resource.
 java.lang.Object getID()
          Returns the unique id of the resource.
 void init()
          The WS-RF runtime system initializes a Resource object by invoking this method.
 void setID(java.lang.Object id)
           
 

Method Detail

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.

destroy

public void destroy()
The WS-RF runtime system ends the lifecycle of a Resource object by invoking this method.


init

public void init()
The WS-RF runtime system initializes a Resource object by invoking this method.


addTerminationListener

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

Parameters:
listener -

getEndpointReference

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

Returns:
The Resource's EndpointReference


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