void function ( String arg0 , Runnable arg1 ) { if ( registeredDestructionCallbacks == null ) { registeredDestructionCallbacks = new ConcurrentHashMap < String , Runnable > ( ) ; } registeredDestructionCallbacks . put ( arg0 , arg1 ) ; }
register a callback to be executed on destruction of the specified object in the scope or at destruction of the entire scope , if the scope does not destroy individual objects but rather only terminates in its entirety . note : this is an optional operation . this method will only be called for scoped beans with actual destruction configuration disposablebean , destroy-method , destructionawarebeanpostprocessor . implementations should do their best to execute a given callback at the appropriate time . if such a callback is not supported by the underlying runtime environment at all , the callback must be ignored and a corresponding warning should be logged . note that ` destruction ' refers to to automatic destruction of the object as part of the scope 's own lifecycle , not to the individual scoped object having been explicitly removed by the application . if a scoped object gets removed via this facade 's #removeattribute string method , any registered destruction callback should be removed as well , assuming that the removed object will be reused or manually destroyed . concode_field_sep Map<String,Object> attributes concode_elem_sep Map<String,Runnable> registeredDestructionCallbacks concode_field_sep Object setAttribute concode_elem_sep Object getAttribute concode_elem_sep Runnable getDestructionCallback concode_elem_sep void clear concode_elem_sep Map<String,Object> getAttributeMap concode_elem_sep Object removeAttribute