.renderCharacters(out);
} else {
ThemeStylesheetDescription tsd = this.portcs
.getUserPreferencesManager()
.getThemeStylesheetDescription();
BaseMarkupSerializer serOut = MEDIAMANAGER
.getSerializerByName(tsd
.getSerializerName(), out);
this.the_channel.renderXML(serOut);
}
return;
} catch (Exception e) {
// if any of the above didn't work, fall back to the
// error channel
resetCError(ErrorCode.SET_RUNTIME_DATA_EXCEPTION, e,
channelSubscribeId, this.the_channel,
"Channel failed a refresh attempt.");
}
} else if (chFate.equals("restart")) {
log
.debug("CError:renderCharacters() : going for reinstantiation");
ChannelManager cm = this.portcs.getChannelManager();
ChannelRuntimeData crd = (ChannelRuntimeData) this.runtimeData
.clone();
crd.clear();
try {
this.the_channel = cm
.instantiateChannel(channelSubscribeId);
if (this.the_channel == null) {
resetCError(ErrorCode.GENERAL_ERROR, null,
channelSubscribeId, null,
"Channel failed to reinstantiate!");
} else {
try {
if (this.the_channel instanceof IPrivilegedChannel) {
((IPrivilegedChannel) this.the_channel)
.setPortalControlStructures(this.portcs);
}
this.the_channel.setRuntimeData(crd);
if (this.the_channel instanceof ICharacterChannel) {
((ICharacterChannel) this.the_channel)
.renderCharacters(out);
} else {
ThemeStylesheetDescription tsd = this.portcs
.getUserPreferencesManager()
.getThemeStylesheetDescription();
BaseMarkupSerializer serOut = MEDIAMANAGER
.getSerializerByName(tsd
.getSerializerName(), out);
this.the_channel.renderXML(serOut);
}
return;
} catch (Exception e) {
// if any of the above didn't work, fall back to
// the error channel
resetCError(ErrorCode.SET_RUNTIME_DATA_EXCEPTION,
e, channelSubscribeId,
this.the_channel,
"Channel failed a reload attempt.");
cm.setChannelInstance(
channelSubscribeId, this);
log.error( "CError::renderCharacters() : an error occurred " +
"during channel reinitialization.", e);
}
}
} catch (Exception e) {
resetCError(ErrorCode.GENERAL_ERROR, e,
channelSubscribeId, null,
"Channel failed to reinstantiate!");
log.error("CError::renderCharacters() : an error occurred during " +
"channel reinstantiation. ", e);
}
} else if (chFate.equals("toggle_stack_trace")) {
this.showStackTrace = !this.showStackTrace;
}
}
}
// if channel's render XML method was to be called, we would've returned
// by now
BaseMarkupSerializer serOut = null;
try {
ThemeStylesheetDescription tsd = this.portcs
.getUserPreferencesManager()
.getThemeStylesheetDescription();
serOut = MEDIAMANAGER.getSerializerByName(tsd.getSerializerName(), out);