本文整理了Java中org.apache.catalina.Pipeline.getValves()
方法的一些代码示例,展示了Pipeline.getValves()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pipeline.getValves()
方法的具体详情如下:
包路径:org.apache.catalina.Pipeline
类名称:Pipeline
方法名:getValves
[英]Return the set of Valves in the pipeline associated with this Container, including the basic Valve (if any). If there are no such Valves, a zero-length array is returned.
[中]返回与该容器相关的管道中的一组阀门,包括基本阀门(如有)。如果没有这样的阀,则返回一个零长度数组。
代码示例来源:origin: tomcat/catalina
/**
* Return the set of Valves in the pipeline associated with this
* Container, including the basic Valve (if any). If there are no
* such Valves, a zero-length array is returned.
*/
public Valve[] getValves() {
return (pipeline.getValves());
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the set of Valves in the pipeline associated with this
* Container, including the basic Valve (if any). If there are no
* such Valves, a zero-length array is returned.
*/
public Valve[] getValves() {
return (pipeline.getValves());
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the set of Valves in the pipeline associated with this
* Container, including the basic Valve (if any). If there are no
* such Valves, a zero-length array is returned.
*/
public Valve[] getValves() {
return (pipeline.getValves());
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Return the set of Valves in the pipeline associated with this
* Container, including the basic Valve (if any). If there are no
* such Valves, a zero-length array is returned.
*/
public GlassFishValve[] getValves() {
return (pipeline.getValves());
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
private Valve findValve(Container container, int seq) {
Pipeline pipeline = container.getPipeline();
if (pipeline == null) {
return null;
}
Valve[] valves = pipeline.getValves();
if (valves == null || seq >= valves.length) {
return null;
} else {
return valves[seq];
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public AccessLog getAccessLog() {
if (accessLogScanComplete) {
return accessLog;
}
Valve valves[] = getPipeline().getValves();
for (Valve valve : valves) {
if (valve instanceof AccessLog) {
accessLog = (AccessLog) valve;
break;
}
}
accessLogScanComplete = true;
return accessLog;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public AccessLog getAccessLog() {
if (accessLogScanComplete) {
return accessLog;
}
Valve valves[] = getPipeline().getValves();
for (Valve valve : valves) {
if (valve instanceof AccessLog) {
accessLog = (AccessLog) valve;
break;
}
}
accessLogScanComplete = true;
return accessLog;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public AccessLog getAccessLog() {
if (accessLogScanComplete) {
return accessLog;
}
Valve valves[] = getPipeline().getValves();
for (Valve valve : valves) {
if (valve instanceof AccessLog) {
accessLog = (AccessLog) valve;
break;
}
}
accessLogScanComplete = true;
return accessLog;
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Gets the Authenticator of this Context.
*
* @return the Authenticator of this Context
*/
@Override
public Authenticator getAuthenticator() {
Pipeline p = getPipeline();
if (p != null) {
for (GlassFishValve valve : p.getValves()) {
if (valve instanceof Authenticator) {
return (Authenticator) valve;
}
}
}
return null;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* @return the MBean Names of the Valves associated with this Host
*
* @exception Exception if an MBean cannot be created or registered
*/
public String[] getValveNames() throws Exception {
Valve [] valves = this.getPipeline().getValves();
String [] mbeanNames = new String[valves.length];
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof JmxEnabled) {
ObjectName oname = ((JmxEnabled) valves[i]).getObjectName();
if (oname != null) {
mbeanNames[i] = oname.toString();
}
}
}
return mbeanNames;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public Authenticator getAuthenticator() {
Pipeline pipeline = getPipeline();
if (pipeline != null) {
Valve basic = pipeline.getBasic();
if (basic instanceof Authenticator)
return (Authenticator) basic;
for (Valve valve : pipeline.getValves()) {
if (valve instanceof Authenticator) {
return (Authenticator) valve;
}
}
}
return null;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public Authenticator getAuthenticator() {
Pipeline pipeline = getPipeline();
if (pipeline != null) {
Valve basic = pipeline.getBasic();
if (basic instanceof Authenticator)
return (Authenticator) basic;
for (Valve valve : pipeline.getValves()) {
if (valve instanceof Authenticator) {
return (Authenticator) valve;
}
}
}
return null;
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public Authenticator getAuthenticator() {
if (this instanceof Authenticator)
return (Authenticator) this;
Pipeline pipeline = getPipeline();
if (pipeline != null) {
Valve basic = pipeline.getBasic();
if ((basic != null) && (basic instanceof Authenticator))
return (Authenticator) basic;
Valve valves[] = pipeline.getValves();
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof Authenticator)
return (Authenticator) valves[i];
}
}
return null;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public Authenticator getAuthenticator() {
if (this instanceof Authenticator)
return (Authenticator) this;
Pipeline pipeline = getPipeline();
if (pipeline != null) {
Valve basic = pipeline.getBasic();
if ((basic != null) && (basic instanceof Authenticator))
return (Authenticator) basic;
Valve valves[] = pipeline.getValves();
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof Authenticator)
return (Authenticator) valves[i];
}
}
return null;
}
代码示例来源:origin: modcluster/mod_cluster
@Override
public void removeRequestListener(ServletRequestListener listener) {
if (this.valveFactory != null) {
Valve listenerValve = this.valveFactory.createValve(listener);
Pipeline pipeline = this.context.getPipeline();
for (Valve valve : pipeline.getValves()) {
if (listenerValve.equals(valve)) {
pipeline.removeValve(valve);
break;
}
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public Authenticator getAuthenticator() {
if (this instanceof Authenticator)
return (Authenticator) this;
Pipeline pipeline = getPipeline();
if (pipeline != null) {
Valve basic = pipeline.getBasic();
if ((basic != null) && (basic instanceof Authenticator))
return (Authenticator) basic;
Valve valves[] = pipeline.getValves();
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof Authenticator)
return (Authenticator) valves[i];
}
}
return null;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the MBean Names of the Valves associated with this Host
*
* @exception Exception if an MBean cannot be created or registered
*/
public String [] getValveNames()
throws Exception
{
Valve [] valves = this.getPipeline().getValves();
String [] mbeanNames = new String[valves.length];
for (int i = 0; i < valves.length; i++) {
if( valves[i] == null ) continue;
if( ((ValveBase)valves[i]).getObjectName() == null ) continue;
mbeanNames[i] = ((ValveBase)valves[i]).getObjectName().toString();
}
return mbeanNames;
}
代码示例来源:origin: org.jboss.mod_cluster/mod_cluster
/**
* {@inheritDoc}
* @see org.jboss.modcluster.Context#removeRequestListener(javax.servlet.ServletRequestListener)
*/
public void removeRequestListener(ServletRequestListener listener)
{
Valve listenerValve = new RequestListenerValve(listener);
Pipeline pipeline = this.context.getPipeline();
for (Valve valve: pipeline.getValves())
{
if (listenerValve.equals(valve))
{
pipeline.removeValve(valve);
return;
}
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the MBean Names of the Valves associated with this Host
*
* @exception Exception if an MBean cannot be created or registered
*/
public String [] getValveNames()
throws Exception
{
Valve [] valves = this.getPipeline().getValves();
String [] mbeanNames = new String[valves.length];
for (int i = 0; i < valves.length; i++) {
if( valves[i] == null ) continue;
if( ((ValveBase)valves[i]).getObjectName() == null ) continue;
mbeanNames[i] = ((ValveBase)valves[i]).getObjectName().toString();
}
return mbeanNames;
}
代码示例来源:origin: com.brienwheeler.apps/apps-tomcat
@Override
public void afterPropertiesSet() throws Exception
{
tomcat.setBaseDir(baseDirectory);
tomcat.getHost().setAppBase(baseDirectory);
configureNetwork();
extractWarFile();
tomcat.start();
if (!showServerInfoOnError) {
for (Valve valve : tomcat.getHost().getPipeline().getValves()) {
if (valve instanceof ErrorReportValve) {
((ErrorReportValve) valve).setShowServerInfo(false);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!