Class ServletCoreRequest

java.lang.Object
org.eclipse.jetty.ee10.servlet.ServletCoreRequest
All Implemented Interfaces:
org.eclipse.jetty.io.Content.Source, org.eclipse.jetty.server.Request, org.eclipse.jetty.util.Attributes

public class ServletCoreRequest extends Object implements org.eclipse.jetty.server.Request
Wrap a ServletRequest as a core Request.

Whilst similar to a Request.Wrapper, this class is not a Wrapper as callers should not be able to access Request.Wrapper.getWrapped() and bypass the ServletRequest.

The current implementation does not support any read operations.

  • Method Details

    • wrap

      public static org.eclipse.jetty.server.Request wrap(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    • getHeaders

      public org.eclipse.jetty.http.HttpFields getHeaders()
      Specified by:
      getHeaders in interface org.eclipse.jetty.server.Request
    • getHttpURI

      public org.eclipse.jetty.http.HttpURI getHttpURI()
      Specified by:
      getHttpURI in interface org.eclipse.jetty.server.Request
    • getId

      public String getId()
      Specified by:
      getId in interface org.eclipse.jetty.server.Request
    • getMethod

      public String getMethod()
      Specified by:
      getMethod in interface org.eclipse.jetty.server.Request
    • getServletRequest

      public jakarta.servlet.http.HttpServletRequest getServletRequest()
    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in interface org.eclipse.jetty.server.Request
    • removeAttribute

      public Object removeAttribute(String name)
      Specified by:
      removeAttribute in interface org.eclipse.jetty.util.Attributes
    • setAttribute

      public Object setAttribute(String name, Object attribute)
      Specified by:
      setAttribute in interface org.eclipse.jetty.util.Attributes
    • getAttribute

      public Object getAttribute(String name)
      Specified by:
      getAttribute in interface org.eclipse.jetty.util.Attributes
    • getAttributeNameSet

      public Set<String> getAttributeNameSet()
      Specified by:
      getAttributeNameSet in interface org.eclipse.jetty.util.Attributes
    • clearAttributes

      public void clearAttributes()
      Specified by:
      clearAttributes in interface org.eclipse.jetty.util.Attributes
    • fail

      public void fail(Throwable failure)
      Specified by:
      fail in interface org.eclipse.jetty.io.Content.Source
    • getComponents

      public org.eclipse.jetty.server.Components getComponents()
      Specified by:
      getComponents in interface org.eclipse.jetty.server.Request
    • getConnectionMetaData

      public org.eclipse.jetty.server.ConnectionMetaData getConnectionMetaData()
      Specified by:
      getConnectionMetaData in interface org.eclipse.jetty.server.Request
    • getContext

      public org.eclipse.jetty.server.Context getContext()
      Specified by:
      getContext in interface org.eclipse.jetty.server.Request
    • demand

      public void demand(Runnable demandCallback)
      Specified by:
      demand in interface org.eclipse.jetty.io.Content.Source
      Specified by:
      demand in interface org.eclipse.jetty.server.Request
    • getTrailers

      public org.eclipse.jetty.http.HttpFields getTrailers()
      Specified by:
      getTrailers in interface org.eclipse.jetty.server.Request
    • getBeginNanoTime

      public long getBeginNanoTime()
      Specified by:
      getBeginNanoTime in interface org.eclipse.jetty.server.Request
    • getHeadersNanoTime

      public long getHeadersNanoTime()
      Specified by:
      getHeadersNanoTime in interface org.eclipse.jetty.server.Request
    • read

      public org.eclipse.jetty.io.Content.Chunk read()
      Specified by:
      read in interface org.eclipse.jetty.io.Content.Source
      Specified by:
      read in interface org.eclipse.jetty.server.Request
    • consumeAvailable

      public boolean consumeAvailable()
      Specified by:
      consumeAvailable in interface org.eclipse.jetty.server.Request
    • addIdleTimeoutListener

      public void addIdleTimeoutListener(Predicate<TimeoutException> onIdleTimeout)
      Specified by:
      addIdleTimeoutListener in interface org.eclipse.jetty.server.Request
    • addFailureListener

      public void addFailureListener(Consumer<Throwable> onFailure)
      Specified by:
      addFailureListener in interface org.eclipse.jetty.server.Request
    • getTunnelSupport

      public org.eclipse.jetty.server.TunnelSupport getTunnelSupport()
      Specified by:
      getTunnelSupport in interface org.eclipse.jetty.server.Request
    • addHttpStreamWrapper

      public void addHttpStreamWrapper(Function<org.eclipse.jetty.server.HttpStream, org.eclipse.jetty.server.HttpStream> wrapper)
      Specified by:
      addHttpStreamWrapper in interface org.eclipse.jetty.server.Request
    • getSession

      public org.eclipse.jetty.server.Session getSession(boolean create)
      Specified by:
      getSession in interface org.eclipse.jetty.server.Request