railo.commons.io.res
Interface ResourceProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
CacheResourceProvider, CompressResourceProvider, DatasourceResourceProvider, FileResourceProvider, FTPResourceProvider, HTTPResourceProvider, HTTPSResourceProvider, RamResourceProvider, RamResourceProviderOld, ResourceProviderWrapper, S3ResourceProvider, TarResourceProvider, TGZResourceProvider, ZipResourceProvider

public interface ResourceProvider
extends Serializable

Interface for resource provider, loaded by "Resources", classes that implement a provider that produce resources, that match given path.


Method Summary
 Map getArguments()
          returns the arguments defined for this resource
 Resource getResource(String path)
          return a resource that match given path
 String getScheme()
          returns the scheme of the resource
 ResourceProvider init(String scheme, Map arguments)
          this class is called by the "Resources" at startup
 boolean isAttributesSupported()
          returns if the resource support attributes for his resources
 boolean isCaseSensitive()
          returns if the resources of the provider are case-sensitive or not
 boolean isModeSupported()
          returns if the resource support mode for his resources
 void lock(Resource res)
           
 void read(Resource res)
           
 void setResources(Resources resources)
           
 void unlock(Resource res)
           
 

Method Detail

init

ResourceProvider init(String scheme,
                      Map arguments)
this class is called by the "Resources" at startup

Parameters:
scheme - of the provider (can be "null")
arguments - initals argument (can be "null")

getResource

Resource getResource(String path)
return a resource that match given path

Parameters:
path -
Returns:
matching resource to path

getScheme

String getScheme()
returns the scheme of the resource

Returns:
scheme

getArguments

Map getArguments()
returns the arguments defined for this resource

Returns:
scheme

setResources

void setResources(Resources resources)

unlock

void unlock(Resource res)

lock

void lock(Resource res)
          throws IOException
Throws:
IOException

read

void read(Resource res)
          throws IOException
Throws:
IOException

isCaseSensitive

boolean isCaseSensitive()
returns if the resources of the provider are case-sensitive or not

Returns:
is resource case-sensitive or not

isModeSupported

boolean isModeSupported()
returns if the resource support mode for his resources

Returns:
is mode supported or not

isAttributesSupported

boolean isAttributesSupported()
returns if the resource support attributes for his resources

Returns:
is attributes supported or not


Copyright © 2012 Railo