org.eclipse.jetty.overlays
类 TemplateContext

java.lang.Object
  继承者 org.eclipse.jetty.util.component.AbstractLifeCycle
      继承者 org.eclipse.jetty.util.component.AggregateLifeCycle
          继承者 org.eclipse.jetty.overlays.TemplateContext
所有已实现的接口:
Destroyable, Dumpable, LifeCycle, WebAppClassLoader.Context

public class TemplateContext
extends AggregateLifeCycle
implements WebAppClassLoader.Context, Destroyable

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.


嵌套类摘要
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口
AbstractLifeCycle.AbstractLifeCycleListener
 
从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口
LifeCycle.Listener
 
字段摘要
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
构造方法摘要
TemplateContext()
           
TemplateContext(String key, Server server, Resource baseResource, ClassLoader libLoader)
           
 
方法摘要
 void addServerClass(String classname)
           
 void addSystemClass(String classname)
           
 void destroy()
          Destroy the joined Destroyable beans in the reverse order they were added.
 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.
 
从类 org.eclipse.jetty.util.component.AggregateLifeCycle 继承的方法
addBean, addBean, contains, doStart, doStop, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

TemplateContext

public TemplateContext()

TemplateContext

public TemplateContext(String key,
                       Server server,
                       Resource baseResource,
                       ClassLoader libLoader)
                throws IOException
抛出:
IOException
方法详细信息

getLibLoader

public ClassLoader getLibLoader()

getBaseResource

public Resource getBaseResource()

getExtraClasspath

public String getExtraClasspath()
指定者:
接口 WebAppClassLoader.Context 中的 getExtraClasspath
返回:
Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.

getMimeTypes

public MimeTypes getMimeTypes()

getPermissions

public PermissionCollection getPermissions()
指定者:
接口 WebAppClassLoader.Context 中的 getPermissions
返回:
Returns the permissions.

getResourceCache

public ResourceCache getResourceCache()

getServer

public Server getServer()

isParentLoaderPriority

public boolean isParentLoaderPriority()
指定者:
接口 WebAppClassLoader.Context 中的 isParentLoaderPriority
返回:
True if the classloader should delegate first to the parent classloader (standard java behaviour) or false if the classloader should first try to load from WEB-INF/lib or WEB-INF/classes (servlet spec recommendation).

isServerClass

public boolean isServerClass(String clazz)
从接口 WebAppClassLoader.Context 复制的描述
Is the class a Server Class. A Server class is a class that is part of the implementation of the server and is NIT visible to a webapplication. The web application may provide it's own implementation of the class, to be loaded from WEB-INF/lib or WEB-INF/classes

指定者:
接口 WebAppClassLoader.Context 中的 isServerClass
参数:
clazz - The fully qualified name of the class.
返回:
True if the class is a server class.

isSystemClass

public boolean isSystemClass(String clazz)
从接口 WebAppClassLoader.Context 复制的描述
Is the class a System Class. A System class is a class that is visible to a webapplication, but that cannot be overridden by the contents of WEB-INF/lib or WEB-INF/classes

指定者:
接口 WebAppClassLoader.Context 中的 isSystemClass
参数:
clazz - The fully qualified name of the class.
返回:
True if the class is a system class.

newResource

public Resource newResource(String urlOrPath)
                     throws IOException
从接口 WebAppClassLoader.Context 复制的描述
Convert a URL or path to a Resource. The default implementation is a wrapper for Resource.newResource(String).

指定者:
接口 WebAppClassLoader.Context 中的 newResource
参数:
urlOrPath - The URL or path to convert
返回:
The Resource for the URL/path
抛出:
IOException - The Resource could not be created.

setExtraClasspath

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 '/'.

setParentLoaderPriority

public void setParentLoaderPriority(boolean java2compliant)
参数:
java2compliant - The java2compliant to set.

setPermissions

public void setPermissions(PermissionCollection permissions)
参数:
permissions - The permissions to set.

setServerClasses

public void setServerClasses(String[] serverClasses)
Set the server classes patterns.

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:

org.package.Classname
Match a specific class
org.package.
Match a specific package hierarchy
-org.package.Classname
Exclude a specific class
-org.package.
Exclude a specific package hierarchy

参数:
serverClasses - The serverClasses to set.

setSystemClasses

public void setSystemClasses(String[] systemClasses)
Set the system classes patterns.

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:

org.package.Classname
Match a specific class
org.package.
Match a specific package hierarchy
-org.package.Classname
Exclude a specific class
-org.package.
Exclude a specific package hierarchy

参数:
systemClasses - The systemClasses to set.

addSystemClass

public void addSystemClass(String classname)

addServerClass

public void addServerClass(String classname)

destroy

public void destroy()
从类 AggregateLifeCycle 复制的描述
Destroy the joined Destroyable beans in the reverse order they were added.

指定者:
接口 Destroyable 中的 destroy
覆盖:
AggregateLifeCycle 中的 destroy
另请参见:
Destroyable.destroy()

setIdMap

public void setIdMap(Map<String,Object> idMap)

getIdMap

public Map<String,Object> getIdMap()


Copyright © 2013. All Rights Reserved.