create private Classes for callbacks in Connection and Cache. re-adapt existing code.
create private Classes for StreamCallbacks in Connection and Cache. adapt existing code.