Add a register api for ObjectContainer.