@ Override protected void channelRead0 ( ChannelHandlerContext ctx , FullBinaryMemcacheResponse msg ) throws Exception { switch ( msg . getStatus ( ) ) { case SUCCESS : originalPromise . setSuccess ( ) ; ctx . pipeline ( ) . remove ( this ) ; ctx . fireChannelActive ( ) ; break ; case ACCESS_ERROR : originalPromise . setFailure ( new AuthenticationException ( "Authentication failure on Select Bucket command" ) ) ; break ; case NOTFOUND_ERROR : originalPromise . setFailure ( new AuthenticationException ( "Bucket not found on Select Bucket command" ) ) ; break ; default : originalPromise . setFailure ( new AuthenticationException ( "Unhandled select bucket status: " + msg . getStatus ( ) ) ) ; } }
Handles incoming Select bucket responses .