Package org.restlet.engine.application
Class TunnelFilter.HeaderReplacer
- java.lang.Object
-
- org.restlet.engine.application.TunnelFilter.HeaderReplacer
-
- Enclosing class:
- TunnelFilter
private static class TunnelFilter.HeaderReplacer extends java.lang.ObjectUsed to describe the replacement value for an old client preference and for a a series of specific agent (i.e. web client) attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTunnelFilter.HeaderReplacer.Builder
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>agentAttributesAgent attributes that must be checked.private java.lang.StringheaderNewNew header value.private java.lang.StringheaderOldOld header value.
-
Constructor Summary
Constructors Constructor Description HeaderReplacer(java.lang.String headerOld, java.lang.String headerNew, java.util.Map<java.lang.String,java.lang.String> agentAttributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>getAgentAttributes()java.lang.StringgetHeaderNew()java.lang.StringgetHeaderOld()booleanmatchesConditions(java.util.Map<java.lang.String,java.lang.String> agentAttributes, java.lang.String headerOld)Indicates if the current header replacer matches the request attributes.
-
-
-
Method Detail
-
getAgentAttributes
public java.util.Map<java.lang.String,java.lang.String> getAgentAttributes()
-
getHeaderNew
public java.lang.String getHeaderNew()
-
getHeaderOld
public java.lang.String getHeaderOld()
-
matchesConditions
public boolean matchesConditions(java.util.Map<java.lang.String,java.lang.String> agentAttributes, java.lang.String headerOld)Indicates if the current header replacer matches the request attributes.- Parameters:
agentAttributes- The user agent attributes to match.headerOld- The facultative value of the current's request header to match.- Returns:
- true if the given request's attibutes match the current header replacer.
-
-