// If no frame has been created, create one now.
if (mFrame == null) {
if (mObject == null) {
throw new NullPointerException("ObjectSource producing frame with no object set!");
}
FrameFormat outputFormat = ObjectFormat.fromObject(mObject, FrameFormat.TARGET_SIMPLE);
mFrame = context.getFrameManager().newFrame(outputFormat);
mFrame.setObjectValue(mObject);
mFrame.setTimestamp(Frame.TIMESTAMP_UNKNOWN);
}
// Push output
pushOutput("frame", mFrame);
// Wait for free output
if (!mRepeatFrame) {
closeOutputPort("frame");
}