Package com.loop54.user
Class NullClientInfo
java.lang.Object
com.loop54.user.NullClientInfo
- All Implemented Interfaces:
IRemoteClientInfo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of a cookie with a given name.Get the Referer(sic) header sent by the end-user.Get the IP address of the end-user.getRequestHeader(String name) Get a named header from the request made by the end-user.Get the User-Agent header sent by the end-user.voidsetCookie(String name, String value, LocalDateTime expiryTime) Sets a cookie with a given name, value and expiryTime.
-
Field Details
-
headers
-
-
Constructor Details
-
NullClientInfo
public NullClientInfo()
-
-
Method Details
-
getRequestHeader
Description copied from interface:IRemoteClientInfoGet a named header from the request made by the end-user.- Specified by:
getRequestHeaderin interfaceIRemoteClientInfo- Parameters:
name- The name of the header. Can be of any casing.- Returns:
- If the header isn't set return null, otherwise the string value of the header.
-
setCookie
Description copied from interface:IRemoteClientInfoSets a cookie with a given name, value and expiryTime. Cookies set by this method needs to be accessible withIRemoteClientInfo.getCookie(String);- Specified by:
setCookiein interfaceIRemoteClientInfo- Parameters:
name- Name of the cookie to setvalue- What value to set on the cookieexpiryTime- When the cookie should expire
-
getCookie
Description copied from interface:IRemoteClientInfoGets the value of a cookie with a given name. This needs to be able return cookies set withIRemoteClientInfo.setCookie(String, String, LocalDateTime)- Specified by:
getCookiein interfaceIRemoteClientInfo- Parameters:
name- Name of the cookie- Returns:
- Return the cookie data or null if it doesn't exist.
-
getReferrer
Description copied from interface:IRemoteClientInfoGet the Referer(sic) header sent by the end-user.- Specified by:
getReferrerin interfaceIRemoteClientInfo- Returns:
- Referer header or null if it doesn't exist.
-
getUserAgent
Description copied from interface:IRemoteClientInfoGet the User-Agent header sent by the end-user.- Specified by:
getUserAgentin interfaceIRemoteClientInfo- Returns:
- User-Agent header or null if it doesn't exist.
-
getRemoteIp
Description copied from interface:IRemoteClientInfoGet the IP address of the end-user.- Specified by:
getRemoteIpin interfaceIRemoteClientInfo- Returns:
- IP address or null if it doesn't exist.
-