add native layer to java layer callback mechanism.