@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; }
/** * Remove an existing Valve. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeValve(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); ContainerBase container = getParentContainerFromChild(oname); Valve[] valves = container.getPipeline().getValves(); for (int i = 0; i < valves.length; i++) { ObjectName voname = ((ValveBase) valves[i]).getObjectName(); if (voname.equals(oname)) { container.getPipeline().removeValve(valves[i]); } } }
/** * Remove an existing Valve. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeValve(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); ContainerBase container = getParentContainerFromChild(oname); Valve[] valves = container.getPipeline().getValves(); for (int i = 0; i < valves.length; i++) { ObjectName voname = ((ValveBase) valves[i]).getObjectName(); if (voname.equals(oname)) { container.getPipeline().removeValve(valves[i]); } } }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered * * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link * #createValve(String, String)}. */ @Deprecated public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Remove an existing Valve. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeValve(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); ContainerBase container = getParentContainerFromChild(oname); Valve[] valves = container.getPipeline().getValves(); for (int i = 0; i < valves.length; i++) { ObjectName voname = ((ValveBase) valves[i]).getObjectName(); if (voname.equals(oname)) { container.getPipeline().removeValve(valves[i]); } } }
/** * Remove an existing Valve. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeValve(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); ContainerBase container = getParentContainerFromChild(oname); Valve[] valves = container.getPipeline().getValves(); for (int i = 0; i < valves.length; i++) { ObjectName voname = ((ValveBase) valves[i]).getObjectName(); if (voname.equals(oname)) { container.getPipeline().removeValve(valves[i]); } } }
/** * Create a new Remote Host Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteHostValve(String parent) throws Exception { // Create a new RemoteHostValve instance RemoteHostValve valve = new RemoteHostValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new AccessLoggerValve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createAccessLoggerValve(String parent) throws Exception { ObjectName pname = new ObjectName(parent); // Create a new AccessLogValve instance AccessLogValve accessLogger = new AccessLogValve(); ContainerBase containerBase = getParentContainerFromParent(pname); // Add the new instance to its parent component containerBase.getPipeline().addValve(accessLogger); ObjectName oname = accessLogger.getObjectName(); return (oname.toString()); }
/** * Create a new Single Sign On Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createSingleSignOn(String parent) throws Exception { // Create a new SingleSignOn instance SingleSignOn valve = new SingleSignOn(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new AccessLoggerValve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createAccessLoggerValve(String parent) throws Exception { ObjectName pname = new ObjectName(parent); // Create a new AccessLogValve instance AccessLogValve accessLogger = new AccessLogValve(); ContainerBase containerBase = getParentContainerFromParent(pname); // Add the new instance to its parent component containerBase.getPipeline().addValve(accessLogger); ObjectName oname = accessLogger.getObjectName(); return (oname.toString()); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new AccessLoggerValve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createAccessLoggerValve(String parent) throws Exception { ObjectName pname = new ObjectName(parent); // Create a new AccessLogValve instance AccessLogValve accessLogger = new AccessLogValve(); ContainerBase containerBase = getParentContainerFromParent(pname); // Add the new instance to its parent component containerBase.getPipeline().addValve(accessLogger); ObjectName oname = accessLogger.getObjectName(); return (oname.toString()); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new Single Sign On Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createSingleSignOn(String parent) throws Exception { // Create a new SingleSignOn instance SingleSignOn valve = new SingleSignOn(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new Single Sign On Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createSingleSignOn(String parent) throws Exception { // Create a new SingleSignOn instance SingleSignOn valve = new SingleSignOn(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new Remote Host Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteHostValve(String parent) throws Exception { // Create a new RemoteHostValve instance RemoteHostValve valve = new RemoteHostValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Create a new Remote Host Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteHostValve(String parent) throws Exception { // Create a new RemoteHostValve instance RemoteHostValve valve = new RemoteHostValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }