Java mail and command pattern sample