Package org.refcodes.net
Interface RequestCookie
-
- All Superinterfaces:
Cookie
,org.refcodes.mixin.KeyAccessor<java.lang.String>
,org.refcodes.mixin.KeyAccessor.KeyBuilder<java.lang.String,java.lang.String>
,org.refcodes.mixin.KeyAccessor.KeyMutator<java.lang.String>
,org.refcodes.mixin.KeyAccessor.KeyProperty<java.lang.String>
,org.refcodes.structure.Property
,org.refcodes.structure.Property.PropertyBuilder
,org.refcodes.structure.Relation<java.lang.String,java.lang.String>
,org.refcodes.structure.Relation.RelationBuilder<java.lang.String,java.lang.String>
,org.refcodes.mixin.ValueAccessor<java.lang.String>
,org.refcodes.mixin.ValueAccessor.ValueBuilder<java.lang.String,java.lang.String>
,org.refcodes.mixin.ValueAccessor.ValueMutator<java.lang.String>
,org.refcodes.mixin.ValueAccessor.ValueProperty<java.lang.String>
- All Known Implementing Classes:
RequestCookieImpl
public interface RequestCookie extends Cookie
TheRequestCookie
represents a builder for a building request cookies. We use URL encoding / decoding for the cookie value (regardingfromHttpCookie(String)
andtoHttpCookie()
) to make life easier and not fall into the trap of unescaped values.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends java.lang.Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends java.lang.Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Property
org.refcodes.structure.Property.PropertyBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Relation
org.refcodes.structure.Relation.RelationBuilder<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor
org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends java.lang.Object,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends java.lang.Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends java.lang.Object>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
fromHttpCookie(java.lang.String aHttpCookie)
Sets the cookie according to the provided HTTP cookie text.default java.lang.String
toHttpCookie()
Returns the cookie to be assigned to a cookie Header-Field.default RequestCookie
withHttpCookie(java.lang.String aCookie)
Sets the cookie according to the provided HTTP cookie text viaCookie.fromHttpCookie(String)
.
-
-
-
Method Detail
-
withHttpCookie
default RequestCookie withHttpCookie(java.lang.String aCookie)
Sets the cookie according to the provided HTTP cookie text viaCookie.fromHttpCookie(String)
.- Specified by:
withHttpCookie
in interfaceCookie
- Parameters:
aCookie
- The HTTP cookie text.- Returns:
- A
Cookie
instance as of the Builder-Pattern.
-
fromHttpCookie
default void fromHttpCookie(java.lang.String aHttpCookie)
Sets the cookie according to the provided HTTP cookie text.- Specified by:
fromHttpCookie
in interfaceCookie
- Parameters:
aHttpCookie
- The HTTP cookie text.
-
toHttpCookie
default java.lang.String toHttpCookie()
Returns the cookie to be assigned to a cookie Header-Field.- Specified by:
toHttpCookie
in interfaceCookie
- Returns:
- The cookie value for a Header-Field.
-
-