本文整理了Java中org.apache.catalina.WebResourceRoot.getState()
方法的一些代码示例,展示了WebResourceRoot.getState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResourceRoot.getState()
方法的具体详情如下:
包路径:org.apache.catalina.WebResourceRoot
类名称:WebResourceRoot
方法名:getState
暂无
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
public LifecycleState getState() {
return delegate.getState();
}
代码示例来源:origin: org.apache.tomee/tomee-catalina
public void internalDestroy() throws LifecycleException {
if (LifecycleState.STARTED == delegate.getState()) {
internalStop();
}
delegate.destroy();
}
代码示例来源:origin: org.joinfaces/jsf-tomcat-spring-boot-autoconfigure
public ContextMock() {
this.standardContext = Mockito.mock(Context.class);
this.webResourceRoot = Mockito.mock(WebResourceRoot.class);
LifecycleState state = LifecycleState.NEW;
Mockito.when(this.webResourceRoot.getContext())
.thenReturn(this.standardContext);
Mockito.when(this.webResourceRoot.getState())
.thenReturn(state);
Mockito.when(this.standardContext.getResources())
.thenReturn(this.webResourceRoot);
Mockito.when(this.standardContext.getAddWebinfClassesResources())
.thenReturn(Boolean.FALSE);
}
代码示例来源:origin: org.joinfaces/jsf-spring-boot-autoconfigure
public ContextMock() {
this.standardContext = Mockito.mock(Context.class);
this.webResourceRoot = Mockito.mock(WebResourceRoot.class);
LifecycleState state = LifecycleState.NEW;
Mockito.when(this.webResourceRoot.getContext())
.thenReturn(this.standardContext);
Mockito.when(this.webResourceRoot.getState())
.thenReturn(state);
Mockito.when(this.standardContext.getResources())
.thenReturn(this.webResourceRoot);
Mockito.when(this.standardContext.getAddWebinfClassesResources())
.thenReturn(Boolean.FALSE);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
public AbstractSingleArchiveResourceSet(WebResourceRoot root, String webAppMount, String base,
String internalPath) throws IllegalArgumentException {
setRoot(root);
setWebAppMount(webAppMount);
setBase(base);
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
} catch (LifecycleException e) {
throw new IllegalStateException(e);
}
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
public AbstractSingleArchiveResourceSet(WebResourceRoot root, String webAppMount, String base,
String internalPath) throws IllegalArgumentException {
setRoot(root);
setWebAppMount(webAppMount);
setBase(base);
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
} catch (LifecycleException e) {
throw new IllegalStateException(e);
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: codefollower/Tomcat-Research
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
setBase(base);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: codefollower/Tomcat-Research
setBase(base);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
setBase(base);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: codefollower/Tomcat-Research
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: codefollower/Tomcat-Research
setInternalPath(internalPath);
if (getRoot().getState().isAvailable()) {
try {
start();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Allocate resources, including proxy.
* @throws LifecycleException if a start error occurs
*/
public void resourcesStart() throws LifecycleException {
// Check current status in case resources were added that had already
// been started
if (!resources.getState().isAvailable()) {
resources.start();
}
if (effectiveMajorVersion >=3 && addWebinfClassesResources) {
WebResource webinfClassesResource = resources.getResource(
"/WEB-INF/classes/META-INF/resources");
if (webinfClassesResource.isDirectory()) {
getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.RESOURCE_JAR, "/",
webinfClassesResource.getURL(), "/");
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Allocate resources, including proxy.
* @throws LifecycleException if a start error occurs
*/
public void resourcesStart() throws LifecycleException {
// Check current status in case resources were added that had already
// been started
if (!resources.getState().isAvailable()) {
resources.start();
}
if (effectiveMajorVersion >=3 && addWebinfClassesResources) {
WebResource webinfClassesResource = resources.getResource(
"/WEB-INF/classes/META-INF/resources");
if (webinfClassesResource.isDirectory()) {
getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.RESOURCE_JAR, "/",
webinfClassesResource.getURL(), "/");
}
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Allocate resources, including proxy.
* Return <code>true</code> if initialization was successfull,
* or <code>false</code> otherwise.
*/
public void resourcesStart() throws LifecycleException {
// May have been started (but not fully configured) in init() so no need
// to start the resources if they are already available
if (!resources.getState().isAvailable()) {
resources.start();
}
if (effectiveMajorVersion >=3 && addWebinfClassesResources) {
WebResource webinfClassesResource = resources.getResource(
"/WEB-INF/classes/META-INF/resources");
if (webinfClassesResource.isDirectory()) {
getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.RESOURCE_JAR, "/",
webinfClassesResource.getURL(), "/");
}
}
}
内容来源于网络,如有侵权,请联系作者删除!