private static IoFilter createAuthenticationIoFilter() {
StateMachine sm = StateMachineFactory.getInstance(
IoFilterTransition.class).create(AuthenticationHandler.START,
new AuthenticationHandler());
return new StateMachineProxyBuilder().setStateContextLookup(
new IoSessionStateContextLookup(new StateContextFactory() {
public StateContext create() {
return new AuthenticationHandler.AuthenticationContext();
}
}, "authContext")).setIgnoreUnhandledEvents(true).setIgnoreStateContextLookupFailure(true).create(