org.apache.catalina.core
Class ServerJarRepository

java.lang.Object
  extended by org.apache.catalina.core.ServerJarRepository
All Implemented Interfaces:
Contained, JarRepository, Lifecycle

public class ServerJarRepository
extends java.lang.Object
implements JarRepository, Contained, Lifecycle

Server specific implementation for a JAR repository, which will manage shared JARs which may contain descriptors. FIXME: Stub impl

Author:
Remy Maucherat

Field Summary
protected  Container container
          The Container with which this Pipeline is associated.
protected  java.lang.String info
          Descriptive information about this implementation.
protected  LifecycleSupport lifecycle
          The lifecycle event support for this component.
protected static java.util.HashSet<java.lang.String> skipJars
          Names of JARs that are known not to contain any descriptors or annotations.
protected static StringManager sm
          The string manager for this package.
protected  boolean started
          Has this component been started yet?
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
ServerJarRepository()
          Construct a new ContextJarRepository instance with no associated Container.
ServerJarRepository(Container container)
          Construct a new ContextJarRepository instance that is associated with the specified Container.
 
Method Summary
 void addLifecycleListener(LifecycleListener listener)
          Add a lifecycle event listener to this component.
 void backgroundProcess()
          Execute a periodic task, such as reloading, etc.
 java.io.File[] findExplodedJars()
          Find all exploded Jars managed by the JARRepository.
 java.util.jar.JarFile findJar(java.lang.String path)
          Find the JarFile corresponding to the path.
 java.util.jar.JarFile[] findJars()
          Find all JarFile managed by the JARRepository.
 LifecycleListener[] findLifecycleListeners()
          Get the lifecycle listeners associated with this lifecycle.
 Container getContainer()
          Return the Container with which this Pipeline is associated.
 java.util.Map<java.lang.String,java.io.File> getExplodedJars()
          Get the exploded Jar map.
 java.lang.String getInfo()
          Return descriptive information about this implementation class.
 java.util.Map<java.lang.String,java.util.jar.JarFile> getJars()
          Get the JarFile map.
 void removeLifecycleListener(LifecycleListener listener)
          Remove a lifecycle event listener from this component.
 void setContainer(Container container)
          Set the Container with which this Pipeline is associated.
 void start()
          Prepare for active use of the public methods of this Component.
 void stop()
          Gracefully shut down active use of the public methods of this Component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

skipJars

protected static java.util.HashSet<java.lang.String> skipJars
Names of JARs that are known not to contain any descriptors or annotations.


container

protected Container container
The Container with which this Pipeline is associated.


info

protected java.lang.String info
Descriptive information about this implementation.


lifecycle

protected LifecycleSupport lifecycle
The lifecycle event support for this component.


sm

protected static StringManager sm
The string manager for this package.


started

protected boolean started
Has this component been started yet?

Constructor Detail

ServerJarRepository

public ServerJarRepository()
Construct a new ContextJarRepository instance with no associated Container.


ServerJarRepository

public ServerJarRepository(Container container)
Construct a new ContextJarRepository instance that is associated with the specified Container.

Parameters:
container - The container we should be associated with
Method Detail

getInfo

public java.lang.String getInfo()
Return descriptive information about this implementation class.

Specified by:
getInfo in interface JarRepository

getContainer

public Container getContainer()
Return the Container with which this Pipeline is associated.

Specified by:
getContainer in interface Contained
Specified by:
getContainer in interface JarRepository

setContainer

public void setContainer(Container container)
Set the Container with which this Pipeline is associated.

Specified by:
setContainer in interface Contained
Specified by:
setContainer in interface JarRepository
Parameters:
container - The new associated container

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.

Specified by:
addLifecycleListener in interface Lifecycle
Parameters:
listener - The listener to add

findLifecycleListeners

public LifecycleListener[] findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

Specified by:
findLifecycleListeners in interface Lifecycle

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.

Specified by:
removeLifecycleListener in interface Lifecycle
Parameters:
listener - The listener to remove

start

public void start()
           throws LifecycleException
Prepare for active use of the public methods of this Component.

Specified by:
start in interface Lifecycle
Throws:
LifecycleException - if this component detects a fatal error that prevents it from being started

stop

public void stop()
          throws LifecycleException
Gracefully shut down active use of the public methods of this Component.

Specified by:
stop in interface Lifecycle
Throws:
LifecycleException - if this component detects a fatal error that needs to be reported

backgroundProcess

public void backgroundProcess()
Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.

Specified by:
backgroundProcess in interface JarRepository

getJars

public java.util.Map<java.lang.String,java.util.jar.JarFile> getJars()
Get the JarFile map.

Specified by:
getJars in interface JarRepository
Returns:
the JarFile map, associating logical name with JarFile

findJar

public java.util.jar.JarFile findJar(java.lang.String path)
Find the JarFile corresponding to the path.

Specified by:
findJar in interface JarRepository
Returns:
the JarFile, or null if not found

findJars

public java.util.jar.JarFile[] findJars()
Find all JarFile managed by the JARRepository.

Specified by:
findJars in interface JarRepository
Returns:
All JarFile

getExplodedJars

public java.util.Map<java.lang.String,java.io.File> getExplodedJars()
Get the exploded Jar map.

Specified by:
getExplodedJars in interface JarRepository
Returns:
the Jar map, associating logical name with File

findExplodedJars

public java.io.File[] findExplodedJars()
Find all exploded Jars managed by the JARRepository.

Specified by:
findExplodedJars in interface JarRepository
Returns:
All exploded File


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.