org.apache.catalina.Pipeline Java Examples
The following examples show how to use
org.apache.catalina.Pipeline.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RedissonSessionManager.java From redisson with Apache License 2.0 | 5 votes |
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); Pipeline pipeline = getEngine().getPipeline(); synchronized (pipeline) { contextInUse.remove(((Context) getContainer()).getName()); //remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore if (contextInUse.isEmpty()) { if (updateValve != null) { pipeline.removeValve(updateValve); updateValve = null; } } } if (messageListener != null) { RTopic updatesTopic = getTopic(); updatesTopic.removeListener(messageListener); } codecToUse = null; try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
Example #2
Source File: RedissonSessionManager.java From redisson with Apache License 2.0 | 5 votes |
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); Pipeline pipeline = getEngine().getPipeline(); synchronized (pipeline) { contextInUse.remove(getContext().getName()); //remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore if (contextInUse.isEmpty()) { if (updateValve != null) { pipeline.removeValve(updateValve); updateValve = null; } } } if (messageListener != null) { RTopic updatesTopic = getTopic(); updatesTopic.removeListener(messageListener); } codecToUse = null; try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
Example #3
Source File: RedissonSessionManager.java From redisson with Apache License 2.0 | 5 votes |
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); Pipeline pipeline = getEngine().getPipeline(); synchronized (pipeline) { contextInUse.remove(getContext().getName()); //remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore if (contextInUse.isEmpty()) { if (updateValve != null) { pipeline.removeValve(updateValve); updateValve = null; } } } if (messageListener != null) { RTopic updatesTopic = getTopic(); updatesTopic.removeListener(messageListener); } codecToUse = null; try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
Example #4
Source File: FailedContext.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #5
Source File: TesterHost.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #6
Source File: TesterContext.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #7
Source File: ValveBase.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public String getObjectNameKeyProperties() { StringBuilder name = new StringBuilder("type=Valve"); Container container = getContainer(); name.append(MBeanUtils.getContainerKeyProperties(container)); int seq = 0; // Pipeline may not be present in unit testing Pipeline p = container.getPipeline(); if (p != null) { for (Valve valve : p.getValves()) { // Skip null valves if (valve == null) { continue; } // Only compare valves in pipeline until we find this valve if (valve == this) { break; } if (valve.getClass() == this.getClass()) { // Duplicate valve earlier in pipeline // increment sequence number seq ++; } } } if (seq > 0) { name.append(",seq="); name.append(seq); } String className = this.getClass().getName(); int period = className.lastIndexOf('.'); if (period >= 0) { className = className.substring(period + 1); } name.append(",name="); name.append(className); return name.toString(); }
Example #8
Source File: FailedContext.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #9
Source File: TesterContext.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #10
Source File: ValveBase.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
@Override public String getObjectNameKeyProperties() { StringBuilder name = new StringBuilder("type=Valve"); Container container = getContainer(); name.append(MBeanUtils.getContainerKeyProperties(container)); int seq = 0; // Pipeline may not be present in unit testing Pipeline p = container.getPipeline(); if (p != null) { for (Valve valve : p.getValves()) { // Skip null valves if (valve == null) { continue; } // Only compare valves in pipeline until we find this valve if (valve == this) { break; } if (valve.getClass() == this.getClass()) { // Duplicate valve earlier in pipeline // increment sequence number seq ++; } } } if (seq > 0) { name.append(",seq="); name.append(seq); } String className = this.getClass().getName(); int period = className.lastIndexOf('.'); if (period >= 0) { className = className.substring(period + 1); } name.append(",name="); name.append(className); return name.toString(); }
Example #11
Source File: FailedContext.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #12
Source File: ContextConfig.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
/** * Process a "contextConfig" event for this Context. */ protected synchronized void configureStart() { // Called from StandardContext.start() if (log.isDebugEnabled()) log.debug(sm.getString("contextConfig.start")); if (log.isDebugEnabled()) { log.debug(sm.getString("contextConfig.xmlSettings", context.getName(), Boolean.valueOf(context.getXmlValidation()), Boolean.valueOf(context.getXmlNamespaceAware()))); } webConfig(); if (!context.getIgnoreAnnotations()) { applicationAnnotationsConfig(); } if (ok) { validateSecurityRoles(); } // Configure an authenticator if we need one if (ok) authenticatorConfig(); // Dump the contents of this pipeline if requested if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) { log.debug("Pipeline Configuration:"); Pipeline pipeline = ((ContainerBase) context).getPipeline(); Valve valves[] = null; if (pipeline != null) valves = pipeline.getValves(); if (valves != null) { for (int i = 0; i < valves.length; i++) { log.debug(" " + valves[i].getInfo()); } } log.debug("======================"); } // Make our application available if no problems were encountered if (ok) context.setConfigured(true); else { log.error(sm.getString("contextConfig.unavailable")); context.setConfigured(false); } }
Example #13
Source File: TesterHost.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #14
Source File: TesterContext.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public Pipeline getPipeline() { return null; }
Example #15
Source File: ContainerBase.java From Tomcat8-Source-Read with MIT License | 4 votes |
/** * Return the Pipeline object that manages the Valves associated with * this Container. */ @Override public Pipeline getPipeline() { return this.pipeline; }
Example #16
Source File: ValveBase.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public String getObjectNameKeyProperties() { StringBuilder name = new StringBuilder("type=Valve"); Container container = getContainer(); name.append(container.getMBeanKeyProperties()); int seq = 0; // Pipeline may not be present in unit testing Pipeline p = container.getPipeline(); if (p != null) { for (Valve valve : p.getValves()) { // Skip null valves if (valve == null) { continue; } // Only compare valves in pipeline until we find this valve if (valve == this) { break; } if (valve.getClass() == this.getClass()) { // Duplicate valve earlier in pipeline // increment sequence number seq ++; } } } if (seq > 0) { name.append(",seq="); name.append(seq); } String className = this.getClass().getName(); int period = className.lastIndexOf('.'); if (period >= 0) { className = className.substring(period + 1); } name.append(",name="); name.append(className); return name.toString(); }
Example #17
Source File: ContextConfig.java From Tomcat8-Source-Read with MIT License | 4 votes |
/** * Process a "contextConfig" event for this Context. * ContextConfig监听器为这个Context处理一个contextConfig事件。 * 解析web.xml事件。 */ protected synchronized void configureStart() { // Called from StandardContext.start() if (log.isDebugEnabled()) { log.debug(sm.getString("contextConfig.start")); } if (log.isDebugEnabled()) { log.debug(sm.getString("contextConfig.xmlSettings", context.getName(), Boolean.valueOf(context.getXmlValidation()), Boolean.valueOf(context.getXmlNamespaceAware()))); } // webConfig(); // 添加JSP解析器,因为index.jsp需要加载。 //add JasperInitializer,cause index.jsp need to load. final Set<Class<?>> nullObject4ClassesSet = null; context.addServletContainerInitializer(new JasperInitializer(), nullObject4ClassesSet); // if (!context.getIgnoreAnnotations()) { applicationAnnotationsConfig(); } if (ok) { validateSecurityRoles(); } // Configure an authenticator if we need one if (ok) { authenticatorConfig(); } // Dump the contents of this pipeline if requested if (log.isDebugEnabled()) { log.debug("Pipeline Configuration:"); Pipeline pipeline = context.getPipeline(); Valve valves[] = null; if (pipeline != null) { valves = pipeline.getValves(); } if (valves != null) { for (int i = 0; i < valves.length; i++) { log.debug(" " + valves[i].getClass().getName()); } } log.debug("======================"); } // Make our application available if no problems were encountered if (ok) { context.setConfigured(true); } else { log.error(sm.getString("contextConfig.unavailable")); context.setConfigured(false); } }
Example #18
Source File: ContainerBase.java From Tomcat7.0.67 with Apache License 2.0 | 3 votes |
/** * Return the Pipeline object that manages the Valves associated with * this Container. */ @Override public Pipeline getPipeline() { return (this.pipeline); }