Class JettyHttpProxy.ForwardingHandler
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.handler.AbstractHandler
-
- com.google.apphosting.runtime.jetty94.JettyHttpProxy.ForwardingHandler
-
- All Implemented Interfaces:
org.eclipse.jetty.server.Handler,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
- Enclosing class:
- JettyHttpProxy
public static class JettyHttpProxy.ForwardingHandler extends org.eclipse.jetty.server.handler.AbstractHandlerHandler to stub out the frontend server. This has to launch the runtime, configure the user's app into it, and then forward HTTP requests over gRPC to the runtime and decode the responses.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
-
-
Constructor Summary
Constructors Constructor Description ForwardingHandler(ServletEngineAdapter.Config runtimeOptions, Map<String,String> env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Forwards a request to the real runtime for handling.-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
destroy, doError, doStart, doStop, getServer, setServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
ForwardingHandler
public ForwardingHandler(ServletEngineAdapter.Config runtimeOptions, Map<String,String> env) throws ExecutionException, InterruptedException, IOException
-
-
Method Detail
-
handle
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Forwards a request to the real runtime for handling. We translate the javax.servlet types into protocol buffers and send the request, then translate the response proto back to a HttpServletResponse.- Specified by:
handlein interfaceorg.eclipse.jetty.server.Handler- Specified by:
handlein classorg.eclipse.jetty.server.handler.AbstractHandler
-
-