|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.spray.filter.DefaultFilter org.norther.tammi.spray.protocol.DefaultHttpFilter
public class DefaultHttpFilter
A default implementation of HttpFilter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.norther.tammi.spray.protocol.HttpFilter |
---|
HttpFilter.SessionIdPolicy |
Field Summary |
---|
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultHttpFilter()
Constructs a new filter. |
Method Summary | |
---|---|
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
|
String |
getCharacterEncoding()
Gets the default character encoding for requests and responses if not explicitly specified. |
String |
getCharacterEncoding(Locale locale,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the default character encoding for a specific locale and request if not explicitly specified. |
String |
getContextPath()
Gets the external context path. |
String |
getLoginCheck()
Gets the check part of the path info of the login URL to apply. |
int |
getMaxRequestLength()
Gets the maximum allowed length of the first line of the request. |
int |
getResponseBufferSize()
Gets the response buffer size. |
HttpFilter.SessionIdPolicy |
getSessionIdPolicy()
Gets the session id policy. |
boolean |
isAbsoluteURLLinks()
Gets the absolute URL links option. |
boolean |
isFormDataParsed()
Gets the form data to be parsed as parameters option. |
boolean |
isPathInfoParsed()
Gets the path info to be parsed as parameters option. |
boolean |
isReverseProxyAccepted()
Checks whether a reverse proxy is accepted. |
boolean |
isRoamingClientsPermitted()
Checks whether roaming clients are permitted. |
void |
setAbsoluteURLLinks(boolean flag)
Sets the absolute URL links option to use absolute links for local addresses also. |
void |
setCharacterEncoding(String encoding)
Sets the default character encoding for requests and responses if not explicitly specified. |
void |
setContextPath(String path)
Sets the external context path. |
void |
setFormDataParsed(boolean flag)
Sets the form data to be parsed as parameters option. |
void |
setLoginCheck(String check)
Sets the check part of the path info of the login URL to apply. |
void |
setMaxRequestLength(int length)
Sets the maximum allowed length of the first line of the request. |
void |
setPathInfoParsed(boolean flag)
Sets the path info to be parsed as parameters option. |
void |
setResponseBufferSize(int size)
Sets the response buffer size. |
void |
setReverseProxyAccepted(boolean flag)
Sets whether a reverse proxy is accepted. |
void |
setRoamingClientsPermitted(boolean flag)
Sets whether roaming clients are permitted. |
void |
setSessionIdPolicy(HttpFilter.SessionIdPolicy policy)
Sets the session id policy. |
Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter |
---|
destroy, getFilterConfig, getRequestMap, getSessionMap, init |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.Filter |
---|
destroy, init |
Constructor Detail |
---|
public DefaultHttpFilter()
Method Detail |
---|
public String getContextPath()
HttpFilter
getContextPath
in interface HttpFilter
public void setContextPath(String path)
HttpFilter
The external context path may be applied in proxies and relays where the protocol filter can't parse the URI components correctly without hints.
setContextPath
in interface HttpFilter
path
- the context path.public boolean isAbsoluteURLLinks()
HttpFilter
isAbsoluteURLLinks
in interface HttpFilter
public void setAbsoluteURLLinks(boolean flag)
HttpFilter
setAbsoluteURLLinks
in interface HttpFilter
flag
- the absolute URL links option.public boolean isRoamingClientsPermitted()
HttpFilter
isRoamingClientsPermitted
in interface HttpFilter
public void setRoamingClientsPermitted(boolean flag)
HttpFilter
Roaming clients may change their IP address without losing their session as long as the session id remains valid.
setRoamingClientsPermitted
in interface HttpFilter
flag
- true if permitted, false otherwise.public boolean isReverseProxyAccepted()
HttpFilter
isReverseProxyAccepted
in interface HttpFilter
public void setReverseProxyAccepted(boolean flag)
HttpFilter
A reverse proxy may encrypt TLS request and pass them unsecured to the back-end server.
setReverseProxyAccepted
in interface HttpFilter
flag
- true if accepted, false otherwise.public boolean isPathInfoParsed()
HttpFilter
isPathInfoParsed
in interface HttpFilter
public void setPathInfoParsed(boolean flag)
HttpFilter
setPathInfoParsed
in interface HttpFilter
flag
- the path info parsed option.public boolean isFormDataParsed()
HttpFilter
isFormDataParsed
in interface HttpFilter
public void setFormDataParsed(boolean flag)
HttpFilter
setFormDataParsed
in interface HttpFilter
flag
- the form data parsed option.public int getMaxRequestLength()
HttpFilter
getMaxRequestLength
in interface HttpFilter
public void setMaxRequestLength(int length)
HttpFilter
setMaxRequestLength
in interface HttpFilter
length
- the maximum length of the request.public int getResponseBufferSize()
HttpFilter
getResponseBufferSize
in interface HttpFilter
public void setResponseBufferSize(int size)
HttpFilter
setResponseBufferSize
in interface HttpFilter
size
- the response buffer size.public String getLoginCheck()
HttpFilter
getLoginCheck
in interface HttpFilter
public void setLoginCheck(String check)
HttpFilter
setLoginCheck
in interface HttpFilter
check
- the login check.public HttpFilter.SessionIdPolicy getSessionIdPolicy()
HttpFilter
getSessionIdPolicy
in interface HttpFilter
public void setSessionIdPolicy(HttpFilter.SessionIdPolicy policy)
HttpFilter
setSessionIdPolicy
in interface HttpFilter
policy
- the policy.public String getCharacterEncoding()
HttpFilter
getCharacterEncoding
in interface HttpFilter
public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
HttpFilter
setCharacterEncoding
in interface HttpFilter
encoding
- the default character encoding.
UnsupportedEncodingException
- if not supported.public String getCharacterEncoding(Locale locale, ServletRequest request, ServletResponse response, FilterChain chain)
HttpFilter
Note that the default character encoding of this filter is returned if defined, otherwise one of the accepted charsets of the request corresponding to the specified locale.
getCharacterEncoding
in interface HttpFilter
locale
- the locale to apply.request
- the servlet request.response
- the servlet response.chain
- the filter chain.
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException
doFilter
in interface Filter
doFilter
in class DefaultFilter
ServletException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |