refactor, extract PBwrap.java, AgentProtocol.java, use period(second) for app.conf