Interface FilterContext
public interface FilterContext
Allows a
ChannelFilter
to communicate with its container.-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a newMessage
.void
Generates a fine log message using supplied arguments.Returns the local address of the filter channel.getName()
Returns the name of the filter channel.Returns the remote address of the filter channel.getServerParam
(String name) Returns the string value of the parameter/configuration indexed by name.getSharedParam
(String name) Returns the object value of the shared parameter indexed by name.getType()
Returns the type of the filter channel.void
Generates an information log message using supplied arguments.boolean
isLoggable
(Level level) Returnstrue
if the given message level is being logged.setSharedParam
(String name, Object value) Changes the object value of the shared parameter indexed by name.void
Generates a severe log message using supplied arguments.void
Generates a severe log message using supplied throwable and arguments.void
Generates a warning log message using supplied arguments.
-
Method Details
-
createMessage
-
getServerParam
Returns the string value of the parameter/configuration indexed by name.- Parameters:
name
- the name of the required parameter/configuration.- Returns:
- the value or
null
if parameter/configuration is undefined. - Throws:
NullPointerException
- ifname
isnull
or empty.
-
getName
-
getType
-
getLocalAddress
InetSocketAddress getLocalAddress()Returns the local address of the filter channel.- Returns:
- the local address of the filter channel.
-
getRemoteAddress
InetSocketAddress getRemoteAddress()Returns the remote address of the filter channel.- Returns:
- the remote address of the filter channel.
-
isLoggable
Returnstrue
if the given message level is being logged.- Parameters:
level
- a message logging level.- Returns:
true
if the given message level is being logged.- Throws:
NullPointerException
- iflevel
isnull
.
-
fine
-
info
-
warning
-
severe
-
severe
-