* @return a initialized {@link CouchbaseResponse}.
*/
private CouchbaseResponse handleBucketStreamingResponse(final ChannelHandlerContext ctx, final HttpResponse header) {
SocketAddress addr = ctx.channel().remoteAddress();
String host = addr instanceof InetSocketAddress ? ((InetSocketAddress) addr).getHostName() : addr.toString();
ResponseStatus status = statusFromCode(header.getStatus().code());
if (status.isSuccess()) {
streamingConfigObservable = BehaviorSubject.create();
}
previousRequest = currentRequest();
return new BucketStreamingResponse(streamingConfigObservable, host, status, currentRequest());
}