public class ClientAuthFilter extends BaseFilter
Modifier and Type | Class and Description |
---|---|
static class |
ClientAuthFilter.ConnectionAuthInfo
Single connection authentication info.
|
Constructor and Description |
---|
ClientAuthFilter() |
Modifier and Type | Method and Description |
---|---|
NextAction |
handleClose(FilterChainContext ctx)
The method is called, when a connection gets closed.
|
NextAction |
handleRead(FilterChainContext ctx)
The method is called once we have received
MultiLinePacket . |
NextAction |
handleWrite(FilterChainContext ctx)
The method is called each time, when client sends a message to a server.
|
createContext, exceptionOccurred, handleAccept, handleConnect, handleEvent, onAdded, onFilterChainChanged, onRemoved
public NextAction handleRead(FilterChainContext ctx) throws IOException
MultiLinePacket
.
Filter check if incoming message is the server authentication response.
If yes - we suppose client authentication is completed, store client id
(assigned by the server), and resume all the pending writes. If client
was authenticated before - we check the "auth-id: handleRead
in interface Filter
handleRead
in class BaseFilter
ctx
- Request processing contextNextAction
IOException
public NextAction handleWrite(FilterChainContext ctx) throws IOException
handleWrite
in interface Filter
handleWrite
in class BaseFilter
ctx
- Response processing contextNextAction
IOException
public NextAction handleClose(FilterChainContext ctx) throws IOException
handleClose
in interface Filter
handleClose
in class BaseFilter
ctx
- Request processing contextNextAction
IOException
Copyright © 2015 Oracle Corporation. All rights reserved.