Class GatewayServer

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
org.eclipse.jetty.server.Server
com.zfabrik.gateway.worker.GatewayServer
All Implemented Interfaces:
org.eclipse.jetty.server.Handler, org.eclipse.jetty.server.HandlerContainer, org.eclipse.jetty.util.Attributes, 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

public class GatewayServer extends org.eclipse.jetty.server.Server
The Gateway server is a drop-in replacement for the default Jetty Server class for the Gateway receiving end - on the worker node.
  • It computes the HTTP dispatch port and sets it as system property jetty.http.port. It is crucial that the HTTP connector refers to this property in the configuration (as is default).
  • Any Gateway request from the dispatching side, the home process, will be responded with an appendix indicating session id and remaining TTL. This is used to update the worker lease, in case the worker node is detached
  • 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, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes

    org.eclipse.jetty.util.Attributes.Wrapper

    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

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
    System property set to convey http port to receive internal dispatches
    static String
     

    Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper

    _handler

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    GatewayServer​(int port)
     
     
    GatewayServer​(org.eclipse.jetty.util.thread.ThreadPool pool)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle​(org.eclipse.jetty.server.HttpChannel connection)
     

    Methods inherited from class org.eclipse.jetty.server.Server

    addBeanToAllConnectors, addConnector, clearAttributes, doStart, doStop, dump, getAttribute, getAttributeNames, getAttributeNameSet, getConnectors, getDateField, getErrorHandler, getRequestLog, getSessionIdManager, getStopAtShutdown, getStopTimeout, getThreadPool, getURI, getVersion, handleAsync, handleOptions, isDryRun, isDumpAfterStart, isDumpBeforeStop, join, main, removeAttribute, removeConnector, setAttribute, setConnectors, setDryRun, setDumpAfterStart, setDumpBeforeStop, setErrorHandler, setRequestLog, setSessionIdManager, setStopAtShutdown, setStopTimeout, start, toString

    Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper

    destroy, expandChildren, getHandler, getHandlers, handle, insertHandler, setHandler

    Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer

    expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer

    Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler

    doError, getServer

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable

    Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

    addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
  • Field Details

  • Constructor Details

    • GatewayServer

      public GatewayServer(InetSocketAddress addr)
    • GatewayServer

      public GatewayServer(int port)
    • GatewayServer

      public GatewayServer(org.eclipse.jetty.util.thread.ThreadPool pool)
    • GatewayServer

      public GatewayServer()
  • Method Details

    • handle

      public void handle(org.eclipse.jetty.server.HttpChannel connection) throws IOException, javax.servlet.ServletException
      Overrides:
      handle in class org.eclipse.jetty.server.Server
      Throws:
      IOException
      javax.servlet.ServletException