org.abstracthorizon.extend.server.deployment
Interface ModuleLoader

All Known Subinterfaces:
DeploymentManager
All Known Implementing Classes:
AbstractServiceModuleLoader, Bootstrap.DeploymentManagerStub, Bootstrap.DeploymentManagerStub, BulkDeploy, DanubeWarModuleLoader, DeploymentDirectoryModuleLoader, DeploymentManagerImpl, DirectoryModuleLoader, JarModuleLoader, JettyWarModuleLoader, MavenRepoModuleLoader, ServiceModuleLoader, SpringAbstractServiceModuleLoader, TomcatWarModuleLoader

public interface ModuleLoader

This interface describes module loader - a class that knows how to load module from given URI.

Author:
Daniel Sendula

Method Summary
 boolean canLoad(URI uri)
          Returns true if module loader knows how to load (create) module from given URI.
 Module load(URI uri)
          Loads module from given URI.
 Module loadAs(URI uri, ModuleId moduleId)
          Loads module from given URI.
 ModuleId toModuleId(URI uri)
          Translates URI to moduleId
 

Method Detail

canLoad

boolean canLoad(URI uri)
Returns true if module loader knows how to load (create) module from given URI.

Parameters:
uri - URI
Returns:
true if module loader knows how to load (create) module from given URI

toModuleId

ModuleId toModuleId(URI uri)
Translates URI to moduleId

Parameters:
uri - uri
Returns:
module id or null

load

Module load(URI uri)
Loads module from given URI. If canLoad(URI) returns false then this method will return null.

Parameters:
uri - URI for module to be loaded from
Returns:
module from given URI

loadAs

Module loadAs(URI uri,
              ModuleId moduleId)
Loads module from given URI. If canLoad(URI) returns false then this method will return null.

Parameters:
uri - URI for module to be loaded from
moduleId - module id to be used while creating module
Returns:
module from given URI


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.