org.abstracthorizon.extend.server.deployment.support
Class UnknownLoaderModule

java.lang.Object
  extended by org.abstracthorizon.extend.server.deployment.support.UnknownLoaderModule
All Implemented Interfaces:
Module

public class UnknownLoaderModule
extends Object
implements Module

This represents module of an URL that doesn't have known module loader

Author:
Daniel Sendula
See Also:
DeploymentManager, DeploymentManagerImpl

Field Summary
protected  ModuleId moduleId
          Modules name
protected  URI uri
          URI
 
Fields inherited from interface org.abstracthorizon.extend.server.deployment.Module
CREATED, DEFINED, STARTED, UNDEFINED, WAITING_ON_CREATE, WAITING_ON_CREATE_TO_START, WAITING_ON_START
 
Constructor Summary
UnknownLoaderModule(URI uri)
          Constructor.
 
Method Summary
 void create()
          Empty implementation
 void destroy()
          Empty implementation
 boolean equals(Object o)
          Compares two modules and returns true if names are the same
 ClassLoader getClassLoader()
          Returns null
 Set<Module> getDependOnThis()
          Returns an empty set
 Set<Module> getDependsOn()
          Returns an empty set
 ModuleId getModuleId()
          Returns name as "_not_deployed_" + location.toString();
 URL getOriginalLocation()
          Returns module's location
 int getState()
          Returns Module.STARTED
 String getStateAsString()
          Returns Module.STARTED as string
 URI getURI()
          Returns URI
 URL getWorkingLocation()
          Returns module's location
 void setState(int state)
          Sets the moduile's state.
 void start()
          Starts the module.
 void stop()
          Stops the module.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

protected URI uri
URI


moduleId

protected ModuleId moduleId
Modules name

Constructor Detail

UnknownLoaderModule

public UnknownLoaderModule(URI uri)
Constructor. It sets name as last part of url's file

Parameters:
uri - URI location
Method Detail

getClassLoader

public ClassLoader getClassLoader()
Returns null

Specified by:
getClassLoader in interface Module
Returns:
null

getDependOnThis

public Set<Module> getDependOnThis()
Returns an empty set

Specified by:
getDependOnThis in interface Module
Returns:
an empty set

getDependsOn

public Set<Module> getDependsOn()
Returns an empty set

Specified by:
getDependsOn in interface Module
Returns:
an empty set

getOriginalLocation

public URL getOriginalLocation()
Returns module's location

Specified by:
getOriginalLocation in interface Module
Returns:
module's location

getWorkingLocation

public URL getWorkingLocation()
Returns module's location

Specified by:
getWorkingLocation in interface Module
Returns:
module's location

getURI

public URI getURI()
Returns URI

Returns:

getModuleId

public ModuleId getModuleId()
Returns name as "_not_deployed_" + location.toString();

Specified by:
getModuleId in interface Module
Returns:
name as "_not_deployed_" + location.toString();

create

public void create()
Empty implementation

Specified by:
create in interface Module

start

public void start()
Description copied from interface: Module
Starts the module.

Note: Not to be called directly. Use DeploymentManager.start(Module) method instead.

Specified by:
start in interface Module
Throws:
RuntimeException

stop

public void stop()
Description copied from interface: Module
Stops the module.

Note: Not to be called directly. Use DeploymentManager.stop(Module) method instead.

Specified by:
stop in interface Module
Throws:
RuntimeException

destroy

public void destroy()
Empty implementation

Specified by:
destroy in interface Module

setState

public void setState(int state)
Description copied from interface: Module
Sets the moduile's state.

Note: Not to be called directly!

Specified by:
setState in interface Module
Parameters:
state - module's state
Throws:
RuntimeException

getState

public int getState()
Returns Module.STARTED

Specified by:
getState in interface Module
Returns:
Module.STARTED

getStateAsString

public String getStateAsString()
Returns Module.STARTED as string

Returns:
Module.STARTED as string

equals

public boolean equals(Object o)
Compares two modules and returns true if names are the same

Overrides:
equals in class Object
Parameters:
o - other object
Returns:
true if names are the same


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