Package org.eclipse.jetty.server.handler
Class InetAccessHandler
- 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.handler.InetAccessHandler
-
- All Implemented Interfaces:
Handler
,HandlerContainer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
@Deprecated(since="2021-05-27") public class InetAccessHandler extends HandlerWrapper
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.InetAddress Access HandlerControls access to the wrapped handler using the real remote IP. Control is provided by and
IncludeExcludeSet
over aInetAddressSet
. This handler uses the real internet address of the connection, not one reported in the forwarded for headers, as this cannot be as easily forged.Additionally, there may be times when you want to only apply this handler to a subset of your connectors. In this situation you can use connectorNames to specify the connector names that you want this IP access filter to apply to.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description InetAccessHandler()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.Clears all the includes, excludes, included connector names and excluded connector names.void
dump(java.lang.Appendable out, java.lang.String indent)
Deprecated.Dump this object (and children) into an Appendable using the provided indent after any new lines.void
exclude(java.lang.String pattern)
Deprecated.Excludes an InetAddress patternvoid
exclude(java.lang.String... patterns)
Deprecated.Excludes InetAddress patternsvoid
excludeConnector(java.lang.String name)
Deprecated.Excludes a connector name.void
excludeConnectors(java.lang.String... names)
Deprecated.Excludes connector names.void
handle(java.lang.String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
Deprecated.Checks the incoming request against the whitelist and blacklistvoid
include(java.lang.String pattern)
Deprecated.Includes an InetAddress patternvoid
include(java.lang.String... patterns)
Deprecated.Includes InetAddress patternsvoid
includeConnector(java.lang.String name)
Deprecated.Includes a connector name.void
includeConnectors(java.lang.String... names)
Deprecated.Includes connector names.-
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
destroy, getHandler, getHandlers, insertHandler, setHandler
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
getServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
-
-
-
Method Detail
-
clear
public void clear()
Deprecated.Clears all the includes, excludes, included connector names and excluded connector names.
-
include
public void include(java.lang.String pattern)
Deprecated.Includes an InetAddress pattern- Parameters:
pattern
- InetAddress pattern to include- See Also:
InetAddressSet
-
include
public void include(java.lang.String... patterns)
Deprecated.Includes InetAddress patterns- Parameters:
patterns
- InetAddress patterns to include- See Also:
InetAddressSet
-
exclude
public void exclude(java.lang.String pattern)
Deprecated.Excludes an InetAddress pattern- Parameters:
pattern
- InetAddress pattern to exclude- See Also:
InetAddressSet
-
exclude
public void exclude(java.lang.String... patterns)
Deprecated.Excludes InetAddress patterns- Parameters:
patterns
- InetAddress patterns to exclude- See Also:
InetAddressSet
-
includeConnector
public void includeConnector(java.lang.String name)
Deprecated.Includes a connector name.- Parameters:
name
- Connector name to include in this handler.
-
excludeConnector
public void excludeConnector(java.lang.String name)
Deprecated.Excludes a connector name.- Parameters:
name
- Connector name to exclude in this handler.
-
includeConnectors
public void includeConnectors(java.lang.String... names)
Deprecated.Includes connector names.- Parameters:
names
- Connector names to include in this handler.
-
excludeConnectors
public void excludeConnectors(java.lang.String... names)
Deprecated.Excludes connector names.- Parameters:
names
- Connector names to exclude in this handler.
-
handle
public void handle(java.lang.String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
Deprecated.Checks the incoming request against the whitelist and blacklist- Specified by:
handle
in interfaceHandler
- Overrides:
handle
in classHandlerWrapper
- Parameters:
target
- The target of the request - either a URI or a name.baseRequest
- The original unwrapped request object.request
- The request either as theRequest
object or a wrapper of that request. The
method can be used access the Request object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getRequest()
response
- The response as theResponse
object or a wrapper of that request. The
method can be used access the Response object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getResponse()
- Throws:
java.io.IOException
- if unable to handle the request or response processingServletException
- if unable to handle the request or response due to underlying servlet issue
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
Deprecated.Description copied from interface:Dumpable
Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classContainerLifeCycle
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
java.io.IOException
- if unable to write to Appendable
-
-