org.abstracthorizon.extend.server.dynamic
Class Bootstrap.DeploymentManagerStub

java.lang.Object
  extended by org.abstracthorizon.extend.server.dynamic.Bootstrap.DeploymentManagerStub
All Implemented Interfaces:
DeploymentManager, ModuleLoader
Enclosing class:
Bootstrap

public static class Bootstrap.DeploymentManagerStub
extends Object
implements DeploymentManager


Field Summary
protected  EnhancedMap<ModuleId,Module> deployedModules
           
protected  LinkedHashSet<ModuleLoader> moduleLoaders
           
 
Fields inherited from interface org.abstracthorizon.extend.server.deployment.DeploymentManager
DEPLOYMENT_MANAGER_DEFAULT_NAME
 
Constructor Summary
Bootstrap.DeploymentManagerStub()
           
 
Method Summary
 boolean canLoad(URI url)
          Returns true if module loader knows how to load (create) module from given URI.
 void create(Module module)
          Calls Module.create() method.
 void deploy(ModuleId moduleId, Module module)
          Deploys given module.
 void destroy(Module module)
          Calls Module.destroy() method.
 EnhancedMap<ModuleId,Module> getDeployedModules()
          Returns map of deployed modules.
 Set<ModuleLoader> getModuleLoaders()
          Returns set of module loaders
 Module load(URI uri)
          Loads module from given URI.
 Module loadAndDeploy(URI uri)
          This method loads module and deploys it before returning it to the caller.
 Module loadAs(URI uri, ModuleId moduleId)
          Loads module from given URI.
 void redeploy(Module module)
          Re-deploys given module.
 void setModuleLoaders(Set<ModuleLoader> moduleLoaders)
          Sets module loaders
 void start(Module module)
          Calls Module.start() method.
 void stop(Module module)
          Calls Module.stop() method.
 ModuleId toModuleId(URI uri)
          Translates URI to moduleId
 void undeploy(Module module)
          Undeploys given module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployedModules

protected EnhancedMap<ModuleId,Module> deployedModules

moduleLoaders

protected LinkedHashSet<ModuleLoader> moduleLoaders
Constructor Detail

Bootstrap.DeploymentManagerStub

public Bootstrap.DeploymentManagerStub()
Method Detail

create

public void create(Module module)
Description copied from interface: DeploymentManager
Calls Module.create() method.

Specified by:
create in interface DeploymentManager
Parameters:
module - module whose create method is to be called

deploy

public void deploy(ModuleId moduleId,
                   Module module)
Description copied from interface: DeploymentManager
Deploys given module.

Specified by:
deploy in interface DeploymentManager
module - module

destroy

public void destroy(Module module)
Description copied from interface: DeploymentManager
Calls Module.destroy() method.

Specified by:
destroy in interface DeploymentManager
Parameters:
module - module whose destroy method is to be called

loadAndDeploy

public Module loadAndDeploy(URI uri)
Description copied from interface: DeploymentManager
This method loads module and deploys it before returning it to the caller.

Specified by:
loadAndDeploy in interface DeploymentManager
Parameters:
uri - uri of the module as it is going to be passed to ModuleLoader.load(URI) method and #deploy(URI, Module) method
Returns:
loaded module or null if module cannot be loaded TODO check return statement

getDeployedModules

public EnhancedMap<ModuleId,Module> getDeployedModules()
Description copied from interface: DeploymentManager
Returns map of deployed modules.

Specified by:
getDeployedModules in interface DeploymentManager
Returns:
map of deployed modules

getModuleLoaders

public Set<ModuleLoader> getModuleLoaders()
Description copied from interface: DeploymentManager
Returns set of module loaders

Specified by:
getModuleLoaders in interface DeploymentManager
Returns:
module loaders

redeploy

public void redeploy(Module module)
Description copied from interface: DeploymentManager
Re-deploys given module.

Specified by:
redeploy in interface DeploymentManager
Parameters:
module - module

setModuleLoaders

public void setModuleLoaders(Set<ModuleLoader> moduleLoaders)
Description copied from interface: DeploymentManager
Sets module loaders

Specified by:
setModuleLoaders in interface DeploymentManager
Parameters:
moduleLoaders - module loaders

start

public void start(Module module)
Description copied from interface: DeploymentManager
Calls Module.start() method.

Specified by:
start in interface DeploymentManager
Parameters:
module - module whose start method is to be called

stop

public void stop(Module module)
Description copied from interface: DeploymentManager
Calls Module.stop() method.

Specified by:
stop in interface DeploymentManager
Parameters:
module - module whose stop method is to be called

undeploy

public void undeploy(Module module)
Description copied from interface: DeploymentManager
Undeploys given module.

Specified by:
undeploy in interface DeploymentManager
Parameters:
module - module

canLoad

public boolean canLoad(URI url)
Description copied from interface: ModuleLoader
Returns true if module loader knows how to load (create) module from given URI.

Specified by:
canLoad in interface ModuleLoader
Parameters:
url - URI
Returns:
true if module loader knows how to load (create) module from given URI

toModuleId

public ModuleId toModuleId(URI uri)
Translates URI to moduleId

Specified by:
toModuleId in interface ModuleLoader
Parameters:
uri - uri
Returns:
module id or null

load

public Module load(URI uri)
Description copied from interface: ModuleLoader
Loads module from given URI. If ModuleLoader.canLoad(URI) returns false then this method will return null.

Specified by:
load in interface ModuleLoader
Parameters:
uri - URI for module to be loaded from
Returns:
module from given URI

loadAs

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

Specified by:
loadAs in interface ModuleLoader
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.