1 17 18 19 package org.apache.catalina.core; 20 21 22 import java.io.IOException ; 23 24 import javax.servlet.ServletException ; 25 import javax.servlet.http.HttpServletResponse ; 26 27 import org.apache.catalina.CometEvent; 28 import org.apache.catalina.Host; 29 import org.apache.catalina.connector.Request; 30 import org.apache.catalina.connector.Response; 31 import org.apache.catalina.util.StringManager; 32 import org.apache.catalina.valves.ValveBase; 33 34 35 45 46 final class StandardEngineValve 47 extends ValveBase { 48 49 50 52 53 56 private static final String info = 57 "org.apache.catalina.core.StandardEngineValve/1.0"; 58 59 60 63 private static final StringManager sm = 64 StringManager.getManager(Constants.Package); 65 66 67 69 70 73 public String getInfo() { 74 75 return (info); 76 77 } 78 79 80 82 83 95 public final void invoke(Request request, Response response) 96 throws IOException , ServletException { 97 98 Host host = request.getHost(); 100 if (host == null) { 101 response.sendError 102 (HttpServletResponse.SC_BAD_REQUEST, 103 sm.getString("standardEngine.noHost", 104 request.getServerName())); 105 return; 106 } 107 108 host.getPipeline().getFirst().invoke(request, response); 110 111 } 112 113 114 124 public final void event(Request request, Response response, CometEvent event) 125 throws IOException , ServletException { 126 127 request.getHost().getPipeline().getFirst().event(request, response, event); 129 130 } 131 132 } 133 | Popular Tags |