Java design pattern: proxy pattern