com.caucho.env.deploy
Class DeployContainer<C extends DeployControllerApi<?>>

java.lang.Object
  extended by com.caucho.make.CachedDependency
      extended by com.caucho.env.deploy.DeployContainer<C>
All Implemented Interfaces:
DeployContainerApi<C>, Dependency

public class DeployContainer<C extends DeployControllerApi<?>>
extends CachedDependency
implements DeployContainerApi<C>, Dependency

A container of deploy objects.


Nested Class Summary
 class DeployContainer.StartupPriorityComparator
           
 
Constructor Summary
DeployContainer(java.lang.Class<C> type)
          Creates the deploy container.
 
Method Summary
 void add(DeployGenerator<C> generator)
          Adds a deploy generator.
 void destroy()
          Closes the deploys.
 C findController(java.lang.String name)
          Returns the matching entry.
 C findControllerById(java.lang.String name)
          Returns the matching entry.
 C[] getControllers()
          Returns the deployed entries.
 void init()
          Initialize the container.
 boolean isModifiedImpl()
          Returns true if the deployment has modified.
 boolean logModified(java.util.logging.Logger log)
          Logs the reason for modification.
 void remove(DeployGenerator<C> generator)
          Removes a deploy.
 void remove(java.lang.String name)
          Called to explicitly remove an entry from the cache.
 void start()
          Start the container.
 void stop()
          Closes the stop.
 java.lang.String toString()
           
 void update()
          Forces updates.
 C update(java.lang.String name)
          Callback from the DeployGenerator when the deployment changes.
 C updateNoStart(java.lang.String name)
          Callback from the DeployGenerator when the deployment changes.
 
Methods inherited from class com.caucho.make.CachedDependency
getCheckInterval, isModified, setCheckInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.vfs.Dependency
isModified
 

Constructor Detail

DeployContainer

public DeployContainer(java.lang.Class<C> type)
Creates the deploy container.

Method Detail

add

public void add(DeployGenerator<C> generator)
Adds a deploy generator.

Specified by:
add in interface DeployContainerApi<C extends DeployControllerApi<?>>

remove

public void remove(DeployGenerator<C> generator)
Removes a deploy.

Specified by:
remove in interface DeployContainerApi<C extends DeployControllerApi<?>>

isModifiedImpl

public boolean isModifiedImpl()
Returns true if the deployment has modified.

Specified by:
isModifiedImpl in class CachedDependency

logModified

public boolean logModified(java.util.logging.Logger log)
Logs the reason for modification.

Specified by:
logModified in interface Dependency

update

public void update()
Forces updates.

Specified by:
update in interface DeployContainerApi<C extends DeployControllerApi<?>>

init

@PostConstruct
public void init()
Initialize the container.


start

public void start()
Start the container.

Specified by:
start in interface DeployContainerApi<C extends DeployControllerApi<?>>

findController

public C findController(java.lang.String name)
Returns the matching entry.

Specified by:
findController in interface DeployContainerApi<C extends DeployControllerApi<?>>

findControllerById

public C findControllerById(java.lang.String name)
Returns the matching entry.

Specified by:
findControllerById in interface DeployContainerApi<C extends DeployControllerApi<?>>

getControllers

public C[] getControllers()
Returns the deployed entries.

Specified by:
getControllers in interface DeployContainerApi<C extends DeployControllerApi<?>>

update

public C update(java.lang.String name)
Callback from the DeployGenerator when the deployment changes. update is only called when a deployment is added or removed, e.g. with a new .war file. The entry handles its own internal changes, e.g. a modification to a web.xml file.

Specified by:
update in interface DeployContainerApi<C extends DeployControllerApi<?>>

updateNoStart

public C updateNoStart(java.lang.String name)
Callback from the DeployGenerator when the deployment changes. update is only called when a deployment is added or removed, e.g. with a new .war file. The entry handles its own internal changes, e.g. a modification to a web.xml file.


remove

public void remove(java.lang.String name)
Called to explicitly remove an entry from the cache.

Specified by:
remove in interface DeployContainerApi<C extends DeployControllerApi<?>>

stop

public void stop()
Closes the stop.

Specified by:
stop in interface DeployContainerApi<C extends DeployControllerApi<?>>

destroy

public void destroy()
Closes the deploys.

Specified by:
destroy in interface DeployContainerApi<C extends DeployControllerApi<?>>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object