/** * 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()); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
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]; } }
@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; }
@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; }
@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; }
/** * 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; }
/** * @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; }
@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; }
@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; }
@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; }
@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; }
@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; } } } }
@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; }
/** * 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; }
/** * {@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; } } }
/** * 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; }
@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); } } } }