|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.util.component.AbstractLifeCycle org.eclipse.jetty.util.component.AggregateLifeCycle org.eclipse.jetty.overlays.TemplateContext
public class TemplateContext
A Cloudtide template context.
This class is configured by the template.xml files and is used to control the shared resource cache and classloader.
This class is an AggregateLifeCycle, so dependent beans may be added to the template and will be started, stopped and destroyed with the template. The template is started after the template.xml file have been applied. It is stopped and destroyed after the last instance using the template is undeployed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
AbstractLifeCycle.AbstractLifeCycleListener |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary |
---|
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
Constructor Summary | |
---|---|
TemplateContext()
|
|
TemplateContext(String key,
Server server,
Resource baseResource,
ClassLoader libLoader)
|
Method Summary | |
---|---|
void |
addServerClass(String classname)
|
void |
addSystemClass(String classname)
|
void |
destroy()
|
Resource |
getBaseResource()
|
String |
getExtraClasspath()
|
Map<String,Object> |
getIdMap()
|
ClassLoader |
getLibLoader()
|
MimeTypes |
getMimeTypes()
|
PermissionCollection |
getPermissions()
|
ResourceCache |
getResourceCache()
|
Server |
getServer()
|
boolean |
isParentLoaderPriority()
|
boolean |
isServerClass(String clazz)
Is the class a Server Class. |
boolean |
isSystemClass(String clazz)
Is the class a System Class. |
Resource |
newResource(String urlOrPath)
Convert a URL or path to a Resource. |
void |
setExtraClasspath(String extraClasspath)
|
void |
setIdMap(Map<String,Object> idMap)
|
void |
setParentLoaderPriority(boolean java2compliant)
|
void |
setPermissions(PermissionCollection permissions)
|
void |
setServerClasses(String[] serverClasses)
Set the server classes patterns. |
void |
setSystemClasses(String[] systemClasses)
Set the system classes patterns. |
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
---|
addBean, doStart, doStop, dump, dump, dump, dump, dump, dumpStdErr, dumpThis, getBean, getBeans, getBeans, removeBean, removeBeans |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateContext()
public TemplateContext(String key, Server server, Resource baseResource, ClassLoader libLoader) throws IOException
IOException
Method Detail |
---|
public ClassLoader getLibLoader()
public Resource getBaseResource()
public String getExtraClasspath()
getExtraClasspath
in interface WebAppClassLoader.Context
public MimeTypes getMimeTypes()
public PermissionCollection getPermissions()
getPermissions
in interface WebAppClassLoader.Context
public ResourceCache getResourceCache()
public Server getServer()
public boolean isParentLoaderPriority()
isParentLoaderPriority
in interface WebAppClassLoader.Context
public boolean isServerClass(String clazz)
WebAppClassLoader.Context
isServerClass
in interface WebAppClassLoader.Context
clazz
- The fully qualified name of the class.
public boolean isSystemClass(String clazz)
WebAppClassLoader.Context
isSystemClass
in interface WebAppClassLoader.Context
clazz
- The fully qualified name of the class.
public Resource newResource(String urlOrPath) throws IOException
WebAppClassLoader.Context
Resource.newResource(String)
.
newResource
in interface WebAppClassLoader.Context
urlOrPath
- The URL or path to convert
IOException
- The Resource could not be created.public void setExtraClasspath(String extraClasspath)
extraClasspath
- Comma or semicolon separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'.public void setParentLoaderPriority(boolean java2compliant)
java2compliant
- The java2compliant to set.public void setPermissions(PermissionCollection permissions)
permissions
- The permissions to set.public void setServerClasses(String[] serverClasses)
Server classes/packages are classes used to implement the server and are hidden from the context. If the context needs to load these classes, it must have its own copy of them in WEB-INF/lib or WEB-INF/classes. A class pattern is a string of one of the forms:
serverClasses
- The serverClasses to set.public void setSystemClasses(String[] systemClasses)
System classes/packages are classes provided by the JVM and that
cannot be replaced by classes of the same name from WEB-INF,
regardless of the value of setParentLoaderPriority(boolean)
.
A class pattern is a string of one of the forms:
systemClasses
- The systemClasses to set.public void addSystemClass(String classname)
public void addServerClass(String classname)
public void destroy()
destroy
in interface Destroyable
destroy
in class AggregateLifeCycle
public void setIdMap(Map<String,Object> idMap)
public Map<String,Object> getIdMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |