protected void registerClient ( ChannelHandlerContext ctx , PushUserAuth authEvent , PushConnection conn , PushConnectionRegistry registry ) { registry . put ( authEvent . getClientIdentity ( ) , conn ) ; //Make client reconnect after ttl seconds by closing this connection to limit stickiness of the client ctx . executor ( ) . schedule ( this :: requestClientToCloseConnection , ditheredReconnectDeadline ( ) , TimeUnit . SECONDS ) ; if ( KEEP_ALIVE_ENABLED . get ( ) ) { keepAliveTask = ctx . executor ( ) . scheduleWithFixedDelay ( this :: keepAlive , KEEP_ALIVE_INTERVAL . get ( ) , KEEP_ALIVE_INTERVAL . get ( ) , TimeUnit . SECONDS ) ; } }
Register authenticated client - represented by PushAuthEvent - with PushConnectionRegistry of this instance .