You could simulate this by wrapping the stream in a Stream class stream. Use the IMediaStreamActionNotify.onPublish() handler to create a Stream class stream with the published stream as the source.
Something like this:
public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)
// get new stream name from your system.
Stream stream1 = Stream.createInstance(stream.getStreams().getAppInstance(), newStreamName);
stream1.play(stream.getName(), -2, -1, true);
The "-2" in the 2nd arg (start) signifies that the source is a live stream from RTMP encoder. The "-1" in the 3rd arg (length) means play to the end, or in case of live stream indefinitely.