/** * Sets an {@link org.exolab.castor.xml.UnmarshalListener}. * * @param listener the {@link org.exolab.castor.xml.UnmarshalListener} to use with this instance * of the UnmarshalHandler. * @deprecated please move to the new {@link org.castor.xml.UnmarshalListener} interface */ public void setUnmarshalListener(org.exolab.castor.xml.UnmarshalListener listener) { if (listener == null) { listener = null; } else { UnmarshalListenerAdapter adapter = new UnmarshalListenerAdapter(); adapter.setOldListener(listener); _unmarshalListener = adapter; } }
/** * Sets an optional {@link org.exolab.castor.xml.UnmarshalListener} to receive pre and post * unmarshal notification for each Object in the tree. An UnmarshalListener is often used to allow * objects to appropriately initialize themselves by taking application specific behavior as they * are unloaded. Current only one (1) listener is allowed. If you need register multiple * listeners, you will have to create your own master listener that will forward the event * notifications and manage the multiple listeners.<br/> * The deprecated listener set with this method will be wrapped by an adapter. * * @param listener the {@link org.exolab.castor.xml.UnmarshalListener} to set. * @deprecated replaced by {@link org.castor.xml.UnmarshalListener} */ public void setUnmarshalListener(org.exolab.castor.xml.UnmarshalListener listener) { if (listener == null) { _unmarshalListener = null; } else { UnmarshalListenerAdapter adapter = new UnmarshalListenerAdapter(); adapter.setOldListener(listener); _unmarshalListener = adapter; } }