public Notify duplicate() throws IOException, ClassNotFoundException {
        Notify result = new Notify();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        writeExternal(oos);
        oos.close();
        byte[] buf = baos.toByteArray();
        baos.close();
        ByteArrayInputStream bais = new ByteArrayInputStream(buf);
        ObjectInputStream ois = new ObjectInputStream(bais);
        result.readExternal(ois);
        ois.close();
        bais.close();
        // set the action if it exists
        result.setAction(getAction());
        result.setSourceType(sourceType);
        result.setSource(source);
        result.setTimestamp(timestamp);
        return result;
    }
public Notify duplicate ( ) throws IOException , ClassNotFoundException { Notify result = new Notify ( ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( baos ) ; writeExternal ( oos ) ; oos . close ( ) ; byte [ ] buf = baos . toByteArray ( ) ; baos . close ( ) ; ByteArrayInputStream bais = new ByteArrayInputStream ( buf ) ; ObjectInputStream ois = new ObjectInputStream ( bais ) ; result . readExternal ( ois ) ; ois . close ( ) ; bais . close ( ) ; result . setAction ( getAction ( ) ) ; result . setSourceType ( sourceType ) ; result . setSource ( source ) ; result . setTimestamp ( timestamp ) ; return result ; }
Duplicate this Notify message to future injection Serialize to memory and deserialize, safe way.

@return duplicated Notify event