SRJRCFrames
v0.1.296

de.schwarzrot.jar
Class JarExtensionHandler

java.lang.Object
  extended by de.schwarzrot.jar.JarExtensionHandler

public class JarExtensionHandler
extends Object

is a wrapper class around a JarHandler singleton, so each extension will only extend existing classpath and functionality. JarExtensionHandler uses JarValidators to validate certain extension. This way, an extension can support an individual (sub-)extension directory without having to care about the applications extension directory.

A valid extension contains at least the manifest attribute "Implementation-Type", which is used to determine the extension validator. If the extension uses external classes, its Manifest file should also contain the entry "Class-Path". Its Classpath should contain all used entries and not assume any library be preloaded by the application frame.

The validators are injected by application context, so it is possible to add new extension types.

Author:
Reinhard Mantey
See Also:
for usage sample

Field Summary
static String CLASS_PATH
           
static String CONTEXT_PATH
           
static String IMPLEMENTATION_NAME
           
static String IMPLEMENTATION_TYPE
           
static String IMPLEMENTATION_VERSION
           
static String JAR_MASK
           
 
Constructor Summary
JarExtensionHandler()
           
 
Method Summary
 void dump()
           
 void dump(PrintStream out)
           
 ClassLoader getClassLoader()
           
protected  Map<String,List<JarExtension>> getExtensions()
           
 List<JarExtension> getExtensions(String extensionType)
           
 List<String> getRecognizedTypes()
           
 Map<String,JarValidator> getValidators()
           
 JarFile investigateArchive(File jarFile)
           
 JarFile investigateArchive(String jarFilename)
           
 void loadExtensions(String extDir)
           
 void setValidators(Map<String,JarValidator> validators)
           
 JarExtension verifyArchive(File jar)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_PATH

public static final String CLASS_PATH
See Also:
Constant Field Values

CONTEXT_PATH

public static final String CONTEXT_PATH
See Also:
Constant Field Values

IMPLEMENTATION_NAME

public static final String IMPLEMENTATION_NAME
See Also:
Constant Field Values

IMPLEMENTATION_VERSION

public static final String IMPLEMENTATION_VERSION
See Also:
Constant Field Values

IMPLEMENTATION_TYPE

public static final String IMPLEMENTATION_TYPE
See Also:
Constant Field Values

JAR_MASK

public static final String JAR_MASK
See Also:
Constant Field Values
Constructor Detail

JarExtensionHandler

public JarExtensionHandler()
Method Detail

dump

public void dump()

dump

public void dump(PrintStream out)

getClassLoader

public ClassLoader getClassLoader()

getExtensions

public final List<JarExtension> getExtensions(String extensionType)

getRecognizedTypes

public final List<String> getRecognizedTypes()

getValidators

public final Map<String,JarValidator> getValidators()

investigateArchive

public JarFile investigateArchive(File jarFile)

investigateArchive

public JarFile investigateArchive(String jarFilename)

loadExtensions

public void loadExtensions(String extDir)

setValidators

public final void setValidators(Map<String,JarValidator> validators)

verifyArchive

public JarExtension verifyArchive(File jar)

getExtensions

protected final Map<String,List<JarExtension>> getExtensions()

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.