net.gloin.resource
Interface ResourceHandle

All Known Implementing Classes:
ResourceHandleProxy

public interface ResourceHandle

Enables user services store to resources in a resource service. Only used by Jini services which need to use the resource service to support a codebase annotation.


Method Summary
 void fillResource(java.io.InputStream in)
          Send an input stream that may be used remotely in a resource service.
 java.lang.String getName()
          Obtain the name of the resource to which this object is a handle.
 void updateResource(java.io.InputStream in)
          Send an input stream that may be used remotely in a resource service.
 

Method Detail

getName

public java.lang.String getName()
                         throws java.io.IOException
Obtain the name of the resource to which this object is a handle.
Returns:
the name of the resource to which this object is a handle.

fillResource

public void fillResource(java.io.InputStream in)
                  throws java.io.IOException,
                         ResourceRegisteredException
Send an input stream that may be used remotely in a resource service. The resource service must read the bytes from the stream in order to fill the resource corresponding to this handle.
Parameters:
in - the input stream from which a resource service will read the bytes to fill the resource for this handle.
Throws:
ResourceRegisteredException - if the resource for this object is not empty when a request to fill is made.

updateResource

public void updateResource(java.io.InputStream in)
                    throws java.io.IOException
Send an input stream that may be used remotely in a resource service. The resource service must read the bytes from the stream in order to fill the resource corresponding to this handle.
Parameters:
in - the input stream from which a resource service will read the bytes to update the resource for this handle.