Class FilterWrapper
- All Implemented Interfaces:
javax.servlet.Filter
- Version:
- Coherence 2.3
- Author:
- cp 2003.09.24
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Called by the servlet container to indicate to a filter that it is being taken out of service.voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) Called by the servlet container to allow the servlet to respond to a request.protected StringReturns a string representation of this object's attributes.protected javax.servlet.FilterGet the wrapped Filter.protected javax.servlet.FilterConfigGet the wrapped FilterConfig.protected SessionHelperGet the SessionHelper.voidinit(javax.servlet.FilterConfig cfg) Called by the servlet container to indicate to a filter that it is placed into service.toString()Returns a string representation of the object.Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, newHashMap, newHashMap, newHashSet, newHashSet, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Constructor Details
-
FilterWrapper
public FilterWrapper()Public default constructor; required by spec.
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig cfg) throws javax.servlet.ServletException Called by the servlet container to indicate to a filter that it is placed into service.The servlet container calls the
initmethod exactly once after instantiating the filter. Theinitmethod must complete successfully before the filter is asked to do any filtering work.The servlet container cannot place the filter into service if the
initmethod either:- Throws a
ServletException - Does not return within a time period defined by the Web server
- Specified by:
initin interfacejavax.servlet.Filter- Parameters:
cfg- aFilterConfigobject containing the filter's configuration and initialization parameters- Throws:
javax.servlet.ServletException- if an exception has occurred that interferes with the filter's normal operation
- Throws a
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, IOException Called by the servlet container to allow the servlet to respond to a request.This method is only called after the servlet's
init()method has completed successfully.Servlets typically run inside multithreaded servlet containers that can handle multiple requests concurrently. Developers must be aware to synchronize access to any shared resources such as files, network connections, and as well as the servlet's class and instance variables. More information on multithreaded programming in Java is available in the Java tutorial on multi-threaded programming.
- Specified by:
doFilterin interfacejavax.servlet.Filter- Parameters:
req- theServletRequestobject that contains the client's requestres- theServletResponseobject that contains the servlet's responsechain- the FilterChain to use to invoke the next filter or the Servlet- Throws:
javax.servlet.ServletException- if an exception occurs that interferes with the filter's normal operationIOException- if an input or output exception occurs
-
destroy
public void destroy()Called by the servlet container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter'sdoFiltermethod have exited or after a timeout period has passed. After the servlet container calls this method, it will not call thedoFiltermethod again on this instance of the filter.This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
- Specified by:
destroyin interfacejavax.servlet.Filter
-
toString
Returns a string representation of the object. -
getDescription
Returns a string representation of this object's attributes.- Returns:
- a string representation of this object's attributes
-
getFilterConfig
protected javax.servlet.FilterConfig getFilterConfig()Get the wrapped FilterConfig.- Returns:
- the wrapped FilterConfig
-
getFilter
protected javax.servlet.Filter getFilter()Get the wrapped Filter.- Returns:
- the wrapped Filter
-
getSessionHelper
Get the SessionHelper.- Returns:
- the SessionHelper for this app
-